Skip to content

Commit 470f797

Browse files
committed
Attempt gcc-mirror#2.
1 parent 7adb06e commit 470f797

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

gcc/predict.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,8 @@ combine_predictions_for_bb (basic_block bb, bool dry_run)
12911291
}
12921292
clear_bb_predictions (bb);
12931293

1294-
if (!bb->count.initialized_p () && !dry_run)
1294+
if (!first->probability.initialized_p ()
1295+
&& !second->probability.initialized_p() && !dry_run)
12951296
{
12961297
first->probability
12971298
= profile_probability::from_reg_br_prob_base (combined_probability);
@@ -3448,7 +3449,7 @@ determine_unlikely_bbs ()
34483449
if (dump_file && (dump_flags & TDF_DETAILS))
34493450
fprintf (dump_file, "Basic block %i is locally unlikely\n",
34503451
bb->index);
3451-
bb->count = profile_count::guessed_zero ();
3452+
bb->count = profile_count::zero ();
34523453
}
34533454

34543455
if (bb->count == profile_count::zero ())
@@ -3465,7 +3466,7 @@ determine_unlikely_bbs ()
34653466
if (dump_file && (dump_flags & TDF_DETAILS))
34663467
fprintf (dump_file, "Edge %i->%i is locally unlikely\n",
34673468
bb->index, e->dest->index);
3468-
e->count = profile_count::guessed_zero ();
3469+
e->count = profile_count::zero ();
34693470
}
34703471

34713472
gcc_checking_assert (!bb->aux);
@@ -3511,12 +3512,12 @@ determine_unlikely_bbs ()
35113512
fprintf (dump_file,
35123513
"Basic block %i is marked unlikely by backward prop\n",
35133514
bb->index);
3514-
bb->count = profile_count::guessed_zero ();
3515+
bb->count = profile_count::zero ();
35153516
bb->frequency = 0;
35163517
FOR_EACH_EDGE (e, ei, bb->preds)
35173518
if (!(e->count == profile_count::zero ()))
35183519
{
3519-
e->count = profile_count::guessed_zero ();
3520+
e->count = profile_count::zero ();
35203521
if (!(e->src->count == profile_count::zero ()))
35213522
{
35223523
nsuccs[e->src->index]--;

0 commit comments

Comments
 (0)