public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] remove dead bitmaps
@ 2009-04-26 21:39 Michael Matz
  2009-04-27  8:26 ` Richard Guenther
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Matz @ 2009-04-26 21:39 UTC (permalink / raw)
  To: gcc-patches

Hi,

pretty obvious.  Neither regs_to_rename nor mem_syms_to_rename are used in 
any way except for allocating/setting/freeing them.  So, don't do that.

Okay if regstrapping passes?


Ciao,
Michael.
-- 
	* tree-into-ssa.c (regs_to_rename, mem_syms_to_rename): Remove.
	(init_update_ssa, delete_update_ssa, update_ssa): Remove references
	to above.

Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(Revision 146806)
+++ tree-into-ssa.c	(Arbeitskopie)
@@ -113,14 +113,6 @@ static sbitmap old_ssa_names;
 static sbitmap new_ssa_names;
 
 
-/* Subset of SYMS_TO_RENAME.  Contains all the GIMPLE register symbols
-   that have been marked for renaming.  */
-static bitmap regs_to_rename;
-
-/* Subset of SYMS_TO_RENAME.  Contains all the memory symbols
-   that have been marked for renaming.  */
-static bitmap mem_syms_to_rename;
-
 /* Set of SSA names that have been marked to be released after they
    were registered in the replacement table.  They will be finally
    released after we finish updating the SSA web.  */
@@ -2635,8 +2627,6 @@ init_update_ssa (struct function *fn)
   sbitmap_zero (new_ssa_names);
 
   repl_tbl = htab_create (20, repl_map_hash, repl_map_eq, repl_map_free);
-  regs_to_rename = BITMAP_ALLOC (NULL);
-  mem_syms_to_rename = BITMAP_ALLOC (NULL);
   names_to_release = NULL;
   memset (&update_ssa_stats, 0, sizeof (update_ssa_stats));
   update_ssa_stats.virtual_symbols = BITMAP_ALLOC (NULL);
@@ -2662,8 +2652,6 @@ delete_update_ssa (void)
   repl_tbl = NULL;
 
   bitmap_clear (SYMS_TO_RENAME (update_ssa_initialized_fn));
-  BITMAP_FREE (regs_to_rename);
-  BITMAP_FREE (mem_syms_to_rename);
   BITMAP_FREE (update_ssa_stats.virtual_symbols);
 
   if (names_to_release)
@@ -3152,26 +3140,6 @@ update_ssa (unsigned update_flags)
   if (insert_phi_p && switch_virtuals_to_full_rewrite_p ())
     switch_virtuals_to_full_rewrite ();
 
-  /* If there are symbols to rename, identify those symbols that are
-     GIMPLE registers into the set REGS_TO_RENAME and those that are
-     memory symbols into the set MEM_SYMS_TO_RENAME.  */
-  if (!bitmap_empty_p (SYMS_TO_RENAME (cfun)))
-    {
-      unsigned i;
-      bitmap_iterator bi;
-
-      EXECUTE_IF_SET_IN_BITMAP (SYMS_TO_RENAME (cfun), 0, i, bi)
-	{
-	  tree sym = referenced_var (i);
-	  if (is_gimple_reg (sym))
-	    bitmap_set_bit (regs_to_rename, i);
-	}
-
-      /* Memory symbols are those not in REGS_TO_RENAME.  */
-      bitmap_and_compl (mem_syms_to_rename,
-			SYMS_TO_RENAME (cfun), regs_to_rename);
-    }
-
   /* If there are names defined in the replacement table, prepare
      definition and use sites for all the names in NEW_SSA_NAMES and
      OLD_SSA_NAMES.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] remove dead bitmaps
  2009-04-26 21:39 [patch] remove dead bitmaps Michael Matz
@ 2009-04-27  8:26 ` Richard Guenther
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2009-04-27  8:26 UTC (permalink / raw)
  To: Michael Matz; +Cc: gcc-patches

On Sun, Apr 26, 2009 at 11:37 PM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> pretty obvious.  Neither regs_to_rename nor mem_syms_to_rename are used in
> any way except for allocating/setting/freeing them.  So, don't do that.
>
> Okay if regstrapping passes?

Ok.

Thanks,
Richard.

>
> Ciao,
> Michael.
> --
>        * tree-into-ssa.c (regs_to_rename, mem_syms_to_rename): Remove.
>        (init_update_ssa, delete_update_ssa, update_ssa): Remove references
>        to above.
>
> Index: tree-into-ssa.c
> ===================================================================
> --- tree-into-ssa.c     (Revision 146806)
> +++ tree-into-ssa.c     (Arbeitskopie)
> @@ -113,14 +113,6 @@ static sbitmap old_ssa_names;
>  static sbitmap new_ssa_names;
>
>
> -/* Subset of SYMS_TO_RENAME.  Contains all the GIMPLE register symbols
> -   that have been marked for renaming.  */
> -static bitmap regs_to_rename;
> -
> -/* Subset of SYMS_TO_RENAME.  Contains all the memory symbols
> -   that have been marked for renaming.  */
> -static bitmap mem_syms_to_rename;
> -
>  /* Set of SSA names that have been marked to be released after they
>    were registered in the replacement table.  They will be finally
>    released after we finish updating the SSA web.  */
> @@ -2635,8 +2627,6 @@ init_update_ssa (struct function *fn)
>   sbitmap_zero (new_ssa_names);
>
>   repl_tbl = htab_create (20, repl_map_hash, repl_map_eq, repl_map_free);
> -  regs_to_rename = BITMAP_ALLOC (NULL);
> -  mem_syms_to_rename = BITMAP_ALLOC (NULL);
>   names_to_release = NULL;
>   memset (&update_ssa_stats, 0, sizeof (update_ssa_stats));
>   update_ssa_stats.virtual_symbols = BITMAP_ALLOC (NULL);
> @@ -2662,8 +2652,6 @@ delete_update_ssa (void)
>   repl_tbl = NULL;
>
>   bitmap_clear (SYMS_TO_RENAME (update_ssa_initialized_fn));
> -  BITMAP_FREE (regs_to_rename);
> -  BITMAP_FREE (mem_syms_to_rename);
>   BITMAP_FREE (update_ssa_stats.virtual_symbols);
>
>   if (names_to_release)
> @@ -3152,26 +3140,6 @@ update_ssa (unsigned update_flags)
>   if (insert_phi_p && switch_virtuals_to_full_rewrite_p ())
>     switch_virtuals_to_full_rewrite ();
>
> -  /* If there are symbols to rename, identify those symbols that are
> -     GIMPLE registers into the set REGS_TO_RENAME and those that are
> -     memory symbols into the set MEM_SYMS_TO_RENAME.  */
> -  if (!bitmap_empty_p (SYMS_TO_RENAME (cfun)))
> -    {
> -      unsigned i;
> -      bitmap_iterator bi;
> -
> -      EXECUTE_IF_SET_IN_BITMAP (SYMS_TO_RENAME (cfun), 0, i, bi)
> -       {
> -         tree sym = referenced_var (i);
> -         if (is_gimple_reg (sym))
> -           bitmap_set_bit (regs_to_rename, i);
> -       }
> -
> -      /* Memory symbols are those not in REGS_TO_RENAME.  */
> -      bitmap_and_compl (mem_syms_to_rename,
> -                       SYMS_TO_RENAME (cfun), regs_to_rename);
> -    }
> -
>   /* If there are names defined in the replacement table, prepare
>      definition and use sites for all the names in NEW_SSA_NAMES and
>      OLD_SSA_NAMES.  */
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-27  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-26 21:39 [patch] remove dead bitmaps Michael Matz
2009-04-27  8:26 ` Richard Guenther

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).