diff options
author | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-12-20 21:10:09 -0600 |
---|---|---|
committer | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-12-20 21:10:46 -0600 |
commit | 46bfe1b0e11c4797c5926e0754fae2848026376c (patch) | |
tree | 5beec987ad5bc59b1bf4b2ef7f84aec397aaef6a /gcc/tree-ssa-loop-split.c | |
parent | 460d53f816fe30093653cb22ef0feeb4bddc0895 (diff) | |
download | gcc-46bfe1b0e11c4797c5926e0754fae2848026376c.zip gcc-46bfe1b0e11c4797c5926e0754fae2848026376c.tar.gz gcc-46bfe1b0e11c4797c5926e0754fae2848026376c.tar.bz2 |
Fix incorrect loop exit edge probability [PR103270]
r12-4526 cancelled jump thread path rotates loop. It exposes a issue in
profile-estimate when predict_extra_loop_exits, outer loop's exit edge
is marked as inner loop's extra loop exit and set with incorrect
prediction, then a hot inner loop will become cold loop finally through
optimizations, this patch add loop check when searching extra exit edges
to avoid unexpected predict_edge from predict_paths_for_bb.
Regression tested on P8LE.
gcc/ChangeLog:
2021-12-21 Xionghu Luo <luoxhu@linux.ibm.com>
PR middle-end/103270
* predict.c (predict_extra_loop_exits): Add loop parameter.
(predict_loops): Call with loop argument.
gcc/testsuite/ChangeLog:
2021-12-21 Xionghu Luo <luoxhu@linux.ibm.com>
PR middle-end/103270
* gcc.dg/pr103270.c: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-split.c')
0 files changed, 0 insertions, 0 deletions