Hi,
this is another bug I noticed while looking into Itanium rgression.
There is no profile attached to recovery blocks in scheduler.
I made them very unlikely, but I wonder if we can do better? After all
we probably know the probability of path that will lead for speculation
to suceed?
Honza
* haifa-sched.c (sched_create_recovery_edges): Update profile after
creating recovery edges.
Index: haifa-sched.c
===================================================================
--- haifa-sched.c (revision 249928)
+++ haifa-sched.c (working copy)
@@ -8302,7 +8302,15 @@ sched_create_recovery_edges (basic_block
else
edge_flags = 0;
- make_edge (first_bb, rec, edge_flags);
+ edge e2 = single_succ_edge (first_bb);
+ edge e = make_edge (first_bb, rec, edge_flags);
+ e->probability = profile_probability::very_unlikely ();
+ e->count = first_bb->count.apply_probability (e->probability);
+ rec->count = e->count;
+ rec->frequency = EDGE_FREQUENCY (e);
+ e2->probability = e->probability.invert ();
+ e2->count = first_bb->count - e2->count;
+
rtx_code_label *label = block_label (second_bb);
rtx_jump_insn *jump = emit_jump_insn_after (targetm.gen_jump (label),
BB_END (rec));