OSDN Git Service

* reorg.c (dbr_schedule): Do not run the delay slot
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 1993 20:33:32 +0000 (20:33 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 1993 20:33:32 +0000 (20:33 +0000)
scheduling pass if the current function has no insns
other than the prologue and epilogue.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4252 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/reorg.c

index 9948a91..e652225 100644 (file)
@@ -3893,6 +3893,11 @@ dbr_schedule (first, file)
   flag_no_peephole = old_flag_no_peephole;
 #endif
 
+  /* If the current function has no insns other than the prologue and 
+     epilogue, then do not try to fill any delay slots.  */
+  if (n_basic_blocks == 0)
+    return;
+
   /* Find the highest INSN_UID and allocate and initialize our map from
      INSN_UID's to position in code.  */
   for (max_uid = 0, insn = first; insn; insn = NEXT_INSN (insn))