[PATCH] D30161: [LoopPeeling] Peel loops with invariant backedge Phi input
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 24 17:30:29 PST 2017
reames added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:118
+ PHINode *Phi;
+ for (auto BI = Header->begin(); (Phi = dyn_cast<PHINode>(&*BI)); ++BI) {
+ Value *Input = Phi->getIncomingValueForBlock(BackEdge);
----------------
Out of curiosity, why the complexity about finding the backedge? Wouldn't *all* of the inputs to the phi be loop invariant in the case you're interested in?
https://reviews.llvm.org/D30161
More information about the llvm-commits
mailing list