predict.c (set_even_probabilities): Include also unlikely_count in calculation.
authorMartin Liska <mliska@suse.cz>
Mon, 31 Dec 2018 13:46:08 +0000 (14:46 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 31 Dec 2018 13:46:08 +0000 (13:46 +0000)
commitb3282dfe1a1601accd3bd012898c2bc807e0d078
treef6a353dcdd9481af9384378d339ef833ae34ac6d
parent41ee4e75ab27ebf63d1512fc56e673fdee74e8aa
predict.c (set_even_probabilities): Include also unlikely_count in calculation.

).

2018-12-31  Martin Liska  <mliska@suse.cz>

* predict.c (set_even_probabilities): Include also
unlikely_count in calculation.
(combine_predictions_for_bb): Consider also HOT and
COLD labels predictions.
* predict.def (PRED_HOT_LABEL): Move it just after
__builtin_expect_with_probability predictor.
(PRED_COLD_LABEL): Likewise.
2018-12-31  Martin Liska  <mliska@suse.cz>

* g++.dg/predict-2.C: New test.
* g++.dg/predict-3.C: New test.
* g++.dg/predict-4.C: New test.
* gcc.dg/tree-ssa/attr-hotcold-2.c: Adjust test-case.

From-SVN: r267485
gcc/ChangeLog
gcc/predict.c
gcc/predict.def
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/predict-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/predict-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/predict-4.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c