Home | History | Annotate | Download | only in Utils

Lines Matching refs:PN

341 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN,
344 for (Instruction *I = PN; areAllUsesEqual(I) && !I->mayHaveSideEffects();
425 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) {
429 if (!recursivelySimplifyInstruction(PN, TD))
447 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
448 Value *NewVal = PN->getIncomingValue(0);
450 if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
451 PN->replaceAllUsesWith(NewVal);
452 PN->eraseFromParent();
513 PHINode *PN = cast<PHINode>(I);
516 // BB which has the same incoming value for *PI as PN does, we can
518 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB));
520 for (unsigned PI = 0, PE = PN->getNumIncomingValues(); PI != PE; ++PI) {
521 BasicBlock *IBB = PN->getIncomingBlock(PI);
523 BBPN->getIncomingValueForBlock(IBB) != PN->getIncomingValue(PI)) {
524 DEBUG(dbgs() << "Can't fold, phi node " << PN->getName() << " in "
532 Value* Val = PN->getIncomingValueForBlock(BB);
533 for (unsigned PI = 0, PE = PN->getNumIncomingValues(); PI != PE; ++PI) {
537 BasicBlock *IBB = PN->getIncomingBlock(PI);
538 if (BBPreds.count(IBB) && Val != PN->getIncomingValue(PI)) {
539 DEBUG(dbgs() << "Can't fold, phi node " << PN->getName() << " in "
585 if (PHINode* PN = dyn_cast<PHINode>(*UI)) {
586 if (PN->getIncomingBlock(UI) != BB)
606 PHINode *PN = cast<PHINode>(I);
607 Value *OldVal = PN->removeIncomingValue(BB, false);
620 PN->addIncoming(OldValPN->getIncomingValue(i),
625 PN->addIncoming(OldVal, BBPreds[i]);
638 while (PHINode *PN = dyn_cast<PHINode>(&BB->front())) {
640 assert(PN->use_empty() && "There shouldn't be any uses here!");
641 PN->eraseFromParent();
674 PHINode *PN = dyn_cast<PHINode>(I++); ) {
681 for (User::op_iterator I = PN->op_begin(), E = PN->op_end(); I != E; ++I) {
685 for (PHINode::block_iterator I = PN->block_begin(), E = PN->block_end();
694 HashMap.insert(std::make_pair(Hash, PN));
698 if (OtherPN->isIdenticalTo(PN)) {
700 PN->replaceAllUsesWith(OtherPN);
701 PN->eraseFromParent();
710 Pair.first->second = PN;
711 CollisionMap[PN] = Old;