[PATCH] D103026: [LoopUnroll] Explicitly specify exit to unroll against (NFCI)
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 14:45:16 PDT 2021
reames added a comment.
Not sure if this would work or not, but if the implementation allows, I might suggest computing the symbolic exit count for each loop upfront (before unrolling starts). Once you have that, there's a couple of cases:
- If Exit EC > UC, branch folds to untaken.
- If Exit EC == UC, then branch folds to untaken on all but one iteration, and taken on that iteration.
- If Exit EC < UC, we can clamp the UC.
Doing this as symbolic comparisons in the unroll implementation (as opposed to passing in a flag) seems likely to be more robust.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103026/new/
https://reviews.llvm.org/D103026
More information about the llvm-commits
mailing list