Lines Matching defs:PHINode
222 using SwitchCaseResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
326 return all_of(BB->phis(), [IncomingBlocks, EquivalenceSet](PHINode &PN) {
376 for (PHINode &PN : Succ->phis())
1144 auto *PN = dyn_cast<PHINode>(UI);
1427 for (const PHINode &PN : Succ->phis()) {
1617 if (isa<PHINode>(*SuccItr))
1809 for (PHINode &PN : Succ->phis()) {
1860 for (PHINode &PN : Succ->phis()) {
1941 if (isa<PHINode>(I) || I->isEHPad() || isa<AllocaInst>(I) ||
2109 PHINode::Create(Op->getType(), Insts.size(), Op->getName() + ".sink");
2142 auto *PN = cast<PHINode>(U);
2299 for (PHINode &PN : BB->phis()) {
2703 PHINode *PN = PHINode::Create(
2921 for (PHINode &PN : EndBB->phis()) {
3213 for (PHINode &PN : EndBB->phis()) {
3264 if (!EphTracker.track(&I) && !isa<PHINode>(I)) {
3273 if (UI->getParent() != BB || isa<PHINode>(UI))
3311 PHINode *PN = dyn_cast<PHINode>(Cond);
3384 if (PHINode *PN = dyn_cast<PHINode>(BBI)) {
3478 static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI,
3535 if (auto *IfCondPhiInst = dyn_cast<PHINode>(IfCond))
3545 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++NumPhis, ++I)
3560 for (BasicBlock::iterator II = BB->begin(); isa<PHINode>(II);) {
3561 PHINode *PN = cast<PHINode>(II++);
3578 PN = dyn_cast<PHINode>(BB->begin());
3643 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
3981 if (auto *PN = dyn_cast<PHINode>(UI))
4038 PHINode *PHI = nullptr;
4041 for (auto I = Succ->begin(); isa<PHINode>(I); ++I)
4042 if (cast<PHINode>(I)->getIncomingValueForBlock(BB) == V) {
4043 PHI = cast<PHINode>(I);
4062 PHI = PHINode::Create(V->getType(), 2, "simplifycfg.merge");
4478 for (BasicBlock::iterator II = CommonDest->begin(); isa<PHINode>(II);
4572 for (PHINode &PN : CommonDest->phis()) {
4774 if (isa<PHINode>(BB->begin()) || !ICI->hasOneUse())
4826 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back());
4828 isa<PHINode>(++BasicBlock::iterator(PHIUse)))
4991 for (BasicBlock::iterator BBI = EdgeBB->begin(); isa<PHINode>(BBI); ++BBI) {
4992 PHINode *PN = cast<PHINode>(BBI);
5008 if (isa<PHINode>(RI->getValue()))
5050 auto *PhiLPInst = cast<PHINode>(RI->getValue());
5170 for (PHINode &DestPN : UnwindDest->phis()) {
5176 // value is in the cleanup pad, it must be a PHINode (because we
5186 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal);
5198 for (PHINode &PN : make_early_inc_range(BB->phis())) {
5615 for (auto BBI = ContiguousDest->begin(); isa<PHINode>(BBI); ++BBI) {
5620 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
5622 for (auto BBI = OtherDest->begin(); isa<PHINode>(BBI); ++BBI) {
5627 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
5750 static PHINode *FindPHIForConditionForwarding(ConstantInt *CaseValue,
5763 for (PHINode &PHI : Succ->phis()) {
5782 using ForwardingNodesMap = DenseMap<PHINode *, SmallVector<int, 4>>;
5802 for (PHINode &Phi : CaseDest->phis()) {
5823 PHINode *Phi = ForwardingNode.first;
5910 SmallVectorImpl<std::pair<PHINode *, Constant *>> &Res,
5937 if (PHINode *Phi = dyn_cast<PHINode>(User))
5957 for (PHINode &PHI : (*CommonDest)->phis()) {
5997 static bool initializeUniqueCases(SwitchInst *SI, PHINode *&PHI,
6036 SmallVector<std::pair<PHINode *, Constant *>, 1> DefaultResults;
6130 static void removeSwitchAfterSelectFold(SwitchInst *SI, PHINode *PHI,
6171 PHINode *PHI = nullptr;
6506 const SmallDenseMap<PHINode *, Type *> &ResultTypes) {
6543 bool HasDefaultResults, const SmallDenseMap<PHINode *, Type *> &ResultTypes,
6678 SmallDenseMap<PHINode *, ResultListTy> ResultLists;
6680 SmallDenseMap<PHINode *, Constant *> DefaultResults;
6681 SmallDenseMap<PHINode *, Type *> ResultTypes;
6682 SmallVector<PHINode *, 4> PHIs;
6692 using ResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
6700 PHINode *PHI = I.first;
6709 for (PHINode *PHI : PHIs) {
6717 SmallVector<std::pair<PHINode *, Constant *>, 4> DefaultResultsList;
6723 PHINode *PHI = I.first;
6897 for (PHINode *PHI : PHIs) {
7245 if (isa<PHINode>(*Succ->begin()))
7403 !isa<PHINode>(Succ1->front()) && !isa<PHINode>(Succ2->front());
7711 for (PHINode &PHI : BB->phis())
7820 if (auto *PN = dyn_cast<PHINode>(BB->begin()))