predict.c (maybe_hot_bb_p): Do not check profile status.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 8 Jun 2017 13:16:44 +0000 (15:16 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 8 Jun 2017 13:16:44 +0000 (13:16 +0000)
commitb69d9ac6a9f6fae426080c77ce4a395fafb49a5f
tree70e06d0d036ff5e480b61732710afb7406205bfd
parentc46f9051654ff52ed083084c109e9247b7fce9aa
predict.c (maybe_hot_bb_p): Do not check profile status.

* predict.c (maybe_hot_bb_p): Do not check profile status.
(maybe_hot_edge_p): Likewise.
(probably_never_executed): Check for zero counts even if profile
is not read.
(unlikely_executed_edge_p): New function.
(unlikely_executed_stmt_p): New function.
(unlikely_executed_bb_p): New function.
(set_even_probabilities): Use unlikely predicates.
(combine_predictions_for_bb): Likewise.
(predict_paths_for_bb): Likewise.
(predict_paths_leading_to_edge): Likewise.
(determine_unlikely_bbs): New function.
(estimate_bb_frequencies): Use it.
(compute_function_frequency): Use zero counts even if profile is
not read.
* profile-count.h: Fix typo.

* g++.dg/tree-ssa/counts-1.C: New testcase.
* gcc.dg/tree-ssa/counts-1.c: New testcase.

From-SVN: r249013
gcc/ChangeLog
gcc/predict.c
gcc/profile-count.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/counts-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/counts-1.c [new file with mode: 0644]