From c3b80729bb95b2137da7039f489c6de1092ed4ef Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 27 Apr 1993 14:33:32 -0600 Subject: [PATCH] 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 --- gcc/reorg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/reorg.c b/gcc/reorg.c index 9948a91844c..e652225ccae 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)) -- 2.30.2