@@ -4421,21 +4421,16 @@ force_edge_cold (edge e, bool impossible)
4421
4421
there. */
4422
4422
else if (prob_sum > profile_probability::never ())
4423
4423
{
4424
- if (!(e->probability < goal))
4425
- e->probability = goal;
4426
-
4427
- profile_probability prob_comp = prob_sum / e->probability .invert ();
4428
-
4429
4424
if (dump_file && (dump_flags & TDF_DETAILS))
4430
- fprintf (dump_file, " Making edge %i->%i %s by redistributing "
4431
- " probability to other edges. \n " ,
4432
- e-> src -> index , e-> dest -> index ,
4433
- impossible ? " impossible " : " cold " );
4434
- FOR_EACH_EDGE ( e2 , ei, e-> src -> succs )
4435
- if ( e2 != e)
4436
- {
4437
- e2 -> probability /= prob_comp;
4438
- }
4425
+ {
4426
+ fprintf (dump_file, " Making edge %i->%i %s by redistributing "
4427
+ " probability to other edges. Original probability: " ,
4428
+ e-> src -> index , e-> dest -> index ,
4429
+ impossible ? " impossible " : " cold " );
4430
+ e-> probability . dump (dump_file);
4431
+ fprintf (dump_file, " \n " );
4432
+ }
4433
+ set_edge_probability_and_rescale_others (e, goal);
4439
4434
if (current_ir_type () != IR_GIMPLE
4440
4435
&& e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun))
4441
4436
update_br_prob_note (e->src );
0 commit comments