Lines Matching defs:PN
465 if (const PHINode *PN = dyn_cast<PHINode>(I))
466 PHIToResolve.push_back(PN);
489 PHINode *PN = cast<PHINode>(VMap[OPN]);
491 Value *V = VMap[PN->getIncomingBlock(pred)];
493 Value *InVal = MapValue(PN->getIncomingValue(pred),
497 PN->setIncomingValue(pred, InVal);
498 PN->setIncomingBlock(pred, MappedBlock);
500 PN->removeIncomingValue(pred, false);
511 PHINode *PN = cast<PHINode>(NewBB->begin());
513 if (NumPreds != PN->getNumIncomingValues()) {
514 assert(NumPreds < PN->getNumIncomingValues());
522 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
523 ++PredCount[PN->getIncomingBlock(i)];
529 for (; (PN = dyn_cast<PHINode>(I)); ++I) {
534 PN->removeIncomingValue(Pred, false);
542 PN = cast<PHINode>(NewBB->begin());
543 if (PN->getNumIncomingValues() == 0) {
546 while ((PN = dyn_cast<PHINode>(I++))) {
547 Value *NV = UndefValue::get(PN->getType());
548 PN->replaceAllUsesWith(NV);
549 assert(VMap[OldI] == PN && "VMap mismatch");
551 PN->eraseFromParent();
565 if (PHINode *PN = dyn_cast<PHINode>(VMap[PHIToResolve[Idx]]))
566 recursivelySimplifyInstruction(PN, DL);