aboutsummaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2012-10-08 11:26:16 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2012-10-08 11:26:16 +0000
commit975ccf2291fe0b1bf5d8a7cc0245fa35ed0df8dc (patch)
tree189eaf3a2d0889ab0f7111d7f11b37bda6412bc9 /gcc/haifa-sched.c
parent1e422ffff35dd27469eec04f5feb2041d95e2f4b (diff)
downloadgcc-975ccf2291fe0b1bf5d8a7cc0245fa35ed0df8dc.zip
gcc-975ccf2291fe0b1bf5d8a7cc0245fa35ed0df8dc.tar.gz
gcc-975ccf2291fe0b1bf5d8a7cc0245fa35ed0df8dc.tar.bz2
sched-int.h (schedule_block): Adjust declaration.
* sched-int.h (schedule_block): Adjust declaration. * sched-rgn.c (bb_state_array, bb_state): New static variables. (sched_rgn_init): Initialize them. (sched_rgn_free): Free them. (schedule_region): Save scheduling state for future blocks, and pass such state to schedule_block. * params.def (PARAM_SCHED_STATE_EDGE_PROB_CUTOFF): New. * doc/invoke.texi (--param): Document it. * haifa-sched.c (schedule_block): New arg init_state. Use it to initialize state if nonnull. All callers changed. Call advance_one_cycle after scheduling. From-SVN: r192203
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 8072beb..f45caf4 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -5840,7 +5840,7 @@ verify_shadows (void)
region. */
bool
-schedule_block (basic_block *target_bb)
+schedule_block (basic_block *target_bb, state_t init_state)
{
int i;
bool success = modulo_ii == 0;
@@ -5875,7 +5875,10 @@ schedule_block (basic_block *target_bb)
if (sched_verbose)
dump_new_block_header (0, *target_bb, head, tail);
- state_reset (curr_state);
+ if (init_state == NULL)
+ state_reset (curr_state);
+ else
+ memcpy (curr_state, init_state, dfa_state_size);
/* Clear the ready list. */
ready.first = ready.veclen - 1;
@@ -6335,6 +6338,7 @@ schedule_block (basic_block *target_bb)
if (ls.modulo_epilogue)
success = true;
end_schedule:
+ advance_one_cycle ();
perform_replacements_new_cycle ();
if (modulo_ii > 0)
{