diff options
| author | Joel E. Denny <jdenny.ornl@gmail.com> | 2025-10-31 11:01:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-31 11:01:42 -0400 |
| commit | cc8ff73fbab875e33071b23ff6e4b512d5adf64e (patch) | |
| tree | 8d87b9c6fca0ec9e0f0094dc21f9afda240ceaa0 /flang/lib/Support/Fortran.cpp | |
| parent | 37e7ef0998b0b79fefd811a807d24d9d71033239 (diff) | |
| download | llvm-cc8ff73fbab875e33071b23ff6e4b512d5adf64e.zip llvm-cc8ff73fbab875e33071b23ff6e4b512d5adf64e.tar.gz llvm-cc8ff73fbab875e33071b23ff6e4b512d5adf64e.tar.bz2 | |
[LoopUnroll] Fix block frequencies for epilogue (#159163)
As another step in issue #135812, this patch fixes block frequencies for
partial loop unrolling with an epilogue remainder loop. It does not
fully handle the case when the epilogue loop itself is unrolled. That
will be handled in the next patch.
For the guard and latch of each of the unrolled loop and epilogue loop,
this patch sets branch weights derived directly from the original loop
latch branch weights. The total frequency of the original loop body,
summed across all its occurrences in the unrolled loop and epilogue
loop, is the same as in the original loop. This patch also sets
`llvm.loop.estimated_trip_count` for the epilogue loop instead of
relying on the epilogue's latch branch weights to imply it.
This patch fixes branch weights in tests that PR #157754 adversely
affected.
Diffstat (limited to 'flang/lib/Support/Fortran.cpp')
0 files changed, 0 insertions, 0 deletions
