]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove live-info global bitmap
authorRichard Biener <rguenther@suse.de>
Tue, 9 Apr 2024 09:28:47 +0000 (11:28 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 2 May 2024 07:01:11 +0000 (09:01 +0200)
The following removes the unused tree_live_info_d->global bitmap.

* 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
gcc/tree-ssa-live.h

index d94e94eb3bccc0e8d1cf876bf61d484d2531a07d..fa6be2fced308ea0b4312ab415e32bd2b7a7bf03 100644 (file)
@@ -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);
 }
 
 
index e86ce0c17688aceadf8de242046baa2358f4db5b..ac39091f5d2f1f20ce3c7eb53aebcbf7b50ff4ab 100644 (file)
@@ -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);
 }