OSDN Git Service

* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jul 2011 15:38:54 +0000 (15:38 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jul 2011 15:38:54 +0000 (15:38 +0000)
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

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md

index dfef1fb..9291ee8 100644 (file)
@@ -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.
        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>
index 475c104..a25e5af 100644 (file)
@@ -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
index 8c0e299..a404448 100644 (file)
 
 (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