diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-06 19:42:22 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-06 19:42:22 +0000 |
commit | 99b12e3fb7a34b7f37f25ff1c4bd11e7dbfb772a (patch) | |
tree | 1bbe36ac9cb6e53aa6cc59b0bee82e20c63cf21e /gcc/sibcall.c | |
parent | a14bc9873737d1a92ef8c5345afedd36075190f2 (diff) | |
download | gcc-99b12e3fb7a34b7f37f25ff1c4bd11e7dbfb772a.tar.gz |
PR opt/5120
* sibcall.c (optimize_sibling_and_tail_recursive_call): Clear
RTX_UNCHANGING_P for the functions arguments when a tail call
is made.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51969 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sibcall.c')
-rw-r--r-- | gcc/sibcall.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 5a7997cb038..6e753fa2fa9 100644 --- a/gcc/sibcall.c +++ b/gcc/sibcall.c @@ -31,6 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "basic-block.h" #include "output.h" #include "except.h" +#include "tree.h" /* In case alternate_exit_block contains copy from pseudo, to return value, record the pseudo here. In such case the pseudo must be set to function @@ -730,6 +731,7 @@ optimize_sibling_and_tail_recursive_calls () if (successful_sibling_call) { rtx insn; + tree arg; /* A sibling call sequence invalidates any REG_EQUIV notes made for this function's incoming arguments. @@ -754,6 +756,16 @@ optimize_sibling_and_tail_recursive_calls () if (INSN_P (insn)) purge_mem_unchanging_flag (PATTERN (insn)); } + + /* Similarly, invalidate RTX_UNCHANGING_P for any incoming + arguments passed in registers. */ + for (arg = DECL_ARGUMENTS (current_function_decl); + arg; + arg = TREE_CHAIN (arg)) + { + if (REG_P (DECL_RTL (arg))) + RTX_UNCHANGING_P (DECL_RTL (arg)) = false; + } } /* There may have been NOTE_INSN_BLOCK_{BEGIN,END} notes in the |