public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106912] [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032 since r13-1575-gcf3a120084e94614
Date: Mon, 06 Feb 2023 12:29:04 +0000	[thread overview]
Message-ID: <bug-106912-4-4ME9w9M2mo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106912-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106912

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Also, the other PR is about a function being made const late when it previously
wasn't, while in this case it is being made non-const after it has been const
before.
  /* Drop pure/const flags from instrumented functions.  */
  if (profile_arc_flag || flag_test_coverage)
    FOR_EACH_DEFINED_FUNCTION (node)
      {
        if (!gimple_has_body_p (node->decl)
            || !(!node->clone_of
            || node->decl != node->clone_of->decl))
          continue;

        /* Don't profile functions produced for builtin stuff.  */
        if (DECL_SOURCE_LOCATION (node->decl) == BUILTINS_LOCATION)
          continue;

        node->set_const_flag (false, false);
        node->set_pure_flag (false, false);
      }
just looks completely wrong to me for const, which unlike pure attribute can be
on both function types and on function declarations.  If we want calls to const
functions to actually not be treated as const when profiling, it can be only
done by ignoring const everywhere if profile_arc_flag || flag_test_coverage. 
It even can't be just ignored for direct calls to defined functions, because
calls can be indirect at first, without vops, and then fndecl propagated and
turned into direct.  Or for IPA they can be defined in other TUs.

  parent reply	other threads:[~2023-02-06 12:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 17:23 [Bug c/106912] New: [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032 gscfq@t-online.de
2022-09-12 19:35 ` [Bug tree-optimization/106912] [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032 since r13-1575-gcf3a120084e94614 marxin at gcc dot gnu.org
2022-09-13  6:41 ` rguenth at gcc dot gnu.org
2022-09-13  7:47 ` rguenth at gcc dot gnu.org
2022-09-13  8:51 ` rguenth at gcc dot gnu.org
2022-11-25  7:59 ` rguenth at gcc dot gnu.org
2022-12-08 17:30 ` jakub at gcc dot gnu.org
2022-12-12 10:56 ` rguenth at gcc dot gnu.org
2022-12-20  0:12 ` pinskia at gcc dot gnu.org
2023-02-06 12:11 ` jakub at gcc dot gnu.org
2023-02-06 12:29 ` jakub at gcc dot gnu.org [this message]
2023-02-07 11:33 ` rguenth at gcc dot gnu.org
2023-03-16 12:50 ` jakub at gcc dot gnu.org
2023-03-24 12:53 ` cvs-commit at gcc dot gnu.org
2023-03-24 12:54 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106912-4-4ME9w9M2mo@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).