From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Remove live-info global bitmap
Date: Tue, 9 Apr 2024 13:49:59 +0200 (CEST) [thread overview]
Message-ID: <20240409114959.rPAfmdmPTwUpsqa57XaSbnfH1d3C8H1nXrzkYEA2vww@z> (raw)
The following removes the unused tree_live_info_d->global bitmap.
Bootstrapped and tested on x86_64-unknown-linux-gnu, queued for stage1.
Richard.
* tree-ssa-live.h (tree_live_info_d::global): Remove.
(partition_is_global): Likewise.
(make_live_on_entry): Do not set bit in global.
* tree-ssa-live.cc (new_tree_live_info): Do not allocate
global bitmap.
(delete_tree_live_info): Do not release it.
(set_var_live_on_entry): Do not set bits in it.
---
gcc/tree-ssa-live.cc | 13 +------------
gcc/tree-ssa-live.h | 13 -------------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/gcc/tree-ssa-live.cc b/gcc/tree-ssa-live.cc
index d94e94eb3bc..fa6be2fced3 100644
--- a/gcc/tree-ssa-live.cc
+++ b/gcc/tree-ssa-live.cc
@@ -1015,7 +1015,6 @@ new_tree_live_info (var_map map)
live->work_stack = XNEWVEC (int, last_basic_block_for_fn (cfun));
live->stack_top = live->work_stack;
- live->global = BITMAP_ALLOC (NULL);
return live;
}
@@ -1035,7 +1034,6 @@ delete_tree_live_info (tree_live_info_p live)
bitmap_obstack_release (&live->liveout_obstack);
free (live->liveout);
}
- BITMAP_FREE (live->global);
free (live->work_stack);
free (live);
}
@@ -1123,7 +1121,6 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live)
use_operand_p use;
basic_block def_bb = NULL;
imm_use_iterator imm_iter;
- bool global = false;
p = var_to_partition (live->map, ssa_name);
if (p == NO_PARTITION)
@@ -1173,16 +1170,8 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live)
/* If there was a live on entry use, set the bit. */
if (add_block)
- {
- global = true;
- bitmap_set_bit (&live->livein[add_block->index], p);
- }
+ bitmap_set_bit (&live->livein[add_block->index], p);
}
-
- /* If SSA_NAME is live on entry to at least one block, fill in all the live
- on entry blocks between the def and all the uses. */
- if (global)
- bitmap_set_bit (live->global, p);
}
diff --git a/gcc/tree-ssa-live.h b/gcc/tree-ssa-live.h
index e86ce0c1768..ac39091f5d2 100644
--- a/gcc/tree-ssa-live.h
+++ b/gcc/tree-ssa-live.h
@@ -237,9 +237,6 @@ typedef struct tree_live_info_d
/* Var map this relates to. */
var_map map;
- /* Bitmap indicating which partitions are global. */
- bitmap global;
-
/* Bitmaps of live on entry blocks for partition elements. */
bitmap_head *livein;
@@ -276,15 +273,6 @@ extern bitmap live_vars_at_stmt (vec<bitmap_head> &, live_vars_map *,
gimple *);
extern void destroy_live_vars (vec<bitmap_head> &);
-/* Return TRUE if P is marked as a global in LIVE. */
-
-inline int
-partition_is_global (tree_live_info_p live, int p)
-{
- gcc_checking_assert (live->global);
- return bitmap_bit_p (live->global, p);
-}
-
/* Return the bitmap from LIVE representing the live on entry blocks for
partition P. */
@@ -329,7 +317,6 @@ inline void
make_live_on_entry (tree_live_info_p live, basic_block bb , int p)
{
bitmap_set_bit (&live->livein[bb->index], p);
- bitmap_set_bit (live->global, p);
}
--
2.35.3
reply other threads:[~2024-04-09 11:50 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=20240409114959.rPAfmdmPTwUpsqa57XaSbnfH1d3C8H1nXrzkYEA2vww@z \
--to=rguenther@suse.de \
--cc=gcc-patches@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).