[IndVars] Use phis() (NFC)

This commit is contained in:
Nikita Popov 2022-02-25 12:07:49 +01:00
parent b48e3c805c
commit 4736e57199
1 changed files with 4 additions and 4 deletions

View File

@ -605,10 +605,10 @@ bool IndVarSimplify::simplifyAndExtend(Loop *L,
Intrinsic::getName(Intrinsic::experimental_guard));
bool HasGuards = GuardDecl && !GuardDecl->use_empty();
SmallVector<PHINode*, 8> LoopPhis;
for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
LoopPhis.push_back(cast<PHINode>(I));
}
SmallVector<PHINode *, 8> LoopPhis;
for (PHINode &PN : L->getHeader()->phis())
LoopPhis.push_back(&PN);
// Each round of simplification iterates through the SimplifyIVUsers worklist
// for all current phis, then determines whether any IVs can be
// widened. Widening adds new phis to LoopPhis, inducing another round of