public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1389] Avoid unused sbitmap in update_ssa Date: Fri, 1 Jul 2022 13:21:59 +0000 (GMT) [thread overview] Message-ID: <20220701132159.581F8385C8B2@sourceware.org> (raw) https://gcc.gnu.org/g:63abe04999283582b258adf60da6c19d541ebc68 commit r13-1389-g63abe04999283582b258adf60da6c19d541ebc68 Author: Richard Biener <rguenther@suse.de> Date: Fri Jul 1 13:59:32 2022 +0200 Avoid unused sbitmap in update_ssa The following avoids copying and using blocks_to_update to the interesting_blocks sbitmap when doing update_ssa as it is unused besides the redundant query in the domwalk. * tree-into-ssa.cc (rewrite_update_dom_walker::before_dom_children): Do not look at interesting_blocks which is a copy of blocks_to_update. (update_ssa): Do not initialize it. (pass_build_ssa::execute): Set interesting_blocks to NULL after releasing it. Diff: --- gcc/tree-into-ssa.cc | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index c4e40e8fb08..c90651c3a89 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -2214,15 +2214,11 @@ rewrite_update_dom_walker::before_dom_children (basic_block bb) } /* Step 2. Rewrite every variable used in each statement in the block. */ - if (bitmap_bit_p (interesting_blocks, bb->index)) - { - gcc_checking_assert (bitmap_bit_p (blocks_to_update, bb->index)); - for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi); ) - if (rewrite_update_stmt (gsi_stmt (gsi), gsi)) - gsi_remove (&gsi, true); - else - gsi_next (&gsi); - } + for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi); ) + if (rewrite_update_stmt (gsi_stmt (gsi), gsi)) + gsi_remove (&gsi, true); + else + gsi_next (&gsi); /* Step 3. Update PHI nodes. */ rewrite_update_phi_arguments (bb); @@ -2460,6 +2456,7 @@ pass_build_ssa::execute (function *fun) free (dfs); sbitmap_free (interesting_blocks); + interesting_blocks = NULL; fini_ssa_renamer (); @@ -3503,15 +3500,8 @@ update_ssa (unsigned update_flags) get_var_info (sym)->info.current_def = NULL_TREE; /* Now start the renaming process at START_BB. */ - interesting_blocks = sbitmap_alloc (last_basic_block_for_fn (cfun)); - bitmap_clear (interesting_blocks); - EXECUTE_IF_SET_IN_BITMAP (blocks_to_update, 0, i, bi) - bitmap_set_bit (interesting_blocks, i); - rewrite_blocks (start_bb, REWRITE_UPDATE); - sbitmap_free (interesting_blocks); - /* Debugging dumps. */ if (dump_file) {
reply other threads:[~2022-07-01 13:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220701132159.581F8385C8B2@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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).