Home | History | Annotate | Download | only in Utils

Lines Matching defs:PN

376 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN,
379 for (Instruction *I = PN; areAllUsesEqual(I) && !I->mayHaveSideEffects();
460 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) {
464 if (!recursivelySimplifyInstruction(PN, TD))
482 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
483 Value *NewVal = PN->getIncomingValue(0);
485 if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
486 PN->replaceAllUsesWith(NewVal);
487 PN->eraseFromParent();
548 PHINode *PN = cast<PHINode>(I);
551 // BB which has the same incoming value for *PI as PN does, we can
553 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB));
555 for (unsigned PI = 0, PE = PN->getNumIncomingValues(); PI != PE; ++PI) {
556 BasicBlock *IBB = PN->getIncomingBlock(PI);
558 BBPN->getIncomingValueForBlock(IBB) != PN->getIncomingValue(PI)) {
559 DEBUG(dbgs() << "Can't fold, phi node " << PN->getName() << " in "
567 Value* Val = PN->getIncomingValueForBlock(BB);
568 for (unsigned PI = 0, PE = PN->getNumIncomingValues(); PI != PE; ++PI) {
572 BasicBlock *IBB = PN->getIncomingBlock(PI);
573 if (BBPreds.count(IBB) && Val != PN->getIncomingValue(PI)) {
574 DEBUG(dbgs() << "Can't fold, phi node " << PN->getName() << " in "
620 if (PHINode* PN = dyn_cast<PHINode>(*UI)) {
621 if (PN->getIncomingBlock(UI) != BB)
641 PHINode *PN = cast<PHINode>(I);
642 Value *OldVal = PN->removeIncomingValue(BB, false);
655 PN->addIncoming(OldValPN->getIncomingValue(i),
660 PN->addIncoming(OldVal, BBPreds[i]);
673 while (PHINode *PN = dyn_cast<PHINode>(&BB->front())) {
675 assert(PN->use_empty() && "There shouldn't be any uses here!");
676 PN->eraseFromParent();
709 PHINode *PN = dyn_cast<PHINode>(I++); ) {
716 for (User::op_iterator I = PN->op_begin(), E = PN->op_end(); I != E; ++I) {
720 for (PHINode::block_iterator I = PN->block_begin(), E = PN->block_end();
729 HashMap.insert(std::make_pair(Hash, PN));
733 if (OtherPN->isIdenticalTo(PN)) {
735 PN->replaceAllUsesWith(OtherPN);
736 PN->eraseFromParent();
745 Pair.first->second = PN;
746 CollisionMap[PN] = Old;