Lines Matching refs:PHINode
136 isa<PHINode>(BBI); ++BBI) { in SafeToMergeTerminators()
137 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators()
154 SmallVectorImpl<PHINode*> &PhiNodes) { in isProfitableToFoldUnconditional()
177 isa<PHINode>(BBI); ++BBI) { in isProfitableToFoldUnconditional()
178 PHINode *PN = cast<PHINode>(BBI); in isProfitableToFoldUnconditional()
193 if (!isa<PHINode>(Succ->begin())) return; // Quick exit if nothing to do in AddPredecessorToBlock()
195 PHINode *PN; in AddPredecessorToBlock()
197 (PN = dyn_cast<PHINode>(I)); ++I) in AddPredecessorToBlock()
985 PHINode *PN; in isSafeToHoistInvoke()
987 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in isSafeToHoistInvoke()
1023 if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) || in HoistThenElseCodeToIf()
1067 PHINode *PN; in HoistThenElseCodeToIf()
1069 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in HoistThenElseCodeToIf()
1098 PHINode *PN; in HoistThenElseCodeToIf()
1100 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in HoistThenElseCodeToIf()
1152 std::map<Value*, std::pair<Value*, PHINode*> > MapValueFromBB1ToBB2; in SinkThenElseCodeToEnd()
1156 if (PHINode *PN = dyn_cast<PHINode>(I)) { in SinkThenElseCodeToEnd()
1200 if (isa<PHINode>(I1) || isa<PHINode>(I2) || in SinkThenElseCodeToEnd()
1257 PHINode *NewPN = PHINode::Create(DifferentOp1->getType(), 2, in SinkThenElseCodeToEnd()
1267 PHINode *OldPN = MapValueFromBB1ToBB2[I1].second; in SinkThenElseCodeToEnd()
1480 PHINode *PN = dyn_cast<PHINode>(I); ++I) { in SpeculativelyExecuteBB()
1539 PHINode *PN = dyn_cast<PHINode>(I); ++I) { in SpeculativelyExecuteBB()
1594 if (UI->getParent() != BB || isa<PHINode>(UI)) return false; in BlockIsSimpleEnoughToThreadThrough()
1609 PHINode *PN = dyn_cast<PHINode>(BI->getCondition()); in FoldCondBranchOnPHI()
1659 if (PHINode *PN = dyn_cast<PHINode>(BBI)) { in FoldCondBranchOnPHI()
1705 static bool FoldTwoEntryPHINode(PHINode *PN, const DataLayout *DL) { in FoldTwoEntryPHINode()
1726 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++NumPhis, ++I) in FoldTwoEntryPHINode()
1737 for (BasicBlock::iterator II = BB->begin(); isa<PHINode>(II);) { in FoldTwoEntryPHINode()
1738 PHINode *PN = cast<PHINode>(II++); in FoldTwoEntryPHINode()
1754 PN = dyn_cast<PHINode>(BB->begin()); in FoldTwoEntryPHINode()
1817 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldTwoEntryPHINode()
1876 if (PHINode *TVPN = dyn_cast_or_null<PHINode>(TrueValue)) in SimplifyCondBranchToTwoReturns()
1879 if (PHINode *FVPN = dyn_cast_or_null<PHINode>(FalseValue)) in SimplifyCondBranchToTwoReturns()
2061 SmallVector<PHINode*, 4> PHIs; in FoldBranchToCommonDest()
2321 PHINode *NewPN = PHINode::Create(Type::getInt1Ty(BB->getContext()), in SimplifyCondBranchToCondBranch()
2391 isa<PHINode>(II); ++II, ++NumPhis) { in SimplifyCondBranchToCondBranch()
2395 PHINode *PN = cast<PHINode>(II); in SimplifyCondBranchToCondBranch()
2489 PHINode *PN; in SimplifyCondBranchToCondBranch()
2491 (PN = dyn_cast<PHINode>(II)); ++II) { in SimplifyCondBranchToCondBranch()
2657 if (isa<PHINode>(BB->begin()) || !ICI->hasOneUse()) return false; in TryToSimplifyUncondBranchWithICmpInIt()
2707 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back()); in TryToSimplifyUncondBranchWithICmpInIt()
2709 isa<PHINode>(++BasicBlock::iterator(PHIUse))) in TryToSimplifyUncondBranchWithICmpInIt()
2855 isa<PHINode>(BBI); ++BBI) { in SimplifyBranchOnICmpChain()
2856 PHINode *PN = cast<PHINode>(BBI); in SimplifyBranchOnICmpChain()
3095 if (isa<PHINode>(MaxBlock->begin())) in SimplifyUnreachable()
3200 isa<PHINode>(BBI); ++BBI) { in TurnSwitchRangeIntoICmp()
3202 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent()); in TurnSwitchRangeIntoICmp()
3264 static PHINode *FindPHIForConditionForwarding(ConstantInt *CaseValue, in FindPHIForConditionForwarding()
3279 while (PHINode *PHI = dyn_cast<PHINode>(I++)) { in FindPHIForConditionForwarding()
3298 typedef DenseMap<PHINode*, SmallVector<int,4> > ForwardingNodesMap; in ForwardSwitchConditionToPHI()
3306 PHINode *PHI = FindPHIForConditionForwarding(CaseValue, CaseDest, in ForwardSwitchConditionToPHI()
3317 PHINode *Phi = I->first; in ForwardSwitchConditionToPHI()
3400 SmallVectorImpl<std::pair<PHINode *, Constant *> > &Res, in GetCaseResults() argument
3437 while (PHINode *PHI = dyn_cast<PHINode>(I++)) { in GetCaseResults()
3660 const SmallDenseMap<PHINode*, Type*>& ResultTypes) { in ShouldBuildLookupTable() argument
3666 for (SmallDenseMap<PHINode*, Type*>::const_iterator I = ResultTypes.begin(), in ShouldBuildLookupTable()
3732 SmallDenseMap<PHINode*, ResultListTy> ResultLists; in SwitchToLookupTable()
3733 SmallDenseMap<PHINode*, Constant*> DefaultResults; in SwitchToLookupTable()
3734 SmallDenseMap<PHINode*, Type*> ResultTypes; in SwitchToLookupTable()
3735 SmallVector<PHINode*, 4> PHIs; in SwitchToLookupTable()
3745 typedef SmallVector<std::pair<PHINode*, Constant*>, 4> ResultsTy; in SwitchToLookupTable()
3761 PHINode *PHI = PHIs[I]; in SwitchToLookupTable()
3772 SmallVector<std::pair<PHINode*, Constant*>, 4> DefaultResultsList; in SwitchToLookupTable()
3788 PHINode *PHI = DefaultResultsList[I].first; in SwitchToLookupTable()
3874 PHINode *PHI = PHIs[I]; in SwitchToLookupTable()
4097 if (PHINode *PN = dyn_cast<PHINode>(BI->getCondition())) in SimplifyCondBranch()
4157 PHINode *PHI = dyn_cast<PHINode>(i); ++i) in removeUndefIntroducingPredecessor()
4217 if (PHINode *PN = dyn_cast<PHINode>(BB->begin())) in run()