Home
last modified time | relevance | path

Searched refs:PHINode (Results 1 – 25 of 275) sorted by relevance

1234567891011

/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSSAUpdater.cpp77 static bool IsEquivalentPHI(PHINode *PHI, in IsEquivalentPHI()
112 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
149 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
159 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock()
191 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse()
203 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions()
218 using PhiT = PHINode;
226 PHINode *PHI;
255 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) in FindPredecessorBlocks()
271 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds, in CreateEmptyPHI()
[all …]
H A DLCSSA.cpp84 SmallSetVector<PHINode *, 16> LocalPHIsToRemove; in formLCSSAForInstructions()
118 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
141 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructions()
142 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructions()
144 SmallVector<PHINode *, 4> InsertedPHIs; in formLCSSAForInstructions()
163 PHINode *PN = Builder.CreatePHI(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructions()
212 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
254 for (PHINode *InsertedPN : InsertedPHIs) { in formLCSSAForInstructions()
268 for (PHINode *PN : AddedPHIs) in formLCSSAForInstructions()
286 for (PHINode *PN : LocalPHIsToRemove) in formLCSSAForInstructions()
[all …]
H A DBreakCriticalEdges.cpp197 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitKnownCriticalEdge()
201 PHINode *PN = cast<PHINode>(I); in SplitKnownCriticalEdge()
322 PHINode *PN = dyn_cast<PHINode>(BB->begin()); in findIBRPredecessor()
443 PHINode *DirPHI = cast<PHINode>(Direct); in SplitIndirectBrCriticalEdges()
444 PHINode *IndPHI = cast<PHINode>(Indirect); in SplitIndirectBrCriticalEdges()
455 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", IndPHI); in SplitIndirectBrCriticalEdges()
461 PHINode *MergePHI = in SplitIndirectBrCriticalEdges()
462 PHINode::Create(IndPHI->getType(), 2, "merge", &*MergeInsert); in SplitIndirectBrCriticalEdges()
H A DLoopUnrollRuntime.cpp97 for (PHINode &PN : Succ->phis()) { in ConnectProlog()
105 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectProlog()
223 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog()
257 for (PHINode &PN : Succ->phis()) { in ConnectEpilog()
260 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectEpilog()
269 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog()
361 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2, in CloneLoopBlocks()
380 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks()
848 if (!isa<PHINode>(II)) in UnrollRuntimeLoopRemainder()
850 PHINode *Phi = cast<PHINode>(&II); in UnrollRuntimeLoopRemainder()
[all …]
H A DBasicBlockUtils.cpp143 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes()
162 for (PHINode &PN : BB->phis()) in DeleteDeadPHIs()
167 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs()
210 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
727 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit()
732 PHINode *NewPN = PHINode::Create( in createPHIsForSplitLoopExit()
994 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes()
1035 PHINode *NewPHI = in UpdatePHINodes()
1254 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); in SplitLandingPadPredecessorsImpl()
1326 if (PHINode *PN = dyn_cast<PHINode>(V)) { in FoldReturnIntoUncondBranch()
[all …]
H A DLoopPeel.cpp143 PHINode *Phi, Loop *L, BasicBlock *BackEdge, in calculateIterationsToInvariance()
144 SmallDenseMap<PHINode *, unsigned> &IterationsToInvariance) { in calculateIterationsToInvariance() argument
162 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) { in calculateIterationsToInvariance()
340 SmallDenseMap<PHINode *, unsigned> IterationsToInvariance; in computePeelCount()
348 for (auto BI = L->getHeader()->begin(); isa<PHINode>(&*BI); ++BI) { in computePeelCount()
349 PHINode *Phi = cast<PHINode>(&*BI); in computePeelCount()
590 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in cloneLoopBlocks()
591 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in cloneLoopBlocks()
610 for (PHINode &PHI : Edge.second->phis()) { in cloneLoopBlocks()
827 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in peelLoop()
[all …]
H A DDemoteRegToStack.cpp59 if (PHINode *PN = dyn_cast<PHINode>(U)) { in DemoteRegToStack()
96 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemoteRegToStack()
110 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { in DemotePHIToStack()
143 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemotePHIToStack()
H A DSimplifyCFG.cpp306 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators()
2601 PHINode *PN = dyn_cast<PHINode>(BI->getCondition()); in FoldCondBranchOnPHI()
2658 if (PHINode *PN = dyn_cast<PHINode>(BBI)) { in FoldCondBranchOnPHI()
2801 PHINode *PN = cast<PHINode>(II++); in FoldTwoEntryPHINode()
2883 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldTwoEntryPHINode()
3641 PHINode *NewPN = PHINode::Create( in SimplifyCondBranchToCondBranch()
3729 PHINode *PN = cast<PHINode>(II); in SimplifyCondBranchToCondBranch()
4083 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back()); in tryToSimplifyUncondBranchWithICmpInIt()
4249 PHINode *PN = cast<PHINode>(BBI); in SimplifyBranchOnICmpChain()
4443 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal); in removeEmptyCleanup()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Analysis/
H A DPhiValues.cpp49 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 DIVUsers.cpp148 PHINode *PN = dyn_cast<PHINode>(User); in IVUseShouldUsePostIncValue()
183 if (!isa<PHINode>(I) && !isSafeToSpeculativelyExecute(I)) in AddUsersImpl()
213 if (isa<PHINode>(User) && Processed.count(User)) in AddUsersImpl()
220 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in AddUsersImpl()
222 unsigned ValNo = PHINode::getIncomingValueNumForOperand(OperandNo); in AddUsersImpl()
236 if (isa<PHINode>(User) || Processed.count(User) || in AddUsersImpl()
315 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) in IVUsers()
H A DIVDescriptors.cpp91 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd()
313 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar()
418 if (isa<PHINode>(UI)) in AddReductionVar()
422 } else if (!isa<PHINode>(UI) && in AddReductionVar()
572 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern()
573 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern()
577 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal) in isConditionalRdxPattern()
718 PHINode *Phi, Loop *TheLoop, in isFirstOrderRecurrence()
790 if (isa<PHINode>(SinkCandidate)) in isFirstOrderRecurrence()
1099 auto *PN = cast<PHINode>(PhiScev->getValue()); in getCastsForInductionPHI()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp195 PHINode *PtrPHI = dyn_cast<PHINode>(II); in foldIntegerTypedPHI()
248 PHINode *NewPtrPHI = PHINode::Create( in foldIntegerTypedPHI()
552 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e, in foldPHIArgGEPIntoPHI()
691 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in foldPHIArgLoadIntoPHI()
811 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues, in foldPHIArgZextsIntoPHI()
948 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back())) in DeadPHICycle()
970 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) { in PHIsEqualValue()
1092 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) { in SliceUpIllegalIntegerPHI()
1176 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) { in SliceUpIllegalIntegerPHI()
1346 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) { in visitPHINode()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCBoolRetToInt.cpp100 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 …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopInterchange.cpp302 PHINode *PhiVar = cast<PHINode>(I); in getInductionVariable()
639 PHINode *InnerInduction) { in isLoopStructureUnderstood()
724 PHINode *PHI = dyn_cast<PHINode>(SV); in followLCSSA()
740 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in findInnerReductionPhi()
818 PHINode *InnerInductionVar; in currentLimitations()
819 SmallVector<PHINode *, 8> Inductions; in currentLimitations()
978 PHINode *PN = dyn_cast<PHINode>(U); in areInnerLoopExitPHIsSupported()
1541 for (PHINode &P : InnerExit->phis()) in moveLCSSAPhis()
1553 for (PHINode *P : LcssaInnerExit) in moveLCSSAPhis()
1558 for (PHINode *P : LcssaInnerLatch) in moveLCSSAPhis()
[all …]
H A DDFAJumpThreading.cpp117 PHINode *SIUse;
123 PHINode *getUse() { return SIUse; } in getUse()
331 for (auto II = EndBlock->begin(); PHINode *Phi = dyn_cast<PHINode>(II); in unfold()
455 if (!isa<PHINode>(Inst)) in isPredictable()
535 if (isa<PHINode>(SIUse) && in isValidSelectInst()
576 const PHINode *Phi = dyn_cast<PHINode>(StateDef[BB]); in run()
927 if (PHINode *UserPN = dyn_cast<PHINode>(User)) { in updateSSA()
981 if (isa<PHINode>(&I)) in cloneBlockAndUpdatePredecessor()
1040 for (auto II = Succ->begin(); PHINode *Phi = dyn_cast<PHINode>(II); in updateSuccessorPhis()
1138 for (auto II = BB->begin(); PHINode *Phi = dyn_cast<PHINode>(II); ++II) { in cleanPhiNodes()
[all …]
H A DIndVarSimplify.cpp363 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); in handleFloatingPointIV()
413 for (PHINode &PN : Header->phis()) in rewriteNonIntegerIVs()
418 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in rewriteNonIntegerIVs()
571 PHINode *IVPhi;
679 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter()
742 PHINode *Phi = dyn_cast<PHINode>(LHS); in needsLFTR()
897 PHINode *BestPhi = nullptr; in FindLoopCounter()
904 PHINode *Phi = cast<PHINode>(I); in FindLoopCounter()
1221 if (isa<PHINode>(I)) in sinkUnusedInvariants()
1254 if (PHINode *P = dyn_cast<PHINode>(User)) { in sinkUnusedInvariants()
[all …]
H A DLoopFlatten.cpp79 PHINode *InnerInductionPHI = nullptr;
80 PHINode *OuterInductionPHI = nullptr;
88 SmallPtrSet<PHINode *, 4> InnerPHIsToTransform;
100 PHINode *&InductionPHI, Value *&TripCount, BinaryOperator *&Increment, in findLoopComponents()
214 SmallPtrSet<PHINode *, 4> SafeOuterPHIs; in checkPHIs()
219 for (PHINode &InnerPHI : FI.InnerLoop->getHeader()->phis()) { in checkPHIs()
236 PHINode *OuterPHI = dyn_cast<PHINode>(PreHeaderValue); in checkPHIs()
246 PHINode *LCSSAPHI = dyn_cast<PHINode>( in checkPHIs()
268 for (PHINode &OuterPHI : FI.OuterLoop->getHeader()->phis()) { in checkPHIs()
294 if (!isa<PHINode>(&I) && !I.isTerminator() && in checkOuterLoopInsts()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/
H A DProvenanceAnalysis.cpp54 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()
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DPhiValues.h33 class PHINode; variable
52 const ValueSet &getValuesForPhi(const PHINode *PN);
80 DenseMap<const PHINode *, unsigned int> DepthMap;
109 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
H A DIVDescriptors.h152 static bool AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop,
163 static bool isReductionPHI(PHINode *Phi, Loop *TheLoop,
177 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop,
239 SmallVector<Instruction *, 4> getReductionOpChain(PHINode *Phi,
296 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
303 static bool isFPInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
312 static bool isInductionPHI(PHINode *Phi, const Loop *L,
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DSimplifyIndVar.h28 class PHINode; variable
51 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT,
66 PHINode *NarrowIV = nullptr;
77 PHINode *createWideIV(const WideIVInfo &WI,
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/
H A DLoopVectorizationLegality.h263 using ReductionList = MapVector<PHINode *, RecurrenceDescriptor>;
267 using InductionList = MapVector<PHINode *, InductionDescriptor>;
271 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>;
293 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction()
324 bool isReductionVariable(PHINode *PN) { return Reductions.count(PN); } in isReductionVariable()
327 bool isFirstOrderRecurrence(const PHINode *Phi);
453 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
502 PHINode *PrimaryInduction = nullptr;
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DSIAnnotateControlFlow.cpp72 bool isElse(PHINode *Phi);
76 void eraseIfUnused(PHINode *Phi);
83 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
170 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse()
197 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused()
225 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition()
262 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front()); in handleLoop()
353 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
/freebsd-13.1/contrib/llvm-project/llvm/lib/IR/
H A DDominators.cpp117 if (auto *PN = dyn_cast<PHINode>(UserInst)) in dominates()
156 if (isa<InvokeInst>(Def) || isa<CallBrInst>(Def) || isa<PHINode>(User)) in dominates()
253 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates()
283 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates()
322 if (isa<PHINode>(UserInst)) in dominates()
336 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
H A DBasicBlock.cpp214 if (!isa<PHINode>(I)) in getFirstNonPHI()
221 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbg()
235 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbgOrLifetime()
317 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin()); in phis()
328 if (empty() || !isa<PHINode>(begin())) in removePredecessor()
331 unsigned NumPreds = cast<PHINode>(front()).getNumIncomingValues(); in removePredecessor()
332 for (PHINode &Phi : make_early_inc_range(phis())) { in removePredecessor()
418 assert((!isa<PHINode>(*I) || getSinglePredecessor()) && in splitBasicBlockBefore()
450 PHINode *PN = dyn_cast<PHINode>(II); in replacePhiUsesWith()

1234567891011