[PATCH] D73058: [LoopRotate] add ability to repeat loop rotation until non-deoptimizing exit is found
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 18:51:39 PST 2020
skatkov added a comment.
paranoia: Consider splitting this patch into two parts. The first one by default disables multi-exit, while the second one just switch flag on.
================
Comment at: llvm/lib/Transforms/Utils/LoopRotationUtils.cpp:232
+ return any_of(Exits, [](const BasicBlock *BB) {
+ return !BB->getPostdominatingDeoptimizeCall();
+ });
----------------
Side comment, May be it makes sense to keep note here in comment.
As I understand getPostdominatingDeoptimizeCall may return false even if it ends with deopt. Say if you have a loop before deoptimization. In this case there is no need to rotate but we will do.
================
Comment at: llvm/lib/Transforms/Utils/LoopRotationUtils.cpp:570
+ // to handle multiple rotations in one go.
+ rotateLoop(L, false);
+ }
----------------
Does'not you want to convert this recursion into iteration by moving this code to LoopRotate::processLoop?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73058/new/
https://reviews.llvm.org/D73058
More information about the llvm-commits
mailing list