From 74052a2ca86acc77e2ae4e1c16692e68c129e808 Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 13 Nov 2017 17:27:13 +0000 Subject: * tree-ssa-sink.c (select_best_block): Do not use frequencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254698 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-sink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-sink.c') diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 1c5d7dd7556..5d801d35921 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -226,8 +226,10 @@ select_best_block (basic_block early_bb, /* If BEST_BB is at the same nesting level, then require it to have significantly lower execution frequency to avoid gratutious movement. */ if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb) - && best_bb->count.to_frequency (cfun) - < (early_bb->count.to_frequency (cfun) * threshold / 100.0)) + /* If result of comparsion is unknown, preffer EARLY_BB. + Thus use !(...>=..) rather than (...<...) */ + && !(best_bb->count.apply_scale (100, 1) + > (early_bb->count.apply_scale (threshold, 1)))) return best_bb; /* No better block found, so return EARLY_BB, which happens to be the -- cgit v1.2.1