[PATCH] D77523: Add CanonicalizeFreezeInLoops pass
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 11:57:52 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp:116
+ assert(SteppingInst && "Increment operation isn't found!");
+ assert((SteppingInst->getOpcode() == Instruction::Add ||
+ SteppingInst->getOpcode() == Instruction::Sub) &&
----------------
What guarantees that SteppingInst is an add or sub?
================
Comment at: llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp:124
+ BasicBlock *StepBB = StepI->getParent();
+ if (L->contains(StepBB) && L->getLoopPreheader() != StepBB) {
+ // Step instruction is in the body. Freezing this can possibly block
----------------
If StepBB is inside the loop, it can't be the preheader.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77523/new/
https://reviews.llvm.org/D77523
More information about the llvm-commits
mailing list