diff options
author | Eugene Rozenfeld <erozen@microsoft.com> | 2021-12-02 18:37:09 -0800 |
---|---|---|
committer | Eugene Rozenfeld <erozen@microsoft.com> | 2021-12-06 16:59:31 -0800 |
commit | 3d9e6767939e9658260e2506e81ec32b37cba041 (patch) | |
tree | 5c370b6ac6c2e973dffae64ef2678868dee685e4 /gcc/tree-ssa-propagate.c | |
parent | 3a580f967e55733303d2aa29d1f9e75bed81af83 (diff) | |
download | gcc-3d9e6767939e9658260e2506e81ec32b37cba041.zip gcc-3d9e6767939e9658260e2506e81ec32b37cba041.tar.gz gcc-3d9e6767939e9658260e2506e81ec32b37cba041.tar.bz2 |
Improve AutoFDO count propagation algorithm
When a basic block A has been annotated with a count and it has only one
successor (or predecessor) B, we can propagate the A's count to B.
The algoritm without this change could leave B without an annotation if B had
other unannotated predecessors (or successors). For example, in the test case I added,
the loop header block was left unannotated, which prevented loop unrolling.
gcc/ChangeLog:
* auto-profile.c (afdo_propagate_edge): Improve count propagation algorithm.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-prof/init-array.c: New test for unrolling inner loops.
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
0 files changed, 0 insertions, 0 deletions