aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index d0a8e5f8..d9c7249 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -1949,7 +1949,7 @@ predict_loops (void)
/* Try to predict out blocks in a loop that are not part of a
natural loop. */
- FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
+ for (auto loop : loops_list (cfun, LI_FROM_INNERMOST))
{
basic_block bb, *bbs;
unsigned j, n_exits = 0;
@@ -3106,7 +3106,6 @@ tree_estimate_probability (bool dry_run)
{
basic_block bb;
- add_noreturn_fake_exit_edges ();
connect_infinite_loops_to_exit ();
/* We use loop_niter_by_eval, which requires that the loops have
preheaders. */
@@ -4096,8 +4095,6 @@ pass_profile::execute (function *fun)
if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0);
- mark_irreducible_loops ();
-
nb_loops = number_of_loops (fun);
if (nb_loops > 1)
scev_initialize ();
@@ -4114,8 +4111,7 @@ pass_profile::execute (function *fun)
profile_status_for_fn (fun) = PROFILE_GUESSED;
if (dump_file && (dump_flags & TDF_DETAILS))
{
- class loop *loop;
- FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
+ for (auto loop : loops_list (cfun, LI_FROM_INNERMOST))
if (loop->header->count.initialized_p ())
fprintf (dump_file, "Loop got predicted %d to iterate %i times.\n",
loop->num,
@@ -4290,9 +4286,7 @@ rebuild_frequencies (void)
if (profile_status_for_fn (cfun) == PROFILE_GUESSED)
{
- loop_optimizer_init (0);
- add_noreturn_fake_exit_edges ();
- mark_irreducible_loops ();
+ loop_optimizer_init (LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS);
connect_infinite_loops_to_exit ();
estimate_bb_frequencies (true);
remove_fake_exit_edges ();
@@ -4320,8 +4314,6 @@ report_predictor_hitrates (void)
if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0);
- mark_irreducible_loops ();
-
nb_loops = number_of_loops (cfun);
if (nb_loops > 1)
scev_initialize ();