aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-09-18 17:10:10 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-09-18 17:10:10 -0700
commit2c67b7c62b4def6be6b4382ef7457eda933aef9d (patch)
tree979194822dd83a584d4c468d30f46cc59babcb83
parent15769ca344d8bf0a6faebadaf262e8c98572a0e7 (diff)
downloadgcc-2c67b7c62b4def6be6b4382ef7457eda933aef9d.zip
gcc-2c67b7c62b4def6be6b4382ef7457eda933aef9d.tar.gz
gcc-2c67b7c62b4def6be6b4382ef7457eda933aef9d.tar.bz2
sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove RTX_UNCHANGING_P markers for successful tail-recursive replacement.
* sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove RTX_UNCHANGING_P markers for successful tail-recursive replacement. From-SVN: r57290
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/sibcall.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7358c1c..10414c8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2002-09-18 Richard Henderson <rth@redhat.com>
+ * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove
+ RTX_UNCHANGING_P markers for successful tail-recursive replacement.
+
+2002-09-18 Richard Henderson <rth@redhat.com>
+
* real.c (round_for_format): Collect sticky as unsigned long, not bool.
2002-09-19 Alan Modra <amodra@bigpond.net.au>
diff --git a/gcc/sibcall.c b/gcc/sibcall.c
index d13f3a9..4073e7c 100644
--- a/gcc/sibcall.c
+++ b/gcc/sibcall.c
@@ -574,8 +574,8 @@ optimize_sibling_and_tail_recursive_calls ()
rtx insn, insns;
basic_block alternate_exit = EXIT_BLOCK_PTR;
bool no_sibcalls_this_function = false;
- int successful_sibling_call = 0;
- int replaced_call_placeholder = 0;
+ bool successful_replacement = false;
+ bool replaced_call_placeholder = false;
edge e;
insns = get_insns ();
@@ -704,10 +704,11 @@ optimize_sibling_and_tail_recursive_calls ()
/* Select a set of insns to implement the call and emit them.
Tail recursion is the most efficient, so select it over
a tail/sibling call. */
- if (sibcall)
- successful_sibling_call = 1;
- replaced_call_placeholder = 1;
+ if (sibcall || tailrecursion)
+ successful_replacement = true;
+ replaced_call_placeholder = true;
+
replace_call_placeholder (insn,
tailrecursion != 0
? sibcall_use_tail_recursion
@@ -717,7 +718,7 @@ optimize_sibling_and_tail_recursive_calls ()
}
}
- if (successful_sibling_call)
+ if (successful_replacement)
{
rtx insn;
tree arg;