Lines Matching defs:PN
78 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
79 if (PN->getIncomingValue(0) != PN)
80 PN->replaceAllUsesWith(PN->getIncomingValue(0));
82 PN->replaceAllUsesWith(UndefValue::get(PN->getType()));
85 MemDep->removeInstruction(PN); // Memdep updates AA itself.
86 else if (AA && isa<PointerType>(PN->getType()))
87 AA->deleteValue(PN);
89 PN->eraseFromParent();
103 PHINode *PN = dyn_cast<PHINode>(I); ++I)
104 PHIs.push_back(PN);
108 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*()))
109 Changed |= RecursivelyDeleteDeadPHINode(PN, TLI);
142 if (PHINode *PN = dyn_cast<PHINode>(BI)) {
143 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
144 if (PN->getIncomingValue(i) == PN)
390 PHINode *PN = cast<PHINode>(I++);
396 InVal = PN->getIncomingValueForBlock(Preds[0]);
397 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) {
398 if (!PredSet.count(PN->getIncomingBlock(i)))
401 InVal = PN->getIncomingValue(i);
402 else if (InVal != PN->getIncomingValue(i)) {
418 for (int64_t i = PN->getNumIncomingValues() - 1; i >= 0; --i)
419 if (PredSet.count(PN->getIncomingBlock(i)))
420 PN->removeIncomingValue(i, false);
424 PN->addIncoming(InVal, NewBB);
432 PHINode::Create(PN->getType(), Preds.size(), PN->getName() + ".ph", BI);
434 AA->copyValue(PN, NewPHI);
440 for (int64_t i = PN->getNumIncomingValues() - 1; i >= 0; --i) {
441 BasicBlock *IncomingBB = PN->getIncomingBlock(i);
443 Value *V = PN->removeIncomingValue(i, false);
448 PN->addIncoming(NewPHI, NewBB);
597 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad);
598 PN->addIncoming(Clone1, NewBB1);
599 PN->addIncoming(Clone2, NewBB2);
600 LPad->replaceAllUsesWith(PN);
636 if (PHINode *PN = dyn_cast<PHINode>(V)) {
637 if (PN->getParent() == BB) {
639 NewBC->setOperand(0, PN->getIncomingValueForBlock(Pred));
641 *i = PN->getIncomingValueForBlock(Pred);