Lines Matching refs:PN
207 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV() argument
208 unsigned IncomingEdge = L->contains(PN->getIncomingBlock(0)); in handleFloatingPointIV()
212 auto *InitValueVal = dyn_cast<ConstantFP>(PN->getIncomingValue(IncomingEdge)); in handleFloatingPointIV()
220 auto *Incr = dyn_cast<BinaryOperator>(PN->getIncomingValue(BackEdge)); in handleFloatingPointIV()
227 if (IncValueVal == nullptr || Incr->getOperand(0) != PN || in handleFloatingPointIV()
355 IntegerType *Int32Ty = Type::getInt32Ty(PN->getContext()); in handleFloatingPointIV()
359 PHINode::Create(Int32Ty, 2, PN->getName() + ".int", PN->getIterator()); in handleFloatingPointIV()
361 PN->getIncomingBlock(IncomingEdge)); in handleFloatingPointIV()
362 NewPHI->setDebugLoc(PN->getDebugLoc()); in handleFloatingPointIV()
368 NewPHI->addIncoming(NewAdd, PN->getIncomingBlock(BackEdge)); in handleFloatingPointIV()
377 WeakTrackingVH WeakPH = PN; in handleFloatingPointIV()
397 Instruction *Conv = new SIToFPInst(NewPHI, PN->getType(), "indvar.conv", in handleFloatingPointIV()
398 PN->getParent()->getFirstInsertionPt()); in handleFloatingPointIV()
399 Conv->setDebugLoc(PN->getDebugLoc()); in handleFloatingPointIV()
400 PN->replaceAllUsesWith(Conv); in handleFloatingPointIV()
401 RecursivelyDeleteTriviallyDeadInstructions(PN, TLI, MSSAU.get()); in handleFloatingPointIV()
413 for (PHINode &PN : Header->phis()) in rewriteNonIntegerIVs()
414 PHIs.push_back(&PN); in rewriteNonIntegerIVs()
418 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHI)) in rewriteNonIntegerIVs() local
419 Changed |= handleFloatingPointIV(L, PN); in rewriteNonIntegerIVs()
449 for (PHINode &PN : ExitBB->phis()) { in rewriteFirstIterationLoopExitValues()
450 for (unsigned IncomingValIdx = 0, E = PN.getNumIncomingValues(); in rewriteFirstIterationLoopExitValues()
452 auto *IncomingBB = PN.getIncomingBlock(IncomingValIdx); in rewriteFirstIterationLoopExitValues()
479 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx)); in rewriteFirstIterationLoopExitValues()
495 PN.setIncomingValue(IncomingValIdx, in rewriteFirstIterationLoopExitValues()
497 SE->forgetValue(&PN); in rewriteFirstIterationLoopExitValues()
606 for (PHINode &PN : L->getHeader()->phis()) in simplifyAndExtend()
607 LoopPhis.push_back(&PN); in simplifyAndExtend()
1214 for (auto &PN : LoopHeader->phis()) { in replaceLoopPHINodesWithPreheaderValues() local
1215 auto *PreheaderIncoming = PN.getIncomingValueForBlock(LoopPreheader); in replaceLoopPHINodesWithPreheaderValues()
1216 for (User *U : PN.users()) in replaceLoopPHINodesWithPreheaderValues()
1218 SE.forgetValue(&PN); in replaceLoopPHINodesWithPreheaderValues()
1219 PN.replaceAllUsesWith(PreheaderIncoming); in replaceLoopPHINodesWithPreheaderValues()
1220 DeadInsts.emplace_back(&PN); in replaceLoopPHINodesWithPreheaderValues()