From 8f39bfa01177c546eaf11536c7726c5e2666c0bf Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 17 Sep 2002 14:20:26 -0700 Subject: [PATCH] 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: r57259 --- gcc/ChangeLog | 5 +++++ gcc/sibcall.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa71f96801a0..d197f58ace81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-17 Richard Henderson + + * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove + RTX_UNCHANGING_P markers for successful tail-recursive replacement. + 2002-09-16 Richard Henderson PR opt/7515 diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 6e753fa2fa99..fca451f5a8d8 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 (); @@ -715,10 +715,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 @@ -728,7 +729,7 @@ optimize_sibling_and_tail_recursive_calls () } } - if (successful_sibling_call) + if (successful_replacement) { rtx insn; tree arg; -- 2.47.2