Add edge predictions pruning
authorMartin Liska <mliska@suse.cz>
Thu, 9 Jun 2016 11:37:41 +0000 (13:37 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 9 Jun 2016 11:37:41 +0000 (11:37 +0000)
commite49efc14a17f32b2801dfa481081a0cabc083fe7
treee3753f419888a5394694e152cd1c15fd95083483
parent36d579866680fd2b45800b072527a9cce93235d0
Add edge predictions pruning

* analyze_brprob.py: Cover new dump output format.
* predict.c (dump_prediction): Add new argument.
(enum predictor_reason): New enum.
(struct predictor_hash): New struct.
(predictor_hash::hash): New function.
(predictor_hash::equal): Likewise.
(not_removed_prediction_p): New function.
(prune_predictions_for_bb): Likewise.
(combine_predictions_for_bb): Prune predictions.
* g++.dg/predict-loop-exit-1.C: Scan for a new dump format.
* g++.dg/predict-loop-exit-2.C: Likewise.
* g++.dg/predict-loop-exit-3.C: Likewise.
* gcc.dg/predict-1.c: Likewise.
* gcc.dg/predict-2.c: Likewise.
* gcc.dg/predict-3.c: Likewise.
* gcc.dg/predict-4.c: Likewise.
* gcc.dg/predict-5.c: Likewise.
* gcc.dg/predict-6.c: Likewise.
* gcc.dg/predict-7.c: Likewise.

From-SVN: r237255
15 files changed:
contrib/ChangeLog
contrib/analyze_brprob.py
gcc/ChangeLog
gcc/predict.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/predict-loop-exit-1.C
gcc/testsuite/g++.dg/predict-loop-exit-2.C
gcc/testsuite/g++.dg/predict-loop-exit-3.C
gcc/testsuite/gcc.dg/predict-1.c
gcc/testsuite/gcc.dg/predict-2.c
gcc/testsuite/gcc.dg/predict-3.c
gcc/testsuite/gcc.dg/predict-4.c
gcc/testsuite/gcc.dg/predict-5.c
gcc/testsuite/gcc.dg/predict-6.c
gcc/testsuite/gcc.dg/predict-7.c