aboutsummaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-20 16:27:41 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-20 14:27:41 +0000
commit584bafb66df106ddbc5ef6749462ca2375fa0086 (patch)
tree347eff4c6f1ad37ce7f28425bb6dba62cb103266 /gcc/bb-reorder.c
parent0574d9aeacfbac33ab161fcb4962133a54abef31 (diff)
downloadgcc-584bafb66df106ddbc5ef6749462ca2375fa0086.zip
gcc-584bafb66df106ddbc5ef6749462ca2375fa0086.tar.gz
gcc-584bafb66df106ddbc5ef6749462ca2375fa0086.tar.bz2
bb-reorder.c (connect_traces): Allow copying of blocks within single partition.
* bb-reorder.c (connect_traces): Allow copying of blocks within single partition. From-SVN: r250390
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 17a1ea3..3b7278f 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1302,16 +1302,15 @@ connect_traces (int n_traces, struct trace *traces)
}
}
- if (crtl->has_bb_partition)
- try_copy = false;
-
/* Copy tiny blocks always; copy larger blocks only when the
edge is traversed frequently enough. */
if (try_copy
+ && BB_PARTITION (best->src) == BB_PARTITION (best->dest)
&& copy_bb_p (best->dest,
optimize_edge_for_speed_p (best)
&& EDGE_FREQUENCY (best) >= freq_threshold
- && best->count >= count_threshold))
+ && (!best->count.initialized_p ()
+ || best->count >= count_threshold)))
{
basic_block new_bb;