aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-04 15:42:22 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-04 13:42:22 +0000
commitcea768b0caa43d0957d752933bb43f3d73bfed69 (patch)
treeecd90f4cad54db5c8483a1a24d021d72c83f9ec9 /gcc
parent4741e46d775429fe32086dd93ced7ea86644eba2 (diff)
downloadgcc-cea768b0caa43d0957d752933bb43f3d73bfed69.zip
gcc-cea768b0caa43d0957d752933bb43f3d73bfed69.tar.gz
gcc-cea768b0caa43d0957d752933bb43f3d73bfed69.tar.bz2
* haifa-sched.c (sched_create_recovery_edges): Update profile.
From-SVN: r249967
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/haifa-sched.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a1659d..89678c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2017-07-04 Jan Hubicka <hubicka@ucw.cz>
+ * haifa-sched.c (sched_create_recovery_edges): Update profile.
+
+2017-07-04 Jan Hubicka <hubicka@ucw.cz>
+
* bb-reorder.c (better_edge_p): Fix handling of uninitialized
probability.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 9632a6d..af0ed27 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -8302,7 +8302,19 @@ sched_create_recovery_edges (basic_block first_bb, basic_block rec,
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);
+
+ /* TODO: The actual probability can be determined and is computed as
+ 'todo_spec' variable in create_check_block_twin and
+ in sel-sched.c `check_ds' in create_speculation_check. */
+ 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));