+2011-07-09 Richard Henderson <rth@redhat.com>
+
+ * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
+ try to insert an rtl prologue here.
+ (rs6000_output_function_epilogue): Similarly.
+ * config/rs6000/rs6000.md (prologue): Emit a barrier to
+ satisfy !TARGET_SCHED_PROLOG.
+ (epilogue, sibcall_epilogue): Likewise.
+
2011-07-09 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.h (STACK_SAVEAREA_MODE): Move around.
PR tree-optimization/49580
* tree-cfg.c (gimple_duplicate_sese_tail): Remove handling of
the loop's number of iterations.
- * tree-parloops.c (transform_to_exit_first_loop): Add the
+ * tree-parloops.c (transform_to_exit_first_loop): Add the
handling of the loop's number of iterations before the call
to gimple_duplicate_sese_tail.
- Insert the stmt caclculating the new rhs of the loop's
+ Insert the stmt caclculating the new rhs of the loop's
condition stmt to the preheader instead of iters_bb.
2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
common_mode_defined = 1;
}
- if (! HAVE_prologue)
- {
- rtx prologue;
-
- start_sequence ();
-
- /* A NOTE_INSN_DELETED is supposed to be at the start and end of
- the "toplevel" insn chain. */
- emit_note (NOTE_INSN_DELETED);
- rs6000_emit_prologue ();
- emit_note (NOTE_INSN_DELETED);
-
- /* Expand INSN_ADDRESSES so final() doesn't crash. */
- {
- rtx insn;
- unsigned addr = 0;
- for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn))
- {
- INSN_ADDRESSES_NEW (insn, addr);
- addr += 4;
- }
- }
-
- prologue = get_insns ();
- end_sequence ();
-
- if (TARGET_DEBUG_STACK)
- debug_rtx_list (prologue, 100);
-
- emit_insn_before_noloc (prologue, BB_HEAD (ENTRY_BLOCK_PTR->next_bb),
- ENTRY_BLOCK_PTR);
- }
-
rs6000_pic_labelno++;
}
rs6000_output_function_epilogue (FILE *file,
HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
- if (! HAVE_epilogue)
- {
- rtx insn = get_last_insn ();
- /* If the last insn was a BARRIER, we don't have to write anything except
- the trace table. */
- if (GET_CODE (insn) == NOTE)
- insn = prev_nonnote_insn (insn);
- if (insn == 0 || GET_CODE (insn) != BARRIER)
- {
- /* This is slightly ugly, but at least we don't have two
- copies of the epilogue-emitting code. */
- start_sequence ();
-
- /* A NOTE_INSN_DELETED is supposed to be at the start
- and end of the "toplevel" insn chain. */
- emit_note (NOTE_INSN_DELETED);
- rs6000_emit_epilogue (FALSE);
- emit_note (NOTE_INSN_DELETED);
-
- /* Expand INSN_ADDRESSES so final() doesn't crash. */
- {
- rtx insn;
- unsigned addr = 0;
- for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn))
- {
- INSN_ADDRESSES_NEW (insn, addr);
- addr += 4;
- }
- }
-
- if (TARGET_DEBUG_STACK)
- debug_rtx_list (get_insns (), 100);
- final (get_insns (), file, FALSE);
- end_sequence ();
- }
- }
-
#if TARGET_MACHO
macho_branch_islands ();
/* Mach-O doesn't support labels at the end of objects, so if
(define_expand "sibcall_epilogue"
[(use (const_int 0))]
- "TARGET_SCHED_PROLOG"
- "
+ ""
{
- rs6000_emit_epilogue (TRUE);
- DONE;
-}")
+ if (!TARGET_SCHED_PROLOG)
+ emit_insn (gen_blockage ());
+ rs6000_emit_epilogue (TRUE);
+ DONE;
+})
;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
;; all of memory. This blocks insns from being moved across this point.
(define_expand "prologue"
[(use (const_int 0))]
- "TARGET_SCHED_PROLOG"
- "
+ ""
{
- rs6000_emit_prologue ();
- DONE;
-}")
+ rs6000_emit_prologue ();
+ if (!TARGET_SCHED_PROLOG)
+ emit_insn (gen_blockage ());
+ DONE;
+})
(define_insn "*movesi_from_cr_one"
[(match_parallel 0 "mfcr_operation"
(define_expand "epilogue"
[(use (const_int 0))]
- "TARGET_SCHED_PROLOG"
- "
+ ""
{
- rs6000_emit_epilogue (FALSE);
- DONE;
-}")
+ if (!TARGET_SCHED_PROLOG)
+ emit_insn (gen_blockage ());
+ rs6000_emit_epilogue (FALSE);
+ DONE;
+})
; On some processors, doing the mtcrf one CC register at a time is
; faster (like on the 604e). On others, doing them all at once is