Home
last modified time | relevance | path

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

123456789

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombinePHI.cpp33 void InstCombiner::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { in PHIArgMergedDebugLoc()
96 Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode &PN) { in FoldIntegerTypedPHI()
159 if (isa<PHINode>(Arg)) { in FoldIntegerTypedPHI()
182 PHINode *MatchingPtrPHI = nullptr; in FoldIntegerTypedPHI()
186 PHINode *PtrPHI = dyn_cast<PHINode>(II); in FoldIntegerTypedPHI()
233 if (isa<PHINode>(Inst) && BB->getFirstInsertionPt() == BB->end()) in FoldIntegerTypedPHI()
239 PHINode *NewPtrPHI = PHINode::Create( in FoldIntegerTypedPHI()
255 assert((isa<PHINode>(IncomingVal) || in FoldIntegerTypedPHI()
276 if (isa<PHINode>(IncomingI)) in FoldIntegerTypedPHI()
295 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { in FoldPHIArgBinOpIntoPHI()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DSSAUpdater.cpp46 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode *> *NewPHI) in SSAUpdater()
78 static bool IsEquivalentPHI(PHINode *PHI, in IsEquivalentPHI()
113 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
151 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
154 for (PHINode &SomePHI : BB->phis()) { in GetValueInMiddleOfBlock()
161 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock()
193 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse()
210 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions()
225 using PhiT = PHINode;
233 PHINode *PHI;
[all …]
DBreakCriticalEdges.cpp115 for (PHINode &PN : DestBB->phis()) { in createPHIsForSplitLoopExit()
121 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit()
126 PHINode *NewPN = PHINode::Create( in createPHIsForSplitLoopExit()
180 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitCriticalEdge()
184 PHINode *PN = cast<PHINode>(I); in SplitCriticalEdge()
328 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()
[all …]
DLCSSA.cpp82 SmallSetVector<PHINode *, 16> PHIsToRemove; in formLCSSAForInstructions()
110 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
133 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructions()
134 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructions()
136 SmallVector<PHINode *, 4> InsertedPHIs; in formLCSSAForInstructions()
155 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructions()
199 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions()
202 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in formLCSSAForInstructions()
238 for (PHINode *InsertedPN : InsertedPHIs) { in formLCSSAForInstructions()
253 SmallVector<PHINode *, 2> NeedDbgValues; in formLCSSAForInstructions()
[all …]
DLoopUnrollRuntime.cpp94 for (PHINode &PN : Succ->phis()) { in ConnectProlog()
102 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectProlog()
207 for (PHINode &PN : NewExit->phis()) { in ConnectEpilog()
220 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog()
254 for (PHINode &PN : Succ->phis()) { in ConnectEpilog()
257 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", in ConnectEpilog()
266 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog()
358 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2, in CloneLoopBlocks()
376 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks()
377 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks()
[all …]
DBasicBlockUtils.cpp141 if (!isa<PHINode>(BB->begin())) return; in FoldSingleEntryPHINodes()
143 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes()
160 for (PHINode &PN : BB->phis()) in DeleteDeadPHIs()
165 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs()
208 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
218 if (isa<PHINode>(BB->front())) { in MergeBlockIntoPredecessor()
219 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
220 if (!isa<PHINode>(PN.getIncomingValue(0)) || in MergeBlockIntoPredecessor()
221 cast<PHINode>(PN.getIncomingValue(0))->getParent() != BB) in MergeBlockIntoPredecessor()
521 while (isa<PHINode>(SplitIt) || SplitIt->isEHPad()) in SplitBlock()
[all …]
DLoopUnrollPeel.cpp126 PHINode *Phi, Loop *L, BasicBlock *BackEdge, in calculateIterationsToInvariance()
127 SmallDenseMap<PHINode *, unsigned> &IterationsToInvariance) { in calculateIterationsToInvariance() argument
145 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) { in calculateIterationsToInvariance()
325 SmallDenseMap<PHINode *, unsigned> IterationsToInvariance; in computePeelCount()
333 for (auto BI = L->getHeader()->begin(); isa<PHINode>(&*BI); ++BI) { in computePeelCount()
334 PHINode *Phi = cast<PHINode>(&*BI); in computePeelCount()
557 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in cloneLoopBlocks()
558 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in cloneLoopBlocks()
577 for (PHINode &PHI : Edge.second->phis()) { in cloneLoopBlocks()
754 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in peelLoop()
[all …]
DSimplifyCFG.cpp161 using SwitchCaseResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
245 for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) { in SafeToMergeTerminators()
246 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators()
264 SmallVectorImpl<PHINode *> &PhiNodes) { in isProfitableToFoldUnconditional()
288 for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) { in isProfitableToFoldUnconditional()
289 PHINode *PN = cast<PHINode>(BBI); in isProfitableToFoldUnconditional()
305 for (PHINode &PN : Succ->phis()) in AddPredecessorToBlock()
1222 for (const PHINode &PN : Succ->phis()) { in isSafeToHoistInvoke()
1262 if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) || in HoistThenElseCodeToIf()
1357 for (PHINode &PN : Succ->phis()) { in HoistThenElseCodeToIf()
[all …]
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()
DCloneFunction.cpp340 if (!isa<PHINode>(NewInst)) { in CloneBlock()
492 SmallVector<const PHINode*, 16> PHIToResolve; in CloneAndPruneIntoFromInst()
503 for (const PHINode &PN : BI.phis()) { in CloneAndPruneIntoFromInst()
506 if (isa<PHINode>(VMap[&PN])) in CloneAndPruneIntoFromInst()
522 const PHINode *OPN = PHIToResolve[phino]; in CloneAndPruneIntoFromInst()
532 PHINode *PN = cast<PHINode>(VMap[OPN]); in CloneAndPruneIntoFromInst()
555 PHINode *PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst()
573 for (; (PN = dyn_cast<PHINode>(I)); ++I) { in CloneAndPruneIntoFromInst()
585 PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst()
589 while ((PN = dyn_cast<PHINode>(I++))) { in CloneAndPruneIntoFromInst()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DPhiValues.cpp50 void PhiValues::processPhi(const PHINode *Phi, in processPhi()
51 SmallVectorImpl<const PHINode *> &Stack) { in processPhi()
59 TrackedValues.insert(PhiValuesCallbackVH(const_cast<PHINode *>(Phi), this)); in processPhi()
61 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) { in processPhi()
89 const PHINode *ComponentPhi = Stack.pop_back_val(); in processPhi()
93 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) { in processPhi()
121 if (!isa<PHINode>(V)) in processPhi()
126 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { in getValuesForPhi()
129 SmallVector<const PHINode *, 8> Stack; in getValuesForPhi()
147 if (const PHINode *PN = dyn_cast<PHINode>(V)) in invalidateValue()
[all …]
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()
DIVDescriptors.cpp86 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd()
189 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurrenceKind Kind, in AddReductionVar()
282 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar()
371 if (isa<PHINode>(UI)) in AddReductionVar()
375 } else if (!isa<PHINode>(UI) && in AddReductionVar()
533 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern()
534 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal))) in isConditionalRdxPattern()
538 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal) in isConditionalRdxPattern()
610 bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop, in isReductionPHI()
671 PHINode *Phi, Loop *TheLoop, in isFirstOrderRecurrence()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DLoopInterchange.cpp296 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) { in getInductionVariable()
297 PHINode *InnerIndexVar = L->getCanonicalInductionVariable(); in getInductionVariable()
302 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) { in getInductionVariable()
303 PHINode *PhiVar = cast<PHINode>(I); in getInductionVariable()
338 bool isLoopStructureUnderstood(PHINode *InnerInductionVar);
342 const SmallPtrSetImpl<PHINode *> &getOuterInnerReductions() const { in getOuterInnerReductions()
355 SmallVector<PHINode *, 8> &Inductions,
368 SmallPtrSet<PHINode *, 4> OuterInnerReductions;
628 PHINode *InnerInduction) { in isLoopStructureUnderstood()
641 unsigned IncomBlockIndx = PHINode::getIncomingValueNumForOperand(i); in isLoopStructureUnderstood()
[all …]
DSpeculateAroundPHIs.cpp49 isSafeToSpeculatePHIUsers(PHINode &PN, DominatorTree &DT, in isSafeToSpeculatePHIUsers()
118 if (isa<PHINode>(OpI)) { in isSafeToSpeculatePHIUsers()
203 PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap, in isSafeAndProfitableToSpeculateAroundPHI() argument
343 static void visitPHIUsersAndDepsInPostOrder(ArrayRef<PHINode *> PNs, in visitPHIUsersAndDepsInPostOrder()
420 static SmallVector<PHINode *, 16>
421 findProfitablePHIs(ArrayRef<PHINode *> PNs, in findProfitablePHIs()
422 const SmallDenseMap<PHINode *, int, 16> &CostSavingsMap, in findProfitablePHIs() argument
425 SmallVector<PHINode *, 16> SpecPNs; in findProfitablePHIs()
430 SmallDenseMap<Instruction *, TinyPtrVector<PHINode *>, 16> UserToPNMap; in findProfitablePHIs()
431 SmallDenseMap<PHINode *, int, 16> PNUserCountMap; in findProfitablePHIs()
[all …]
DIndVarSimplify.cpp148 bool handleFloatingPointIV(Loop *L, PHINode *PH);
165 PHINode *IndVar, SCEVExpander &Rewriter);
240 PHINode *PHI = dyn_cast<PHINode>(User); in getInsertPointForUses()
308 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV()
459 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); in handleFloatingPointIV()
509 for (PHINode &PN : Header->phis()) in rewriteNonIntegerIVs()
514 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in rewriteNonIntegerIVs()
530 PHINode *PN;
541 RewritePhi(PHINode *P, unsigned I, Value *V, bool H) in RewritePhi()
600 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin()); in rewriteLoopExitValues()
[all …]
DJumpThreading.cpp211 static void updatePredecessorProfileMetadata(PHINode *PN, BasicBlock *BB) { in updatePredecessorProfileMetadata()
647 if (PHINode *PN = dyn_cast<PHINode>(I)) { in ComputeValueKnownInPredecessorsImpl()
672 if (!isa<PHINode>(Source) && !isa<CmpInst>(Source)) in ComputeValueKnownInPredecessorsImpl()
775 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in ComputeValueKnownInPredecessorsImpl()
777 PN = dyn_cast<PHINode>(CmpRHS); in ComputeValueKnownInPredecessorsImpl()
1172 if (PHINode *PN = dyn_cast<PHINode>(CondInst)) in ProcessBlock()
1184 if (PHINode *PN = dyn_cast<PHINode>(CondInst)) in ProcessBlock()
1272 if (isOpDefinedInBlock(LoadedPtr, LoadBB) && !isa<PHINode>(LoadedPtr)) in SimplifyPartiallyRedundantLoad()
1449 PHINode *PN = PHINode::Create(LoadI->getType(), std::distance(PB, PE), "", in SimplifyPartiallyRedundantLoad()
1726 bool JumpThreadingPass::ProcessBranchOnPHI(PHINode *PN) { in ProcessBranchOnPHI()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/PowerPC/
DPPCBoolRetToInt.cpp98 if (auto *P = dyn_cast<PHINode>(V)) { in translate()
102 PHINode *Q = in translate()
103 PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P); in translate()
118 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet;
133 if (const auto *P = dyn_cast<PHINode>(&I)) in getPromotablePHINodes()
137 SmallVector<const PHINode *, 8> ToRemove; in getPromotablePHINodes()
138 for (const PHINode *P : Promotable) { in getPromotablePHINodes()
141 return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHINode>(V) || in getPromotablePHINodes()
146 isa<PHINode>(V); in getPromotablePHINodes()
157 const auto *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DPhiValues.h34 class PHINode; variable
53 const ValueSet &getValuesForPhi(const PHINode *PN);
74 using PhiSet = SmallPtrSet<const PHINode *, 4>;
82 DenseMap<const PHINode *, unsigned int> DepthMap;
111 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
DScalarEvolutionExpander.h78 DenseSet<AssertingVH<PHINode>> ChainedPhis;
190 PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty);
300 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); }
394 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
396 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
399 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
405 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
409 Instruction *Pos, PHINode *LoopPhi);
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DBasicBlock.cpp198 if (!isa<PHINode>(I)) in getFirstNonPHI()
205 if (!isa<PHINode>(I) && !isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbg()
212 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbgOrLifetime()
298 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin()); in phis()
315 PHINode *APN = dyn_cast<PHINode>(&front()); in removePredecessor()
342 while (PHINode *PN = dyn_cast<PHINode>(&front())) { in removePredecessor()
362 PHINode *PN; in removePredecessor()
363 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) { in removePredecessor()
445 PHINode *PN = dyn_cast<PHINode>(II); in replacePhiUsesWith()
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()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/ObjCARC/
DProvenanceAnalysis.cpp56 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI()
62 if (const PHINode *PNB = dyn_cast<PHINode>(B)) in relatedPHI()
150 if (const PHINode *PN = dyn_cast<PHINode>(A)) in relatedCheck()
152 if (const PHINode *PN = dyn_cast<PHINode>(B)) in relatedCheck()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Vectorize/
DLoopVectorizationLegality.h211 using ReductionList = DenseMap<PHINode *, RecurrenceDescriptor>;
215 using InductionList = MapVector<PHINode *, InductionDescriptor>;
219 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>;
235 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction()
266 bool isReductionVariable(PHINode *PN) { return Reductions.count(PN); } in isReductionVariable()
269 bool isFirstOrderRecurrence(const PHINode *Phi);
372 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
421 PHINode *PrimaryInduction = nullptr;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DSIAnnotateControlFlow.cpp90 bool isElse(PHINode *Phi);
92 void eraseIfUnused(PHINode *Phi);
99 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
185 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse()
203 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused()
231 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition()
268 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front()); in handleLoop()
352 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()

123456789