| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | SSAUpdater.cpp | 76 static bool IsEquivalentPHI(PHINode *PHI, in IsEquivalentPHI() 111 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock() 148 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock() 158 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock() 190 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse() 202 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions() 217 using PhiT = PHINode; 225 PHINode *PHI; 254 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) in FindPredecessorBlocks() 270 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds, in CreateEmptyPHI() [all …]
|
| H A D | LCSSA.cpp | 83 SmallSetVector<PHINode *, 16> LocalPHIsToRemove; in formLCSSAForInstructions() 117 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions() 140 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructions() 141 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructions() 143 SmallVector<PHINode *, 4> InsertedPHIs; in formLCSSAForInstructions() 162 PHINode *PN = Builder.CreatePHI(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructions() 211 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions() 253 for (PHINode *InsertedPN : InsertedPHIs) { in formLCSSAForInstructions() 267 for (PHINode *PN : AddedPHIs) in formLCSSAForInstructions() 285 for (PHINode *PN : LocalPHIsToRemove) in formLCSSAForInstructions() [all …]
|
| H A D | BreakCriticalEdges.cpp | 191 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitKnownCriticalEdge() 195 PHINode *PN = cast<PHINode>(I); in SplitKnownCriticalEdge() 434 PHINode *DirPHI = cast<PHINode>(Direct); in SplitIndirectBrCriticalEdges() 435 PHINode *IndPHI = cast<PHINode>(Indirect); in SplitIndirectBrCriticalEdges() 446 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", IndPHI); in SplitIndirectBrCriticalEdges() 452 PHINode *MergePHI = in SplitIndirectBrCriticalEdges() 453 PHINode::Create(IndPHI->getType(), 2, "merge", &*MergeInsert); in SplitIndirectBrCriticalEdges()
|
| H A D | LoopUnrollRuntime.cpp | 99 for (PHINode &PN : Succ->phis()) { in ConnectProlog() 107 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectProlog() 217 for (PHINode &PN : NewExit->phis()) { in ConnectEpilog() 233 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog() 268 for (PHINode &PN : Succ->phis()) { in ConnectEpilog() 271 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectEpilog() 280 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog() 365 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2, in CloneLoopBlocks() 382 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks() 827 for (PHINode &PN : BB->phis()) { in UnrollRuntimeLoopRemainder() [all …]
|
| H A D | BasicBlockUtils.cpp | 148 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes() 167 for (PHINode &PN : BB->phis()) in DeleteDeadPHIs() 172 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs() 217 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor() 751 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit() 756 PHINode *NewPN = PHINode::Create( in createPHIsForSplitLoopExit() 1018 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes() 1059 PHINode *NewPHI = in UpdatePHINodes() 1280 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); in SplitLandingPadPredecessorsImpl() 1352 if (PHINode *PN = dyn_cast<PHINode>(V)) { in FoldReturnIntoUncondBranch() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombinePHI.cpp | 244 PHINode *NewPtrPHI = PHINode::Create( in foldIntegerTypedPHI() 575 PHINode *NewPN = in foldPHIArgGEPIntoPHI() 721 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in foldPHIArgLoadIntoPHI() 843 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues, in foldPHIArgZextsIntoPHI() 982 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back())) in isDeadPHICycle() 1004 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) { in PHIsEqualValue() 1135 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) { in SliceUpIllegalIntegerPHI() 1219 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) { in SliceUpIllegalIntegerPHI() 1243 if (PHINode *OldInVal = dyn_cast<PHINode>(InVal)) in SliceUpIllegalIntegerPHI() 1419 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) { in visitPHINode() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | PhiValues.cpp | 49 void PhiValues::processPhi(const PHINode *Phi, in processPhi() 50 SmallVectorImpl<const PHINode *> &Stack) { in processPhi() 60 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) { in processPhi() 88 const PHINode *ComponentPhi = Stack.pop_back_val(); in processPhi() 92 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) { in processPhi() 120 if (!isa<PHINode>(V)) in processPhi() 125 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { in getValuesForPhi() 128 SmallVector<const PHINode *, 8> Stack; in getValuesForPhi() 146 if (const PHINode *PN = dyn_cast<PHINode>(V)) in invalidateValue() 167 for (const PHINode &PN : BB.phis()) { in print() [all …]
|
| H A D | IVDescriptors.cpp | 70 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd() 361 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar() 477 if (isa<PHINode>(UI)) { in AddReductionVar() 488 } else if (!isa<PHINode>(UI) && in AddReductionVar() 650 if (OrigPhi == dyn_cast<PHINode>(SI->getTrueValue())) in isSelectCmpPattern() 738 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern() 739 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern() 925 PHINode *Phi, Loop *TheLoop, in isFirstOrderRecurrence() 1022 if (isa<PHINode>(SinkCandidate)) in isFirstOrderRecurrence() 1161 if (isa<PHINode>(UI)) in getReductionOpChain() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/PowerPC/ |
| H A D | PPCBoolRetToInt.cpp | 100 if (auto *P = dyn_cast<PHINode>(V)) { in translate() 104 PHINode *Q = in translate() 120 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet; 135 if (const auto *P = dyn_cast<PHINode>(&I)) in getPromotablePHINodes() 139 SmallVector<const PHINode *, 8> ToRemove; in getPromotablePHINodes() 140 for (const PHINode *P : Promotable) { in getPromotablePHINodes() 148 isa<PHINode>(V); in getPromotablePHINodes() 159 const auto *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes() 167 for (const PHINode *P : Promotable) { in getPromotablePHINodes() 232 if (!isa<PHINode>(V) && !isa<Constant>(V) && in runOnUse() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | LoopInterchange.cpp | 748 PHINode *PHI = dyn_cast<PHINode>(SV); in followLCSSA() 764 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in findInnerReductionPhi() 845 SmallVector<PHINode *, 8> Inductions; in currentLimitations() 912 PHINode *PN = dyn_cast<PHINode>(U); in areInnerLoopExitPHIsSupported() 1491 for (PHINode &P : InnerExit->phis()) in moveLCSSAPhis() 1495 for (PHINode &P : InnerLatch->phis()) in moveLCSSAPhis() 1503 for (PHINode *P : LcssaInnerExit) in moveLCSSAPhis() 1508 for (PHINode *P : LcssaInnerLatch) in moveLCSSAPhis() 1525 PHINode *NewPhi = dyn_cast<PHINode>(P.clone()); in moveLCSSAPhis() 1673 for (PHINode *PHI : OuterLoopPHIs) { in adjustLoopBranches() [all …]
|
| H A D | DFAJumpThreading.cpp | 120 PHINode *SIUse; 126 PHINode *getUse() { return SIUse; } in getUse() 334 for (auto II = EndBlock->begin(); PHINode *Phi = dyn_cast<PHINode>(II); in unfold() 452 if (!isa<PHINode>(SICond)) in isCandidate() 515 if (isa<PHINode>(SIUse) && in isValidSelectInst() 565 const PHINode *Phi = dyn_cast<PHINode>(StateDef[BB]); in run() 990 if (PHINode *UserPN = dyn_cast<PHINode>(User)) { in updateSSA() 1044 if (isa<PHINode>(&I)) in cloneBlockAndUpdatePredecessor() 1103 for (auto II = Succ->begin(); PHINode *Phi = dyn_cast<PHINode>(II); in updateSuccessorPhis() 1211 for (auto II = BB->begin(); PHINode *Phi = dyn_cast<PHINode>(II); ++II) { in cleanPhiNodes() [all …]
|
| H A D | IndVarSimplify.cpp | 366 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); in handleFloatingPointIV() 416 for (PHINode &PN : Header->phis()) in rewriteNonIntegerIVs() 421 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in rewriteNonIntegerIVs() 575 PHINode *IVPhi; 683 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter() 746 PHINode *Phi = dyn_cast<PHINode>(LHS); in needsLFTR() 901 PHINode *BestPhi = nullptr; in FindLoopCounter() 908 PHINode *Phi = cast<PHINode>(I); in FindLoopCounter() 1218 if (isa<PHINode>(I)) in sinkUnusedInvariants() 1251 if (PHINode *P = dyn_cast<PHINode>(User)) { in sinkUnusedInvariants() [all …]
|
| H A D | LoopFlatten.cpp | 115 PHINode *OuterInductionPHI = nullptr; // induction variables, which are 135 SmallPtrSet<PHINode *, 4> InnerPHIsToTransform; 147 bool isNarrowInductionPhi(PHINode *Phi) { in isNarrowInductionPhi() 446 SmallPtrSet<PHINode *, 4> SafeOuterPHIs; in checkPHIs() 451 for (PHINode &InnerPHI : FI.InnerLoop->getHeader()->phis()) { in checkPHIs() 470 PHINode *OuterPHI = dyn_cast<PHINode>(PreHeaderValue); in checkPHIs() 480 PHINode *LCSSAPHI = dyn_cast<PHINode>( in checkPHIs() 502 for (PHINode &OuterPHI : FI.OuterLoop->getHeader()->phis()) { in checkPHIs() 530 if (!isa<PHINode>(&I) && !I.isTerminator() && in checkOuterLoopInsts() 729 for (PHINode *PHI : FI.InnerPHIsToTransform) in DoFlattenLoopPair() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/ObjCARC/ |
| H A D | ProvenanceAnalysis.cpp | 54 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI() 59 if (const PHINode *PNB = dyn_cast<PHINode>(B)) in relatedPHI() 146 if (const PHINode *PN = dyn_cast<PHINode>(A)) in relatedCheck() 148 if (const PHINode *PN = dyn_cast<PHINode>(B)) in relatedCheck()
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Vectorize/ |
| H A D | LoopVectorizationLegality.h | 256 using ReductionList = MapVector<PHINode *, RecurrenceDescriptor>; 260 using InductionList = MapVector<PHINode *, InductionDescriptor>; 264 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>; 286 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction() 316 const InductionDescriptor *getIntOrFpInductionDescriptor(PHINode *Phi) const; 320 const InductionDescriptor *getPointerInductionDescriptor(PHINode *Phi) const; 333 bool isReductionVariable(PHINode *PN) const { return Reductions.count(PN); } in isReductionVariable() 336 bool isFirstOrderRecurrence(const PHINode *Phi) const; 462 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID, 511 PHINode *PrimaryInduction = nullptr;
|
| /llvm-project-15.0.7/llvm/unittests/Transforms/Utils/ |
| H A D | SSAUpdaterBulkTest.cpp | 91 PHINode *UpdatePhiA = dyn_cast_or_null<PHINode>(I1->getOperand(0)); in TEST() 95 EXPECT_EQ(UpdatePhiA, dyn_cast_or_null<PHINode>(I1->getOperand(0))); in TEST() 98 PHINode *UpdatePhiB = dyn_cast_or_null<PHINode>(I3->getOperand(0)); in TEST() 101 EXPECT_EQ(UpdatePhiB, dyn_cast_or_null<PHINode>(I3->getOperand(1))); in TEST() 178 SmallVector<PHINode *, 8> Inserted; in TEST() 190 PHINode *UpdatePhi = dyn_cast_or_null<PHINode>(I2->getOperand(0)); in TEST()
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | PhiValues.h | 32 class PHINode; variable 51 const ValueSet &getValuesForPhi(const PHINode *PN); 79 DenseMap<const PHINode *, unsigned int> DepthMap; 108 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
|
| H A D | IVDescriptors.h | 124 static InstDesc isRecurrenceInstr(Loop *L, PHINode *Phi, Instruction *I, 150 static InstDesc isSelectCmpPattern(Loop *Loop, PHINode *OrigPhi, 168 AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop, 179 isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes, 191 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop, 261 SmallVector<Instruction *, 4> getReductionOpChain(PHINode *Phi, 331 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE, 338 static bool isFPInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE, 347 static bool isInductionPHI(PHINode *Phi, const Loop *L,
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86LowerAMXType.cpp | 200 } else if (isa<PHINode>(V)) { in getShape() 507 if (isa<PHINode>(V)) in isIncomingOfPHI() 525 void volatileTilePHI(PHINode *Inst); 539 if (isa<PHINode>(V) || V == Store) in updatePhiIncomings() 675 if (isa<PHINode>(&I)) in volatileTileData() 756 IntrinsicInst *CI, PHINode *PN, in optimizeAMXCastFromPhi() 763 SmallVector<PHINode *, 4> PhiWorklist; in optimizeAMXCastFromPhi() 858 SmallDenseMap<PHINode *, PHINode *> NewPNodes; in optimizeAMXCastFromPhi() 867 PHINode *NewPN = NewPNodes[OldPN]; in optimizeAMXCastFromPhi() 891 PHINode *NewPN = NewPNodes[OldPN]; in optimizeAMXCastFromPhi() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/ |
| H A D | SimplifyIndVar.h | 27 class PHINode; variable 50 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, 65 PHINode *NarrowIV = nullptr; 76 PHINode *createWideIV(const WideIVInfo &WI,
|
| /llvm-project-15.0.7/llvm/unittests/Analysis/ |
| H A D | IVDescriptorsTest.cpp | 81 PHINode *Inst_i = dyn_cast<PHINode>(&Header->front()); in TEST() 132 PHINode *Inst_iv = dyn_cast<PHINode>(&Header->front()); in TEST() 198 PHINode *Inst_i = dyn_cast<PHINode>(&Header->front()); in TEST()
|
| H A D | PhiValuesTest.cpp | 46 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then); in TEST() 49 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then); in TEST() 119 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then); in TEST() 122 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then); in TEST() 125 PHINode *Phi3 = PHINode::Create(I32Ty, 2, "phi3", End); in TEST()
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Dominators.cpp | 124 if (auto *PN = dyn_cast<PHINode>(UserInst)) in dominates() 163 if (isa<InvokeInst>(Def) || isa<CallBrInst>(Def) || isa<PHINode>(User)) in dominates() 260 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates() 290 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates() 329 if (isa<PHINode>(UserInst)) in dominates() 343 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
|
| H A D | BasicBlock.cpp | 211 if (!isa<PHINode>(I)) in getFirstNonPHI() 218 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbg() 232 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbgOrLifetime() 314 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin()); in phis() 325 if (empty() || !isa<PHINode>(begin())) in removePredecessor() 328 unsigned NumPreds = cast<PHINode>(front()).getNumIncomingValues(); in removePredecessor() 329 for (PHINode &Phi : make_early_inc_range(phis())) { in removePredecessor() 415 assert((!isa<PHINode>(*I) || getSinglePredecessor()) && in splitBasicBlockBefore() 447 PHINode *PN = dyn_cast<PHINode>(&I); in replacePhiUsesWith()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | SIAnnotateControlFlow.cpp | 72 bool isElse(PHINode *Phi); 76 bool eraseIfUnused(PHINode *Phi); 83 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L, 170 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse() 197 bool SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused() 228 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition() 271 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front()); in handleLoop() 367 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
|