forked from OSchip/llvm-project
[VPlan] Use isa<> instead getVPRecipeID in getFirstNonPhi (NFC).
As per the comment in VPRecipeBase, clients should not rely on getVPRecipeID, as it may change in the future. It should only be used in classof implementations. Use isa instead in getFirstNonPhi.
This commit is contained in:
parent
b7c91a9b8e
commit
aa1a198a64
|
@ -213,11 +213,10 @@ void VPBlockBase::deleteCFG(VPBlockBase *Entry) {
|
||||||
|
|
||||||
VPBasicBlock::iterator VPBasicBlock::getFirstNonPhi() {
|
VPBasicBlock::iterator VPBasicBlock::getFirstNonPhi() {
|
||||||
iterator It = begin();
|
iterator It = begin();
|
||||||
while (It != end() &&
|
while (It != end() && (isa<VPWidenPHIRecipe>(&*It) ||
|
||||||
(It->getVPRecipeID() == VPRecipeBase::VPWidenPHISC ||
|
isa<VPWidenIntOrFpInductionRecipe>(&*It) ||
|
||||||
It->getVPRecipeID() == VPRecipeBase::VPWidenIntOrFpInductionSC ||
|
isa<VPPredInstPHIRecipe>(&*It) ||
|
||||||
It->getVPRecipeID() == VPRecipeBase::VPPredInstPHISC ||
|
isa<VPWidenCanonicalIVRecipe>(&*It)))
|
||||||
It->getVPRecipeID() == VPRecipeBase::VPWidenCanonicalIVSC))
|
|
||||||
It++;
|
It++;
|
||||||
return It;
|
return It;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue