diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-09 15:38:54 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-09 15:38:54 +0000 |
commit | 55c768a25d260f34c4addf7291cfed8c60c59d07 (patch) | |
tree | 1a583bd73cbd8f60abb61f707a38a9b9f8be16da | |
parent | dd598fe6642de8bd65466bfc0febfdc047e0440e (diff) | |
download | gcc-55c768a25d260f34c4addf7291cfed8c60c59d07.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176081 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 70 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 33 |
3 files changed, 29 insertions, 87 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfef1fb5c6d..9291ee814d6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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. @@ -864,10 +873,10 @@ 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> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 475c10485f8..a25e5af488b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20570,39 +20570,6 @@ rs6000_output_function_prologue (FILE *file, 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++; } @@ -21413,43 +21380,6 @@ static void 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 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 8c0e299a2e7..a4044489692 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -13025,12 +13025,13 @@ (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. @@ -15791,12 +15792,13 @@ (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" @@ -15946,12 +15948,13 @@ (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 |