diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-10-09 15:54:55 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-10-09 15:54:55 +0000 |
commit | 36f7e96410747bc76e93b6c9495610eec0766e9d (patch) | |
tree | ddd1fbc13d3a6d73d0ca735dc331cadf3945ec35 /gcc | |
parent | e3c6252002eac3c1feb387ecc753ccfebd21abcd (diff) | |
download | gcc-36f7e96410747bc76e93b6c9495610eec0766e9d.zip gcc-36f7e96410747bc76e93b6c9495610eec0766e9d.tar.gz gcc-36f7e96410747bc76e93b6c9495610eec0766e9d.tar.bz2 |
rs6000.c (rs6000_ra_ever_killed): Call prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes.
2002-10-08 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call
prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes.
From-SVN: r57985
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 21 |
2 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5df0457..33553cf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-10-08 Aldy Hernandez <aldyh@redhat.com> + + * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call + prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes. + Wed Oct 9 15:54:49 2002 J"orn Rennecke <joern.rennecke@superh.com> * sh.md (ffssi2): Fix emitted code. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 53b7a9b..8289289 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9446,7 +9446,6 @@ function_ok_for_sibcall (fndecl) return 0; } -/* function rewritten to handle sibcalls */ static int rs6000_ra_ever_killed () { @@ -9458,19 +9457,21 @@ rs6000_ra_ever_killed () if (current_function_is_thunk) return 0; #endif - /* regs_ever_live has LR marked as used if any sibcalls - are present. Which it is, but this should not force - saving and restoring in the prologue/epilog. Likewise, - reg_set_between_p thinks a sibcall clobbers LR, so - that is inappropriate. */ + /* regs_ever_live has LR marked as used if any sibcalls are present, + but this should not force saving and restoring in the + pro/epilogue. Likewise, reg_set_between_p thinks a sibcall + clobbers LR, so that is inappropriate. */ + /* Also, the prologue can generate a store into LR that doesn't really count, like this: + move LR->R0 bcl to set PIC register move LR->R31 move R0->LR - When we're called from the epilog, we need to avoid counting - this as a store; thus we ignore any insns with a REG_MAYBE_DEAD note. */ + + When we're called from the epilogue, we need to avoid counting + this as a store. */ push_topmost_sequence (); top = get_insns (); @@ -9486,8 +9487,8 @@ rs6000_ra_ever_killed () else if (GET_CODE (insn) == CALL_INSN && !SIBLING_CALL_P (insn)) return 1; - else if (set_of (reg, insn) != NULL_RTX - && find_reg_note (insn, REG_MAYBE_DEAD, NULL_RTX) == 0) + else if (set_of (reg, insn) != NULL_RTX + && !prologue_epilogue_contains (insn)) return 1; } } |