Commit 36f7e964 by Aldy Hernandez Committed by Aldy Hernandez

rs6000.c (rs6000_ra_ever_killed): Call prologue_epilogue_contains instead of…

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
parent e3c62520
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> Wed Oct 9 15:54:49 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh.md (ffssi2): Fix emitted code. * sh.md (ffssi2): Fix emitted code.
......
...@@ -9446,7 +9446,6 @@ function_ok_for_sibcall (fndecl) ...@@ -9446,7 +9446,6 @@ function_ok_for_sibcall (fndecl)
return 0; return 0;
} }
/* function rewritten to handle sibcalls */
static int static int
rs6000_ra_ever_killed () rs6000_ra_ever_killed ()
{ {
...@@ -9458,19 +9457,21 @@ rs6000_ra_ever_killed () ...@@ -9458,19 +9457,21 @@ rs6000_ra_ever_killed ()
if (current_function_is_thunk) if (current_function_is_thunk)
return 0; return 0;
#endif #endif
/* regs_ever_live has LR marked as used if any sibcalls /* regs_ever_live has LR marked as used if any sibcalls are present,
are present. Which it is, but this should not force but this should not force saving and restoring in the
saving and restoring in the prologue/epilog. Likewise, pro/epilogue. Likewise, reg_set_between_p thinks a sibcall
reg_set_between_p thinks a sibcall clobbers LR, so clobbers LR, so that is inappropriate. */
that is inappropriate. */
/* Also, the prologue can generate a store into LR that /* Also, the prologue can generate a store into LR that
doesn't really count, like this: doesn't really count, like this:
move LR->R0 move LR->R0
bcl to set PIC register bcl to set PIC register
move LR->R31 move LR->R31
move R0->LR 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 (); push_topmost_sequence ();
top = get_insns (); top = get_insns ();
...@@ -9486,8 +9487,8 @@ rs6000_ra_ever_killed () ...@@ -9486,8 +9487,8 @@ rs6000_ra_ever_killed ()
else if (GET_CODE (insn) == CALL_INSN else if (GET_CODE (insn) == CALL_INSN
&& !SIBLING_CALL_P (insn)) && !SIBLING_CALL_P (insn))
return 1; return 1;
else if (set_of (reg, insn) != NULL_RTX else if (set_of (reg, insn) != NULL_RTX
&& find_reg_note (insn, REG_MAYBE_DEAD, NULL_RTX) == 0) && !prologue_epilogue_contains (insn))
return 1; return 1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment