[PATCH] D106001: [WIP][NFC] factor out unrolling decision logic
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 10:40:03 PDT 2021
mtrofin accepted this revision.
mtrofin added a comment.
This revision is now accepted and ready to land.
Some nits, but lgtm assuming nits are fixed, tests pass, and also the message of this review is updated (e.g. remove WIP, and add a description for the change)
Wait for @jdoerfert if he has more feedback, too.
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:799
+ // if didn't return until here, should continue to other priorties
+ return {};
+}
----------------
return None; (same below)
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:917
+ if (UnrollFactor) {
+ UP.Count = UnrollFactor.value_or(0);
+ if (UnrollCount.getNumOccurrences() > 0 | PragmaCount > 0) {
----------------
Up.Count = *UnrollFactor. The check above ensures the dereference succeeds.
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:976
+ if (UnrollFactor) {
+ UP.Count = UnrollFactor.value_or(0);
+ UseUpperBound = (FullUnrollMaxTripCount == FullUnrollTripCount);
----------------
same as above - *UnrollFactor
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:1012
+ if (UnrollFactor) {
+ UP.Count = UnrollFactor.value_or(0);
+
----------------
same as above - *UnrollFactor
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106001/new/
https://reviews.llvm.org/D106001
More information about the llvm-commits
mailing list