From: Jan Hubicka Date: Mon, 13 Nov 2017 17:27:13 +0000 (+0100) Subject: * tree-ssa-sink.c (select_best_block): Do not use frequencies. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4017fd365a9f56d98dd6a4287b447ae12c423db;p=gcc.git * tree-ssa-sink.c (select_best_block): Do not use frequencies. From-SVN: r254698 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 241e9ca6ab1..beb406a9456 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-11-13 Jan Hubicka + + * tree-ssa-sink.c (select_best_block): Do not use frequencies. + 2017-11-13 Eric Botcazou PR lto/81351 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