aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-11-25 16:51:17 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-11-25 16:51:17 -0800
commit83bbd9b6c01f1a7a9c954783e58f760b1c2dca95 (patch)
tree5273c65ecf336e7685b5c2a99498d88d7013166b
parentcc5baa8634e8ba28b64ff1a6619e461453e4a72d (diff)
downloadgcc-83bbd9b6c01f1a7a9c954783e58f760b1c2dca95.zip
gcc-83bbd9b6c01f1a7a9c954783e58f760b1c2dca95.tar.gz
gcc-83bbd9b6c01f1a7a9c954783e58f760b1c2dca95.tar.bz2
alias.c (find_base_value): Use new_reg_base_value if it's live.
* alias.c (find_base_value): Use new_reg_base_value if it's live. (copying_arguments): Make boolean. From-SVN: r59483
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/alias.c19
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 04a4f7a..bcb5208 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-25 Richard Henderson <rth@redhat.com>
+
+ * alias.c (find_base_value): Use new_reg_base_value if it's live.
+ (copying_arguments): Make boolean.
+
2002-11-25 Jason Thorpe <thorpej@wasabisystems.com>
* gcc.c (static_spec_functions): Add if-exists-else spec
diff --git a/gcc/alias.c b/gcc/alias.c
index ca560b69..45e868c 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -199,7 +199,7 @@ char *reg_known_equiv_p;
/* True when scanning insns from the start of the rtl to the
NOTE_INSN_FUNCTION_BEG note. */
-static int copying_arguments;
+static bool copying_arguments;
/* The splay-tree used to store the various alias set entries. */
static splay_tree alias_sets;
@@ -781,9 +781,16 @@ find_base_value (src)
The test above is not sufficient because the scheduler may move
a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */
if ((regno >= FIRST_PSEUDO_REGISTER || fixed_regs[regno])
- && regno < reg_base_value_size
- && reg_base_value[regno])
- return reg_base_value[regno];
+ && regno < reg_base_value_size)
+ {
+ /* If we're inside init_alias_analysis, use new_reg_base_value
+ to reduce the number of relaxation iterations. */
+ if (new_reg_base_value && new_reg_base_value[regno])
+ return new_reg_base_value[regno];
+
+ if (reg_base_value[regno])
+ return reg_base_value[regno];
+ }
return src;
@@ -2744,7 +2751,7 @@ init_alias_analysis ()
/* We're at the start of the function each iteration through the
loop, so we're copying arguments. */
- copying_arguments = 1;
+ copying_arguments = true;
/* Wipe the potential alias information clean for this pass. */
memset ((char *) new_reg_base_value, 0, reg_base_value_size * sizeof (rtx));
@@ -2834,7 +2841,7 @@ init_alias_analysis ()
}
else if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
- copying_arguments = 0;
+ copying_arguments = false;
}
/* Now propagate values from new_reg_base_value to reg_base_value. */