Home
last modified time | relevance | path

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

12345678910>>...13

/freebsd/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()
58 TrackedValues.insert(PhiValuesCallbackVH(const_cast<PHINode *>(Phi), this)); in processPhi()
60 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) { in processPhi()
90 const PHINode *ComponentPhi = Stack.pop_back_val(); in processPhi()
94 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) { in processPhi()
122 if (!isa<PHINode>(V)) in processPhi()
127 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { in getValuesForPhi()
130 SmallVector<const PHINode *, 8> Stack; in getValuesForPhi()
148 if (const PHINode *PN = dyn_cast<PHINode>(V)) in invalidateValue()
[all …]
H A DHashRecognize.cpp79 using KnownPhiMap = SmallDenseMap<const PHINode *, KnownBits, 2>;
82 using PhiStepPair = std::pair<const PHINode *, const Instruction *>;
182 if (const PHINode *P = dyn_cast<PHINode>(I)) in computeInstr()
262 const PHINode *Phi = nullptr;
295 bool matchSimpleRecurrence(const PHINode *P);
297 const PHINode *P,
321 bool RecurrenceInfo::matchSimpleRecurrence(const PHINode *P) { in matchSimpleRecurrence()
337 if (isa<PHINode>(I)) in digRecurrence()
379 const PHINode *P, Instruction::BinaryOps BOWithConstOpToMatch) { in matchConditionalRecurrence()
417 getRecurrences(BasicBlock *LoopLatch, const PHINode *IndVar, const Loop &L) { in getRecurrences()
[all …]
H A DIVDescriptors.cpp70 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd()
184 Instruction *Exit, PHINode *Phi) { in checkOrderedReduction()
216 PHINode *Phi, RecurKind Kind, Loop *TheLoop, FastMathFlags FuncFMF, in AddReductionVar()
360 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar()
475 if (isa<PHINode>(UI)) { in AddReductionVar()
486 } else if (!isa<PHINode>(UI) && in AddReductionVar()
630 RecurrenceDescriptor::isAnyOfPattern(Loop *Loop, PHINode *OrigPhi, in isAnyOfPattern()
645 if (OrigPhi == dyn_cast<PHINode>(SI->getTrueValue())) in isAnyOfPattern()
647 else if (OrigPhi == dyn_cast<PHINode>(SI->getFalseValue())) in isAnyOfPattern()
693 PHINode *OrigPhi, Instruction *I, in isFindIVPattern()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp43 void InstCombinerImpl::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { in PHIArgMergedDebugLoc()
59 bool InstCombinerImpl::foldDeadPhiWeb(PHINode &PN) { in foldDeadPhiWeb()
60 SmallVector<PHINode *, 16> Stack; in foldDeadPhiWeb()
61 SmallPtrSet<PHINode *, 16> Visited; in foldDeadPhiWeb()
64 PHINode *Phi = Stack.pop_back_val(); in foldDeadPhiWeb()
71 if (PHINode *PhiUse = dyn_cast<PHINode>(Use)) in foldDeadPhiWeb()
77 for (PHINode *Phi : Visited) in foldDeadPhiWeb()
79 for (PHINode *Phi : Visited) in foldDeadPhiWeb()
134 bool InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) { in foldIntegerTypedPHI()
202 if (isa<PHINode>(Arg)) { in foldIntegerTypedPHI()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSSAUpdater.cpp45 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode *> *NewPHI) in SSAUpdater()
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()
151 for (PHINode &SomePHI : BB->phis()) { in GetValueInMiddleOfBlock()
158 PHINode *InsertedPHI = in GetValueInMiddleOfBlock()
159 PHINode::Create(ProtoType, PredValues.size(), ProtoName); in GetValueInMiddleOfBlock()
191 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse()
251 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions()
266 using PhiT = PHINode;
[all …]
H A DLCSSA.cpp86 SmallVectorImpl<PHINode *> *PHIsToRemove, in formLCSSAForInstructionsImpl()
87 SmallVectorImpl<PHINode *> *InsertedPHIs, in formLCSSAForInstructionsImpl()
90 SmallSetVector<PHINode *, 16> LocalPHIsToRemove; in formLCSSAForInstructionsImpl()
123 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructionsImpl()
146 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructionsImpl()
147 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructionsImpl()
149 SmallVector<PHINode *, 4> LocalInsertedPHIs; in formLCSSAForInstructionsImpl()
164 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructionsImpl()
223 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructionsImpl()
230 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in formLCSSAForInstructionsImpl()
[all …]
H A DBreakCriticalEdges.cpp192 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitKnownCriticalEdge()
196 PHINode *PN = cast<PHINode>(I); in SplitKnownCriticalEdge()
443 PHINode *DirPHI = cast<PHINode>(Direct); in SplitIndirectBrCriticalEdges()
444 PHINode *IndPHI = cast<PHINode>(Indirect); in SplitIndirectBrCriticalEdges()
456 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", InsertPt); in SplitIndirectBrCriticalEdges()
463 PHINode *MergePHI = PHINode::Create(IndPHI->getType(), 2, "merge"); in SplitIndirectBrCriticalEdges()
H A DLoopUnrollRuntime.cpp110 for (PHINode &PN : Succ->phis()) { in ConnectProlog()
118 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr"); in ConnectProlog()
235 for (PHINode &PN : NewExit->phis()) { in ConnectEpilog()
251 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog()
286 for (PHINode &PN : Succ->phis()) { in ConnectEpilog()
289 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr"); in ConnectEpilog()
298 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog()
390 PHINode *NewIdx = in CloneLoopBlocks()
391 PHINode::Create(NewIter->getType(), 2, suffix + ".iter"); in CloneLoopBlocks()
426 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks()
[all …]
H A DBasicBlockUtils.cpp146 if (!isa<PHINode>(BB->begin())) in FoldSingleEntryPHINodes()
149 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes()
171 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHI.operator Value *())) in DeleteDeadPHIs()
217 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
226 if (isa<PHINode>(BB->front())) { in MergeBlockIntoPredecessor()
227 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
228 if (!isa<PHINode>(PN.getIncomingValue(0)) || in MergeBlockIntoPredecessor()
229 cast<PHINode>(PN.getIncomingValue(0))->getParent() != BB) in MergeBlockIntoPredecessor()
671 BasicBlock *NewPred, PHINode *Until) { in updatePhiNodes()
673 for (PHINode &PN : DestBB->phis()) { in updatePhiNodes()
[all …]
H A DCanonicalizeFreezeInLoops.cpp97 PHINode *PHI;
101 FrozenIndPHIInfo(PHINode *PHI, BinaryOperator *StepInst) in FrozenIndPHIInfo()
109 return FrozenIndPHIInfo(DenseMapInfo<PHINode *>::getEmptyKey(), in getEmptyKey()
114 return FrozenIndPHIInfo(DenseMapInfo<PHINode *>::getTombstoneKey(), in getTombstoneKey()
196 SmallSet<PHINode *, 8> ProcessedPHIs; in run()
198 PHINode *PHI = Info.PHI; in run()
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCBoolRetToInt.cpp96 if (auto *P = dyn_cast<PHINode>(V)) { in translate()
100 PHINode *Q = in translate()
101 PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P->getIterator()); in translate()
115 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet;
130 if (const auto *P = dyn_cast<PHINode>(&I)) in getPromotablePHINodes()
134 SmallVector<const PHINode *, 8> ToRemove; in getPromotablePHINodes()
135 for (const PHINode *P : Promotable) { in getPromotablePHINodes()
138 return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHINode>(V); in getPromotablePHINodes()
142 isa<PHINode>(V); in getPromotablePHINodes()
153 const auto *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DDFAJumpThreading.cpp128 PHINode *SIUse;
131 SelectInstToUnfold(SelectInst *SI, PHINode *SIUse) : SI(SI), SIUse(SIUse) {} in SelectInstToUnfold()
134 PHINode *getUse() { return SIUse; } in getUse()
193 PHINode *SIUse = SIToUnfold.getUse(); in unfold()
219 PHINode *NewPhi = PHINode::Create(SIUse->getType(), 1, in unfold()
225 for (PHINode &Phi : EndBlock->phis()) { in unfold()
236 PHINode *EndPhi = PHINode::Create(SIUse->getType(), pred_size(EndBlock), in unfold()
300 PHINode *NewPhiT = PHINode::Create( in unfold()
303 PHINode *NewPhiF = PHINode::Create( in unfold()
319 for (PHINode &Phi : EndBlock->phis()) { in unfold()
[all …]
H A DLoopInterchange.cpp366 bool findInductions(Loop *L, SmallVectorImpl<PHINode *> &Inductions);
374 const SmallPtrSetImpl<PHINode *> &getOuterInnerReductions() const { in getOuterInnerReductions()
378 const ArrayRef<PHINode *> getInnerLoopInductions() const { in getInnerLoopInductions()
395 SmallVector<PHINode *, 8> &Inductions,
408 SmallPtrSet<PHINode *, 4> OuterInnerReductions;
411 SmallVector<PHINode *, 8> InnerLoopInductions;
708 for (PHINode *InnerInduction : InnerLoopInductions) { in isLoopStructureUnderstood()
720 unsigned IncomBlockIndx = PHINode::getIncomingValueNumForOperand(i); in isLoopStructureUnderstood()
800 PHINode *PHI = dyn_cast<PHINode>(SV); in followLCSSA()
810 static PHINode *
[all …]
H A DIndVarSimplify.cpp141 bool handleFloatingPointIV(Loop *L, PHINode *PH);
159 PHINode *IndVar, SCEVExpander &Rewriter);
205 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV()
356 PHINode *NewPHI = in handleFloatingPointIV()
357 PHINode::Create(Int32Ty, 2, PN->getName() + ".int", PN->getIterator()); in handleFloatingPointIV()
414 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHI)) in rewriteNonIntegerIVs()
445 for (PHINode &PN : ExitBB->phis()) { in rewriteFirstIterationLoopExitValues()
475 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx)); in rewriteFirstIterationLoopExitValues()
568 PHINode *IVPhi;
573 IndVarSimplifyVisitor(PHINode *IV, ScalarEvolution *SCEV, in IndVarSimplifyVisitor()
[all …]
H A DLoopFlatten.cpp118 PHINode *InnerInductionPHI = nullptr; // These PHINodes correspond to loop
119 PHINode *OuterInductionPHI = nullptr; // induction variables, which are
139 SmallPtrSet<PHINode *, 4> InnerPHIsToTransform;
144 PHINode *NarrowInnerInductionPHI = nullptr; // Holds the old/narrow induction
145 PHINode *NarrowOuterInductionPHI = nullptr; // phis, i.e. the Phis before IV
153 bool isNarrowInductionPhi(PHINode *Phi) { in isNarrowInductionPhi()
323 PHINode *&InductionPHI, Value *&TripCount, BinaryOperator *&Increment, in verifyTripCount()
390 PHINode *&InductionPHI, Value *&TripCount, BinaryOperator *&Increment, in findLoopComponents()
483 SmallPtrSet<PHINode *, 4> SafeOuterPHIs; in checkPHIs()
488 for (PHINode &InnerPHI : FI.InnerLoop->getHeader()->phis()) { in checkPHIs()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/
H A DProvenanceAnalysis.cpp53 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI()
58 if (const PHINode *PNB = dyn_cast<PHINode>(B)) in relatedPHI()
148 if (const PHINode *PN = dyn_cast<PHINode>(A)) in relatedCheck()
150 if (const PHINode *PN = dyn_cast<PHINode>(B)) in relatedCheck()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/
H A DLoopVectorizationLegality.h266 using ReductionList = MapVector<PHINode *, RecurrenceDescriptor>;
270 using InductionList = MapVector<PHINode *, InductionDescriptor>;
274 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>;
299 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction()
306 const RecurrenceDescriptor &getRecurrenceDescriptor(PHINode *PN) const { in getRecurrenceDescriptor()
334 const InductionDescriptor *getIntOrFpInductionDescriptor(PHINode *Phi) const;
338 const InductionDescriptor *getPointerInductionDescriptor(PHINode *Phi) const;
351 bool isReductionVariable(PHINode *PN) const { return Reductions.count(PN); } in isReductionVariable()
354 bool isFixedOrderRecurrence(const PHINode *Phi) const;
561 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULateCodeGenPrepare.cpp143 return isa<PHINode, ShuffleVectorInst, InsertElementInst, in isCoercionProfitable()
286 SmallPtrSet<PHINode *, 4> PhiNodes; in optimizeLiveType()
304 if (PHINode *Phi = dyn_cast<PHINode>(II)) { in optimizeLiveType()
309 if (PHINode *OpPhi = dyn_cast<PHINode>(V)) { in optimizeLiveType()
329 if (PHINode *OpPhi = dyn_cast<PHINode>(V)) { in optimizeLiveType()
337 if (UseInst->getParent() != II->getParent() || isa<PHINode>(II)) { in optimizeLiveType()
339 if (!isa<PHINode>(II)) in optimizeLiveType()
356 for (PHINode *Phi : PhiNodes) { in optimizeLiveType()
357 ValMap[Phi] = PHINode::Create(calculateConvertType(Phi->getType()), in optimizeLiveType()
363 for (PHINode *Phi : PhiNodes) { in optimizeLiveType()
[all …]
H A DSIAnnotateControlFlow.cpp75 bool isElse(PHINode *Phi);
79 bool eraseIfUnused(PHINode *Phi);
86 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
150 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse()
177 bool SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused()
217 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition()
268 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken"); in handleLoop()
367 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in run()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DPhiValues.h33 class PHINode; variable
52 LLVM_ABI 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.h144 isRecurrenceInstr(Loop *L, PHINode *Phi, Instruction *I, RecurKind Kind,
170 LLVM_ABI static InstDesc isAnyOfPattern(Loop *Loop, PHINode *OrigPhi,
181 PHINode *OrigPhi, Instruction *I,
196 AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop,
207 isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes,
220 LLVM_ABI static bool isFixedOrderRecurrence(PHINode *Phi, Loop *TheLoop,
336 LLVM_ABI SmallVector<Instruction *, 4> getReductionOpChain(PHINode *Phi,
408 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
415 LLVM_ABI static bool isFPInductionPHI(PHINode *Phi, const Loop *L,
425 LLVM_ABI static bool isInductionPHI(PHINode *Phi, const Loop *L,
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DSimplifyIndVar.h29 class PHINode; variable
55 std::pair<bool, bool> simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE,
72 PHINode *NarrowIV = nullptr;
83 PHINode *createWideIV(const WideIVInfo &WI,
H A DScalarEvolutionExpander.h114 DenseSet<AssertingVH<PHINode>> ChainedPhis;
291 LLVM_ABI static bool canReuseFlagsFromOriginalIVInc(PHINode *OrigPhi,
292 PHINode *WidePhi,
419 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); }
529 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
531 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
534 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
537 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
549 void replaceCongruentIVInc(PHINode *&Phi, PHINode *&OrigPhi, Loop *L,
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86LowerAMXType.cpp150 std::pair<Value *, Value *> getShape(PHINode *Phi);
317 std::pair<Value *, Value *> ShapeCalculator::getShape(PHINode *Phi) { in getShape()
334 } else if (isa<PHINode>(V)) { in getShape()
627 Value *PhiOp = cast<PHINode>(V)->getIncomingValue(0); in replaceWithTileLoad()
653 if (isa<PHINode>(V)) in isIncomingOfPHI()
671 void volatileTilePHI(PHINode *PHI);
685 if (isa<PHINode>(V) || V == Store) in updatePhiIncomings()
755 void X86VolatileTileData::volatileTilePHI(PHINode *PHI) { in volatileTilePHI()
794 assert(!isa<PHINode>(V) && "PHI Nodes should be excluded!"); in volatileTileNonPHI()
821 if (isa<PHINode>(&I)) in volatileTileData()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DDominators.cpp137 if (auto *PN = dyn_cast<PHINode>(UserInst)) in dominates()
176 if (isa<InvokeInst>(Def) || isa<CallBrInst>(Def) || isa<PHINode>(User)) in dominates()
266 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates()
296 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates()
328 if (isa<PHINode>(UserInst)) in dominates()
342 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()

12345678910>>...13