aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-07-14 06:51:23 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-07-14 06:51:23 -0400
commit6ed545b124429c80a5dd7dd74673035880242060 (patch)
tree6473882039c26b5019ac81dddd386daacba15268 /gcc/sched.c
parent4fac99c8564b9aecee4ae3b388bb6e566400687e (diff)
downloadgcc-6ed545b124429c80a5dd7dd74673035880242060.zip
gcc-6ed545b124429c80a5dd7dd74673035880242060.tar.gz
gcc-6ed545b124429c80a5dd7dd74673035880242060.tar.bz2
(schedule_block): Free space associated with reg_pending_sets and old_live_regs.
(schedule_block): Free space associated with reg_pending_sets and old_live_regs. (schedule_insns): Free bb_{dead,live}_regs on first pass. (sched_analyze_insn): Use EXECUTE_IF_SET_IN_REG_SET and then clear. From-SVN: r14426
Diffstat (limited to 'gcc/sched.c')
-rw-r--r--gcc/sched.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/gcc/sched.c b/gcc/sched.c
index 8b71468..84fe84d 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -2128,10 +2128,11 @@ sched_analyze_insn (x, insn, loop_notes)
sched_analyze_2 (XEXP (note, 0), insn);
}
- EXECUTE_IF_SET_AND_RESET_IN_REG_SET (reg_pending_sets, 0, i,
- {
- reg_last_sets[i] = insn;
- });
+ EXECUTE_IF_SET_IN_REG_SET (reg_pending_sets, 0, i,
+ {
+ reg_last_sets[i] = insn;
+ });
+ CLEAR_REG_SET (reg_pending_sets);
if (reg_pending_sets_all)
{
@@ -3254,7 +3255,7 @@ schedule_block (b, file)
to schedule this block. */
if (head == tail
&& (GET_CODE (head) == NOTE || GET_CODE (head) == CODE_LABEL))
- return;
+ goto ret;
#if 0
/* This short-cut doesn't work. It does not count call insns crossed by
@@ -3267,7 +3268,7 @@ schedule_block (b, file)
has one insn, so this won't slow down this pass by much. */
if (head == tail)
- return;
+ goto ret;
#endif
/* Now HEAD through TAIL are the insns actually to be rearranged;
@@ -3292,7 +3293,7 @@ schedule_block (b, file)
if (n_insns == 0)
{
free_pending_lists ();
- return;
+ goto ret;
}
/* Allocate vector to hold insns to be rearranged (except those
@@ -3422,7 +3423,7 @@ schedule_block (b, file)
finish_sometimes_live (regs_sometimes_live, sometimes_max);
}
free_pending_lists ();
- return;
+ goto ret;
}
#endif
@@ -4081,6 +4082,10 @@ schedule_block (b, file)
/* Yow! We're done! */
free_pending_lists ();
+ret:
+ FREE_REG_SET (reg_pending_sets);
+ FREE_REG_SET (old_live_regs);
+
return;
}
@@ -5066,5 +5071,12 @@ schedule_insns (dump_file)
REG_N_CALLS_CROSSED (regno) = sched_reg_n_calls_crossed[regno];
}
}
+
+ if (reload_completed == 0)
+ {
+ FREE_REG_SET (bb_dead_regs);
+ FREE_REG_SET (bb_live_regs);
+ }
+
}
#endif /* INSN_SCHEDULING */