aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-04-27 14:33:32 -0600
committerJeff Law <law@gcc.gnu.org>1993-04-27 14:33:32 -0600
commitc3b80729bb95b2137da7039f489c6de1092ed4ef (patch)
treec6cbf26f6787d86f74485ebf1563ee9d7ed58bfc /gcc
parent440954b521edef780df94889965552b81922869e (diff)
downloadgcc-c3b80729bb95b2137da7039f489c6de1092ed4ef.zip
gcc-c3b80729bb95b2137da7039f489c6de1092ed4ef.tar.gz
gcc-c3b80729bb95b2137da7039f489c6de1092ed4ef.tar.bz2
reorg.c (dbr_schedule): Do not run the delay slot scheduling pass if...
* reorg.c (dbr_schedule): Do not run the delay slot scheduling pass if the current function has no insns other than the prologue and epilogue. From-SVN: r4252
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reorg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 9948a91..e652225 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -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))