[PATCH] D72420: [LoopRotate] Add support for rotating loops with switch exit
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 6 15:24:44 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopRotationUtils.cpp:222
return false;
// If the loop header is not one of the loop exiting blocks then
----------------
asbirlea wrote:
> I'm missing why not keep the check&exit if Term is a branch and it's unconditional.
Unconditional branches will be rejected by the next check (`!L->isLoopExiting(OrigHeader)`) already, so it's not necessary to explicitly check for them. As this code no longer stores the BranchInst, I found it nicer to omit the check here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72420/new/
https://reviews.llvm.org/D72420
More information about the llvm-commits
mailing list