summaryrefslogtreecommitdiff
path: root/gcc/sel-sched-ir.c
diff options
context:
space:
mode:
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 07:59:57 +0000
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 07:59:57 +0000
commit982b0787ecbcf30812dc3b88e65f79646f1d35b7 (patch)
tree2de47a8d5084668e3ae0cf4ea9c11b147f68cb80 /gcc/sel-sched-ir.c
parentf1ec9c64a812649f29586e2d481d9bf28caf92c4 (diff)
downloadgcc-982b0787ecbcf30812dc3b88e65f79646f1d35b7.tar.gz
* sel-sched-ir.c (init_global_and_expr_for_insn): Set CANT_MOVE on RTX_FRAME_RELATED_P
insns and the insn to which NOTE_INSN_EPILOGUE_BEG is attached. * sched-vis.c (print_value): Allow NULL value. * gcc.target/ia64/20101005.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165455 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r--gcc/sel-sched-ir.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index f29f7116efc..452d8d43a65 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -2862,18 +2862,38 @@ init_global_and_expr_for_insn (insn_t insn)
bool force_unique_p;
ds_t spec_done_ds;
- /* Certain instructions cannot be cloned. */
- if (CANT_MOVE (insn)
- || INSN_ASM_P (insn)
- || SCHED_GROUP_P (insn)
- || prologue_epilogue_contains (insn)
- /* Exception handling insns are always unique. */
- || (cfun->can_throw_non_call_exceptions && can_throw_internal (insn))
- /* TRAP_IF though have an INSN code is control_flow_insn_p (). */
- || control_flow_insn_p (insn))
- force_unique_p = true;
+ /* Certain instructions cannot be cloned, and frame related insns and
+ the insn adjacent to NOTE_INSN_EPILOGUE_BEG cannot be moved out of
+ their block. */
+ if (prologue_epilogue_contains (insn))
+ {
+ if (RTX_FRAME_RELATED_P (insn))
+ CANT_MOVE (insn) = 1;
+ else
+ {
+ rtx note;
+ for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
+ if (REG_NOTE_KIND (note) == REG_SAVE_NOTE
+ && ((enum insn_note) INTVAL (XEXP (note, 0))
+ == NOTE_INSN_EPILOGUE_BEG))
+ {
+ CANT_MOVE (insn) = 1;
+ break;
+ }
+ }
+ force_unique_p = true;
+ }
else
- force_unique_p = false;
+ if (CANT_MOVE (insn)
+ || INSN_ASM_P (insn)
+ || SCHED_GROUP_P (insn)
+ /* Exception handling insns are always unique. */
+ || (cfun->can_throw_non_call_exceptions && can_throw_internal (insn))
+ /* TRAP_IF though have an INSN code is control_flow_insn_p (). */
+ || control_flow_insn_p (insn))
+ force_unique_p = true;
+ else
+ force_unique_p = false;
if (targetm.sched.get_insn_spec_ds)
{