Lines Matching refs:PN
216 PHINode *PN = cast<PHINode>(I); in findPHIToPartitionLoops() local
218 if (Value *V = SimplifyInstruction(PN, DL, nullptr, DT, AC)) { in findPHIToPartitionLoops()
220 PN->replaceAllUsesWith(V); in findPHIToPartitionLoops()
221 if (AA) AA->deleteValue(PN); in findPHIToPartitionLoops()
222 PN->eraseFromParent(); in findPHIToPartitionLoops()
227 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) in findPHIToPartitionLoops()
228 if (PN->getIncomingValue(i) == PN && in findPHIToPartitionLoops()
229 L->contains(PN->getIncomingBlock(i))) in findPHIToPartitionLoops()
231 return PN; in findPHIToPartitionLoops()
267 PHINode *PN = findPHIToPartitionLoops(L, AA, DT, AC); in separateNestedLoop() local
268 if (!PN) return nullptr; // No known way to partition. in separateNestedLoop()
274 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { in separateNestedLoop()
275 if (PN->getIncomingValue(i) != PN || in separateNestedLoop()
276 !L->contains(PN->getIncomingBlock(i))) { in separateNestedLoop()
278 if (isa<IndirectBrInst>(PN->getIncomingBlock(i)->getTerminator())) in separateNestedLoop()
280 OuterLoopPreds.push_back(PN->getIncomingBlock(i)); in separateNestedLoop()
404 PHINode *PN = cast<PHINode>(I); in insertUniqueBackedgeBlock() local
405 PHINode *NewPN = PHINode::Create(PN->getType(), BackedgeBlocks.size(), in insertUniqueBackedgeBlock()
406 PN->getName()+".be", BETerminator); in insertUniqueBackedgeBlock()
407 if (AA) AA->copyValue(PN, NewPN); in insertUniqueBackedgeBlock()
414 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { in insertUniqueBackedgeBlock()
415 BasicBlock *IBB = PN->getIncomingBlock(i); in insertUniqueBackedgeBlock()
416 Value *IV = PN->getIncomingValue(i); in insertUniqueBackedgeBlock()
433 PN->setIncomingValue(0, PN->getIncomingValue(PreheaderIdx)); in insertUniqueBackedgeBlock()
434 PN->setIncomingBlock(0, PN->getIncomingBlock(PreheaderIdx)); in insertUniqueBackedgeBlock()
437 for (unsigned i = 0, e = PN->getNumIncomingValues()-1; i != e; ++i) in insertUniqueBackedgeBlock()
438 PN->removeIncomingValue(e-i, false); in insertUniqueBackedgeBlock()
441 PN->addIncoming(NewPN, BEBlock); in insertUniqueBackedgeBlock()
619 PHINode *PN; in simplifyOneLoop() local
621 (PN = dyn_cast<PHINode>(I++)); ) in simplifyOneLoop()
622 if (Value *V = SimplifyInstruction(PN, DL, nullptr, DT, AC)) { in simplifyOneLoop()
623 if (AA) AA->deleteValue(PN); in simplifyOneLoop()
624 if (SE) SE->forgetValue(PN); in simplifyOneLoop()
625 PN->replaceAllUsesWith(V); in simplifyOneLoop()
626 PN->eraseFromParent(); in simplifyOneLoop()