Commit 9ccfe0cd by Daniel Berlin Committed by Daniel Berlin

tree.h (tree_memory_tag): Add old_used_alone.

2006-04-08  Daniel Berlin  <dberlin@dberlin.org>

	* tree.h (tree_memory_tag): Add old_used_alone.
	(SMT_OLD_USED_ALONE): New macro.
	* tree-ssa-alias.c (recalculate_used_alone): Stop
	marking things for renaming unnecessarily.

From-SVN: r112789
parent e0f931d2
2006-04-08 Daniel Berlin <dberlin@dberlin.org>
* tree.h (tree_memory_tag): Add old_used_alone.
(SMT_OLD_USED_ALONE): New macro.
* tree-ssa-alias.c (recalculate_used_alone): Stop
marking things for renaming unnecessarily.
2006-04-08 Kazu Hirata <kazu@codesourcery.com> 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
* builtins.c, config/arm/arm.c, config/i386/cygwin.h, * builtins.c, config/arm/arm.c, config/i386/cygwin.h,
......
...@@ -443,7 +443,10 @@ recalculate_used_alone (void) ...@@ -443,7 +443,10 @@ recalculate_used_alone (void)
updating_used_alone = true; updating_used_alone = true;
FOR_EACH_REFERENCED_VAR (var, rvi) FOR_EACH_REFERENCED_VAR (var, rvi)
if (TREE_CODE (var) == SYMBOL_MEMORY_TAG) if (TREE_CODE (var) == SYMBOL_MEMORY_TAG)
SMT_USED_ALONE (var) = 0; {
SMT_OLD_USED_ALONE (var) = SMT_USED_ALONE (var);
SMT_USED_ALONE (var) = 0;
}
/* Walk all the statements. /* Walk all the statements.
Calls get put into a list of statements to update, since we will Calls get put into a list of statements to update, since we will
...@@ -476,7 +479,11 @@ recalculate_used_alone (void) ...@@ -476,7 +479,11 @@ recalculate_used_alone (void)
if (!SMT_USED_ALONE (svar)) if (!SMT_USED_ALONE (svar))
{ {
SMT_USED_ALONE (svar) = true; SMT_USED_ALONE (svar) = true;
mark_sym_for_renaming (svar);
/* Only need to mark for renaming if it wasn't
used alone before. */
if (!SMT_OLD_USED_ALONE (svar))
mark_sym_for_renaming (svar);
} }
} }
} }
......
...@@ -2312,6 +2312,7 @@ struct tree_memory_tag GTY(()) ...@@ -2312,6 +2312,7 @@ struct tree_memory_tag GTY(())
struct tree_decl_minimal common; struct tree_decl_minimal common;
unsigned int is_global:1; unsigned int is_global:1;
unsigned int is_used_alone:1; unsigned int is_used_alone:1;
unsigned int old_used_alone:1;
}; };
#define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global) #define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global)
...@@ -2321,6 +2322,11 @@ struct tree_memory_tag GTY(()) ...@@ -2321,6 +2322,11 @@ struct tree_memory_tag GTY(())
from it. */ from it. */
#define SMT_USED_ALONE(NODE) (SYMBOL_MEMORY_TAG_CHECK (NODE)->mtag.is_used_alone) #define SMT_USED_ALONE(NODE) (SYMBOL_MEMORY_TAG_CHECK (NODE)->mtag.is_used_alone)
/* This flag is used to temporarily store the old value of the used alone
flag when updating so we know whether to mark the symbol for
renaming. */
#define SMT_OLD_USED_ALONE(NODE) (SYMBOL_MEMORY_TAG_CHECK (NODE)->mtag.old_used_alone)
struct tree_struct_field_tag GTY(()) struct tree_struct_field_tag GTY(())
{ {
struct tree_memory_tag common; struct tree_memory_tag common;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment