aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2023-07-08 17:38:09 +0200
committerJan Hubicka <jh@suse.cz>2023-07-08 17:38:09 +0200
commit15bbf1826a01f5beb2d7c0f74d6270bbc94ece91 (patch)
tree91f414cf14ee54effb9c9f1643ce1c87ab26b50f /gcc/d/expr.cc
parentb1079fc88f082d3c5b583c8822c08c5647810259 (diff)
downloadgcc-15bbf1826a01f5beb2d7c0f74d6270bbc94ece91.zip
gcc-15bbf1826a01f5beb2d7c0f74d6270bbc94ece91.tar.gz
gcc-15bbf1826a01f5beb2d7c0f74d6270bbc94ece91.tar.bz2
Fix tree-ssa/update-cunroll.c
In this testcase the profile is misupdated before loop has two exits. The first exit is one eliminated by complete unrolling while second exit remains. We remove first exit but forget about fact that the source BB of other exit will then have higher frequency making other exit more likely. This patch fixes that in duplicate_loop_body_to_header_edge. While looking into resulting profiles I also noticed that in some cases scale_loop_profile may drop probabilities to 0 incorrectly either when trying to update exit from nested loop (which has similar problem) or when the profile was inconsistent as described in coment bellow. gcc/ChangeLog: PR middle-end/110590 * cfgloopmanip.cc (scale_loop_profile): Avoid scaling exits within inner loops and be more careful about inconsistent profiles. (duplicate_loop_body_to_header_edge): Fix profile update when eliminated exit is followed by other exit. gcc/testsuite/ChangeLog: PR middle-end/110590 * gcc.dg/tree-prof/update-cunroll-2.c: Remove xfail. * gcc.dg/tree-ssa/update-cunroll.c: Likewise.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions