Lines Matching refs:PN

72   while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {  in FoldSingleEntryPHINodes()  local
73 if (PN->getIncomingValue(0) != PN) in FoldSingleEntryPHINodes()
74 PN->replaceAllUsesWith(PN->getIncomingValue(0)); in FoldSingleEntryPHINodes()
76 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); in FoldSingleEntryPHINodes()
79 MemDep->removeInstruction(PN); // Memdep updates AA itself. in FoldSingleEntryPHINodes()
80 else if (AA && isa<PointerType>(PN->getType())) in FoldSingleEntryPHINodes()
81 AA->deleteValue(PN); in FoldSingleEntryPHINodes()
83 PN->eraseFromParent(); in FoldSingleEntryPHINodes()
97 PHINode *PN = dyn_cast<PHINode>(I); ++I) in DeleteDeadPHIs()
98 PHIs.push_back(PN); in DeleteDeadPHIs()
102 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs() local
103 Changed |= RecursivelyDeleteDeadPHINode(PN, TLI); in DeleteDeadPHIs()
138 if (PHINode *PN = dyn_cast<PHINode>(BI)) { in MergeBlockIntoPredecessor() local
139 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) in MergeBlockIntoPredecessor()
140 if (PN->getIncomingValue(i) == PN) in MergeBlockIntoPredecessor()
395 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes() local
401 InVal = PN->getIncomingValueForBlock(Preds[0]); in UpdatePHINodes()
402 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { in UpdatePHINodes()
403 if (!PredSet.count(PN->getIncomingBlock(i))) in UpdatePHINodes()
406 InVal = PN->getIncomingValue(i); in UpdatePHINodes()
407 else if (InVal != PN->getIncomingValue(i)) { in UpdatePHINodes()
423 for (int64_t i = PN->getNumIncomingValues() - 1; i >= 0; --i) in UpdatePHINodes()
424 if (PredSet.count(PN->getIncomingBlock(i))) in UpdatePHINodes()
425 PN->removeIncomingValue(i, false); in UpdatePHINodes()
429 PN->addIncoming(InVal, NewBB); in UpdatePHINodes()
437 PHINode::Create(PN->getType(), Preds.size(), PN->getName() + ".ph", BI); in UpdatePHINodes()
439 AA->copyValue(PN, NewPHI); in UpdatePHINodes()
445 for (int64_t i = PN->getNumIncomingValues() - 1; i >= 0; --i) { in UpdatePHINodes()
446 BasicBlock *IncomingBB = PN->getIncomingBlock(i); in UpdatePHINodes()
448 Value *V = PN->removeIncomingValue(i, false); in UpdatePHINodes()
453 PN->addIncoming(NewPHI, NewBB); in UpdatePHINodes()
622 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); in SplitLandingPadPredecessors() local
623 PN->addIncoming(Clone1, NewBB1); in SplitLandingPadPredecessors()
624 PN->addIncoming(Clone2, NewBB2); in SplitLandingPadPredecessors()
625 LPad->replaceAllUsesWith(PN); in SplitLandingPadPredecessors()
661 if (PHINode *PN = dyn_cast<PHINode>(V)) { in FoldReturnIntoUncondBranch() local
662 if (PN->getParent() == BB) { in FoldReturnIntoUncondBranch()
664 NewBC->setOperand(0, PN->getIncomingValueForBlock(Pred)); in FoldReturnIntoUncondBranch()
666 *i = PN->getIncomingValueForBlock(Pred); in FoldReturnIntoUncondBranch()