Home
last modified time | relevance | path

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

12345678910

/freebsd-12.1/contrib/llvm/lib/Transforms/Utils/
H A DSSAUpdater.cpp114 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
152 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
162 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock()
194 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse()
211 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions()
226 using PhiT = PHINode;
234 PHINode *PHI;
263 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in FindPredecessorBlocks()
281 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds, in CreateEmptyPHI()
295 return dyn_cast<PHINode>(I); in InstrIsPHI()
[all …]
H A DBreakCriticalEdges.cpp110 for (PHINode &PN : DestBB->phis()) { in createPHIsForSplitLoopExit()
116 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit()
121 PHINode *NewPN = PHINode::Create( in createPHIsForSplitLoopExit()
167 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitCriticalEdge()
171 PHINode *PN = cast<PHINode>(I); in SplitCriticalEdge()
311 PHINode *PN = dyn_cast<PHINode>(BB->begin()); in findIBRPredecessor()
426 PHINode *DirPHI = cast<PHINode>(Direct); in SplitIndirectBrCriticalEdges()
427 PHINode *IndPHI = cast<PHINode>(Indirect); in SplitIndirectBrCriticalEdges()
438 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", IndPHI); in SplitIndirectBrCriticalEdges()
444 PHINode *MergePHI = in SplitIndirectBrCriticalEdges()
[all …]
H A DLCSSA.cpp78 SmallSetVector<PHINode *, 16> PHIsToRemove; in formLCSSAForInstructions()
106 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
129 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructions()
130 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructions()
132 SmallVector<PHINode *, 4> InsertedPHIs; in formLCSSAForInstructions()
146 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructions()
190 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
237 SmallVector<PHINode *, 2> NeedDbgValues; in formLCSSAForInstructions()
238 for (PHINode *PN : AddedPHIs) in formLCSSAForInstructions()
253 for (PHINode *PN : PHIsToRemove) in formLCSSAForInstructions()
[all …]
H A DLoopUnrollPeel.cpp105 PHINode *Phi, Loop *L, BasicBlock *BackEdge, in calculateIterationsToInvariance()
106 SmallDenseMap<PHINode *, unsigned> &IterationsToInvariance) { in calculateIterationsToInvariance() argument
124 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) { in calculateIterationsToInvariance()
274 SmallDenseMap<PHINode *, unsigned> IterationsToInvariance; in computePeelCount()
282 for (auto BI = L->getHeader()->begin(); isa<PHINode>(&*BI); ++BI) { in computePeelCount()
283 PHINode *Phi = cast<PHINode>(&*BI); in computePeelCount()
460 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in cloneLoopBlocks()
461 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in cloneLoopBlocks()
479 for (BasicBlock::iterator I = Exit->begin(); isa<PHINode>(I); ++I) { in cloneLoopBlocks()
480 PHINode *PHI = cast<PHINode>(I); in cloneLoopBlocks()
[all …]
H A DBasicBlockUtils.cpp109 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes()
126 for (PHINode &PN : BB->phis()) in DeleteDeadPHIs()
131 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs()
158 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
165 if (isa<PHINode>(BB->front())) { in MergeBlockIntoPredecessor()
166 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
451 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes()
492 PHINode *NewPHI = in UpdatePHINodes()
662 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); in SplitLandingPadPredecessors()
698 if (PHINode *PN = dyn_cast<PHINode>(V)) { in FoldReturnIntoUncondBranch()
[all …]
H A DLoopUnrollRuntime.cpp94 for (PHINode &PN : Succ->phis()) { in ConnectProlog()
102 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectProlog()
221 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog()
255 for (PHINode &PN : Succ->phis()) { in ConnectEpilog()
258 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectEpilog()
267 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog()
359 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2, in CloneLoopBlocks()
378 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks()
815 if (!isa<PHINode>(II)) in UnrollRuntimeLoopRemainder()
817 PHINode *Phi = cast<PHINode>(&II); in UnrollRuntimeLoopRemainder()
[all …]
H A DSimplifyCFG.cpp238 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators()
281 PHINode *PN = cast<PHINode>(BBI); in isProfitableToFoldUnconditional()
2217 if (PHINode *PN = dyn_cast<PHINode>(BBI)) { in FoldCondBranchOnPHI()
2313 PHINode *PN = cast<PHINode>(II++); in FoldTwoEntryPHINode()
3200 PHINode *NewPN = PHINode::Create( in SimplifyCondBranchToCondBranch()
3281 PHINode *PN = cast<PHINode>(II); in SimplifyCondBranchToCondBranch()
3748 PHINode *PN = cast<PHINode>(BBI); in SimplifyBranchOnICmpChain()
3932 PHINode *DestPN = cast<PHINode>(I); in removeEmptyCleanup()
3949 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal); in removeEmptyCleanup()
3980 PHINode *PN = cast<PHINode>(I++); in removeEmptyCleanup()
[all …]
H A DCloneFunction.cpp326 if (!isa<PHINode>(NewInst)) { in CloneBlock()
489 for (const PHINode &PN : BI.phis()) { in CloneAndPruneIntoFromInst()
492 if (isa<PHINode>(VMap[&PN])) in CloneAndPruneIntoFromInst()
508 const PHINode *OPN = PHIToResolve[phino]; in CloneAndPruneIntoFromInst()
518 PHINode *PN = cast<PHINode>(VMap[OPN]); in CloneAndPruneIntoFromInst()
541 PHINode *PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst()
571 PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst()
575 while ((PN = dyn_cast<PHINode>(I++))) { in CloneAndPruneIntoFromInst()
596 if (isa<PHINode>(VMap[PHIToResolve[Idx]])) in CloneAndPruneIntoFromInst()
676 assert(!isa<PHINode>(Dest->begin())); in CloneAndPruneIntoFromInst()
[all …]
H A DDemoteRegToStack.cpp60 if (PHINode *PN = dyn_cast<PHINode>(U)) { in DemoteRegToStack()
95 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemoteRegToStack()
109 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { in DemotePHIToStack()
142 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemotePHIToStack()
/freebsd-12.1/contrib/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp189 PHINode *PtrPHI = dyn_cast<PHINode>(II); in FoldIntegerTypedPHI()
230 PHINode *NewPtrPHI = PHINode::Create( in FoldIntegerTypedPHI()
454 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e, in FoldPHIArgGEPIntoPHI()
593 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in FoldPHIArgLoadIntoPHI()
712 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues, in FoldPHIArgZextsIntoPHI()
845 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back())) in DeadPHICycle()
867 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) { in PHIsEqualValue()
989 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) { in SliceUpIllegalIntegerPHI()
1068 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) { in SliceUpIllegalIntegerPHI()
1149 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) { in visitPHINode()
[all …]
/freebsd-12.1/contrib/llvm/lib/Analysis/
H A DPhiValues.cpp50 void PhiValues::processPhi(const PHINode *Phi, in processPhi()
51 SmallVector<const PHINode *, 8> &Stack) { in processPhi() argument
61 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) { in processPhi()
86 const PHINode *ComponentPhi = Stack.pop_back_val(); in processPhi()
90 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) { in processPhi()
108 if (!isa<PHINode>(V)) in processPhi()
114 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { in getValuesForPhi()
116 SmallVector<const PHINode *, 8> Stack; in getValuesForPhi()
133 if (const PHINode *PN = dyn_cast<PHINode>(V)) in invalidateValue()
154 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()
/freebsd-12.1/contrib/llvm/lib/Target/PowerPC/
H A DPPCBoolRetToInt.cpp99 if (auto *P = dyn_cast<PHINode>(V)) { in translate()
103 PHINode *Q = in translate()
119 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet;
134 if (const auto *P = dyn_cast<PHINode>(&I)) in getPromotablePHINodes()
138 SmallVector<const PHINode *, 8> ToRemove; in getPromotablePHINodes()
139 for (const PHINode *P : Promotable) { in getPromotablePHINodes()
147 isa<PHINode>(V); in getPromotablePHINodes()
158 const auto *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes()
166 for (const PHINode *P : Promotable) { in getPromotablePHINodes()
231 if (!isa<PHINode>(V) && !isa<Constant>(V) && in runOnUse()
[all …]
/freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/
H A DLoopInterchange.cpp303 PHINode *PhiVar = cast<PHINode>(I); in getInductionVariable()
630 PHINode *InnerInduction) { in isLoopStructureUnderstood()
656 PHINode *PHI = dyn_cast<PHINode>(SV); in followLCSSA()
668 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in findInnerReductionPhi()
723 for (PHINode &PHI : Block->phis()) { in containsSafePHI()
763 PHINode *InnerInductionVar; in currentLimitations()
1319 for (PHINode &P : InnerExit->phis()) in moveLCSSAPhis()
1332 for (PHINode *P : LcssaInnerExit) { in moveLCSSAPhis()
1352 for (PHINode *P : LcssaInnerLatch) in moveLCSSAPhis()
1473 for (PHINode *PHI : OuterLoopPHIs) { in adjustLoopBranches()
[all …]
H A DSpeculateAroundPHIs.cpp111 if (isa<PHINode>(OpI)) { in isSafeToSpeculatePHIUsers()
196 PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap, in isSafeAndProfitableToSpeculateAroundPHI() argument
413 static SmallVector<PHINode *, 16>
414 findProfitablePHIs(ArrayRef<PHINode *> PNs, in findProfitablePHIs()
418 SmallVector<PHINode *, 16> SpecPNs; in findProfitablePHIs()
424 SmallDenseMap<PHINode *, int, 16> PNUserCountMap; in findProfitablePHIs()
621 auto *OpPN = dyn_cast<PHINode>(OpV); in speculatePHIs()
731 SmallDenseMap<PHINode *, int, 16> CostSavingsMap; in tryToSpeculatePHIs()
749 [&](PHINode *PN) { in tryToSpeculatePHIs()
802 SmallVector<PHINode *, 16> PNs; in run()
[all …]
H A DIndVarSimplify.cpp227 PHINode *PHI = dyn_cast<PHINode>(User); in getInsertPointForUses()
493 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in rewriteNonIntegerIVs()
509 PHINode *PN;
579 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin()); in rewriteLoopExitValues()
796 while (PHINode *P = dyn_cast<PHINode>(BI)) { in canLoopBeDeleted()
1502 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) { in widenIVUse()
1894 PHINode *IVPhi;
1993 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter()
2049 PHINode *Phi = dyn_cast<PHINode>(LHS); in needsLFTR()
2210 PHINode *Phi = cast<PHINode>(I); in FindLoopCounter()
[all …]
/freebsd-12.1/contrib/llvm/include/llvm/Analysis/
H A DPhiValues.h35 class PHINode; variable
54 const ValueSet &getValuesForPhi(const PHINode *PN);
75 using PhiSet = SmallPtrSet<const PHINode *, 4>;
83 DenseMap<const PHINode *, unsigned int> DepthMap;
112 void processPhi(const PHINode *PN, SmallVector<const PHINode *, 8> &Stack);
H A DScalarEvolutionExpander.h79 DenseSet<AssertingVH<PHINode>> ChainedPhis;
187 PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty);
289 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); }
377 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
379 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
382 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
388 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
392 Instruction *Pos, PHINode *LoopPhi);
/freebsd-12.1/contrib/llvm/lib/IR/
H A DBasicBlock.cpp192 if (!isa<PHINode>(I)) in getFirstNonPHI()
199 if (!isa<PHINode>(I) && !isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbg()
206 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbgOrLifetime()
292 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin()); in phis()
309 PHINode *APN = dyn_cast<PHINode>(&front()); in removePredecessor()
336 while (PHINode *PN = dyn_cast<PHINode>(&front())) { in removePredecessor()
356 PHINode *PN; in removePredecessor()
357 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) { in removePredecessor()
456 PHINode *PN = dyn_cast<PHINode>(II); in replaceSuccessorsPhiUsesWith()
H A DDominators.cpp137 if (isa<InvokeInst>(Def) || isa<PHINode>(User)) in dominates()
234 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates()
257 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates()
289 if (isa<PHINode>(UserInst)) in dominates()
308 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
/freebsd-12.1/contrib/llvm/lib/Transforms/ObjCARC/
H A DProvenanceAnalysis.cpp57 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI()
63 if (const PHINode *PNB = dyn_cast<PHINode>(B)) in relatedPHI()
151 if (const PHINode *PN = dyn_cast<PHINode>(A)) in relatedCheck()
153 if (const PHINode *PN = dyn_cast<PHINode>(B)) in relatedCheck()
/freebsd-12.1/contrib/llvm/include/llvm/Transforms/Vectorize/
H A DLoopVectorizationLegality.h231 using ReductionList = DenseMap<PHINode *, RecurrenceDescriptor>;
235 using InductionList = MapVector<PHINode *, InductionDescriptor>;
239 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>;
255 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction()
286 bool isReductionVariable(PHINode *PN) { return Reductions.count(PN); } in isReductionVariable()
289 bool isFirstOrderRecurrence(const PHINode *Phi);
385 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
443 PHINode *PrimaryInduction = nullptr;
/freebsd-12.1/contrib/llvm/lib/Target/AMDGPU/
H A DSIAnnotateControlFlow.cpp86 bool isElse(PHINode *Phi);
88 void eraseIfUnused(PHINode *Phi);
95 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
179 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(Int64, 0, "phi.broken", &Target->front()); in handleLoop()
333 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
/freebsd-12.1/contrib/llvm/lib/Transforms/Coroutines/
H A DCoroFrame.cpp119 if (auto *PN = dyn_cast<PHINode>(I)) in isDefinitionAcrossSuspend()
539 } else if (dyn_cast<PHINode>(CurrentValue)) { in insertSpills()
571 if (auto *PN = dyn_cast<PHINode>(E.user())) { in insertSpills()
619 PHINode *LandingPadReplacement) { in updatePhiNodes()
622 PHINode *PN = cast<PHINode>(I); in updatePhiNodes()
698 PHINode *ReplPHI = nullptr; in rewritePHIs()
714 auto *PN = cast<PHINode>(&BB.front()); in rewritePHIs()
718 PHINode *InputV = PHINode::Create( in rewritePHIs()
723 PN = dyn_cast<PHINode>(PN->getNextNode()); in rewritePHIs()
739 if (auto *PN = dyn_cast<PHINode>(&BB.front())) in rewritePHIs()
[all …]
/freebsd-12.1/contrib/llvm/lib/Target/Hexagon/
H A DHexagonVectorLoopCarriedReuse.cpp382 PHINode *PN = cast<PHINode>(D->front()); in findValueToReuse()
401 if (isa<PHINode>(User)) in findValueToReuse()
460 PHINode *PN = dyn_cast<PHINode>(Op); in findValueInBlock()
520 PHINode *NewPhi; in reuseValue()
566 PHINode *PN = dyn_cast<PHINode>(I); in findDepChainFromPHI()
621 for (auto I = BB->begin(), E = BB->end(); I != E && isa<PHINode>(I); ++I) { in findLoopCarriedDeps()
622 auto *PN = cast<PHINode>(I); in findLoopCarriedDeps()

12345678910