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 c/108880] [11/12/13 Regression] slow compilation with "-fsanitize=undefined" Date: Wed, 22 Feb 2023 20:46:51 +0000 [thread overview] Message-ID: <bug-108880-4-cvkr298ef2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108880-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108880 --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Marek Polacek from comment #12) > Sure, it worked for the testcase because the STATEMENT_LIST only had two > stmts. I'm testing: > > --- a/gcc/c-family/c-gimplify.cc > +++ b/gcc/c-family/c-gimplify.cc > @@ -516,7 +516,8 @@ c_genericize_control_stmt (tree *stmt_p, int > *walk_subtrees, void *data, > tree t = tsi_stmt (i); > if (TREE_CODE (t) != DEBUG_BEGIN_STMT && nondebug_stmts < 2) > nondebug_stmts++; > - walk_tree_1 (tsi_stmt_ptr (i), func, data, NULL, lh); > + walk_tree_1 (tsi_stmt_ptr (i), func, data, > + static_cast<hash_set<tree> *>(data), lh); I'd limit this change to !c_dialect_cxx () only, I'm afraid if it is done for C++ too, then cp_genericize_r won't then walk into those trees later on and could avoid replacing there something important. While for C, there is walk_tree solely for the purposes of c_genericize_control* and nothing else. To avoid testing it in every iteration you could have a hash_set<tree> *pset temporary initialized based on c_dialect_cxx () to NULL or data and then just use it in the loop. > if (TREE_CODE (t) != DEBUG_BEGIN_STMT > && (nondebug_stmts > 1 || TREE_SIDE_EFFECTS (tsi_stmt (i)))) > clear_side_effects = false;
next prev parent reply other threads:[~2023-02-22 20:46 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-22 6:41 [Bug sanitizer/108880] New: " qrzhang at gatech dot edu 2023-02-22 6:51 ` [Bug sanitizer/108880] [11/12/13 Regression] " pinskia at gcc dot gnu.org 2023-02-22 6:53 ` pinskia at gcc dot gnu.org 2023-02-22 6:54 ` pinskia at gcc dot gnu.org 2023-02-22 7:12 ` pinskia at gcc dot gnu.org 2023-02-22 10:25 ` [Bug c/108880] " rguenth at gcc dot gnu.org 2023-02-22 10:25 ` rguenth at gcc dot gnu.org 2023-02-22 15:41 ` mpolacek at gcc dot gnu.org 2023-02-22 15:51 ` mpolacek at gcc dot gnu.org 2023-02-22 16:16 ` mpolacek at gcc dot gnu.org 2023-02-22 18:24 ` mpolacek at gcc dot gnu.org 2023-02-22 19:46 ` mpolacek at gcc dot gnu.org 2023-02-22 19:48 ` jakub at gcc dot gnu.org 2023-02-22 19:50 ` mpolacek at gcc dot gnu.org 2023-02-22 20:06 ` jakub at gcc dot gnu.org 2023-02-22 20:14 ` mpolacek at gcc dot gnu.org 2023-02-22 20:46 ` jakub at gcc dot gnu.org [this message] 2023-02-22 20:51 ` mpolacek at gcc dot gnu.org 2023-02-22 22:47 ` cvs-commit at gcc dot gnu.org 2023-02-22 22:48 ` [Bug c/108880] [11/12 " mpolacek at gcc dot gnu.org 2023-03-04 18:02 ` cvs-commit at gcc dot gnu.org 2023-03-07 17:45 ` [Bug c/108880] [11 " mpolacek 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-108880-4-cvkr298ef2@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: linkBe 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).