Home
last modified time | relevance | path

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

12345678910>>...12

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DSSAUpdater.cpp46 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode *> *NewPHI) in SSAUpdater()
77 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()
152 for (PHINode &SomePHI : BB->phis()) { 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;
[all …]
H A DLCSSA.cpp82 SmallVectorImpl<PHINode *> *PHIsToRemove) { in formLCSSAForInstructions()
84 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()
219 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in formLCSSAForInstructions()
254 for (PHINode *InsertedPN : InsertedPHIs) { 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()
210 for (PHINode &PN : NewExit->phis()) { in ConnectEpilog()
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()
379 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks()
380 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks()
[all …]
H A DBasicBlockUtils.cpp140 if (!isa<PHINode>(BB->begin())) in FoldSingleEntryPHINodes()
143 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()
219 if (isa<PHINode>(BB->front())) { in MergeBlockIntoPredecessor()
220 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor()
221 if (!isa<PHINode>(PN.getIncomingValue(0)) || in MergeBlockIntoPredecessor()
222 cast<PHINode>(PN.getIncomingValue(0))->getParent() != BB) in MergeBlockIntoPredecessor()
545 BasicBlock *NewPred, PHINode *Until) { in updatePhiNodes()
[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()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp42 void InstCombinerImpl::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { in PHIArgMergedDebugLoc()
105 Instruction *InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) { in foldIntegerTypedPHI()
168 if (isa<PHINode>(Arg)) { in foldIntegerTypedPHI()
191 PHINode *MatchingPtrPHI = nullptr; in foldIntegerTypedPHI()
195 PHINode *PtrPHI = dyn_cast<PHINode>(II); in foldIntegerTypedPHI()
242 if (isa<PHINode>(Inst) && BB->getFirstInsertionPt() == BB->end()) in foldIntegerTypedPHI()
248 PHINode *NewPtrPHI = PHINode::Create( in foldIntegerTypedPHI()
264 assert((isa<PHINode>(IncomingVal) || in foldIntegerTypedPHI()
285 if (isa<PHINode>(IncomingI)) in foldIntegerTypedPHI()
305 InstCombinerImpl::foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN) { in foldPHIArgInsertValueInstructionIntoPHI()
[all …]
/netbsd-src/external/apache2/llvm/dist/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()
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()
[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.cpp89 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd()
195 Instruction *Exit, PHINode *Phi) { in checkOrderedReduction()
218 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurKind Kind, in AddReductionVar()
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()
647 bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop, in isReductionPHI()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/PowerPC/
H A DPPCBoolRetToInt.cpp100 if (auto *P = dyn_cast<PHINode>(V)) { in translate()
104 PHINode *Q = in translate()
105 PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P); 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()
143 return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHINode>(V) || in getPromotablePHINodes()
148 isa<PHINode>(V); in getPromotablePHINodes()
159 const auto *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DLoopInterchange.cpp295 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) { in getInductionVariable()
296 PHINode *InnerIndexVar = L->getCanonicalInductionVariable(); in getInductionVariable()
301 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) { in getInductionVariable()
302 PHINode *PhiVar = cast<PHINode>(I); in getInductionVariable()
337 bool isLoopStructureUnderstood(PHINode *InnerInductionVar);
341 const SmallPtrSetImpl<PHINode *> &getOuterInnerReductions() const { in getOuterInnerReductions()
354 SmallVector<PHINode *, 8> &Inductions,
367 SmallPtrSet<PHINode *, 4> OuterInnerReductions;
639 PHINode *InnerInduction) { in isLoopStructureUnderstood()
652 unsigned IncomBlockIndx = PHINode::getIncomingValueNumForOperand(i); in isLoopStructureUnderstood()
[all …]
H A DSpeculateAroundPHIs.cpp49 isSafeToSpeculatePHIUsers(PHINode &PN, DominatorTree &DT, in isSafeToSpeculatePHIUsers()
118 if (isa<PHINode>(OpI)) { in isSafeToSpeculatePHIUsers()
203 PHINode &PN, SmallDenseMap<PHINode *, InstructionCost, 16> &CostSavingsMap, in isSafeAndProfitableToSpeculateAroundPHI() argument
349 static void visitPHIUsersAndDepsInPostOrder(ArrayRef<PHINode *> PNs, in visitPHIUsersAndDepsInPostOrder()
426 static SmallVector<PHINode *, 16> findProfitablePHIs( in findProfitablePHIs()
427 ArrayRef<PHINode *> PNs, in findProfitablePHIs()
428 const SmallDenseMap<PHINode *, InstructionCost, 16> &CostSavingsMap, in findProfitablePHIs() argument
431 SmallVector<PHINode *, 16> SpecPNs; in findProfitablePHIs()
436 SmallDenseMap<Instruction *, TinyPtrVector<PHINode *>, 16> UserToPNMap; in findProfitablePHIs()
437 SmallDenseMap<PHINode *, int, 16> PNUserCountMap; in findProfitablePHIs()
[all …]
H A DIndVarSimplify.cpp154 bool handleFloatingPointIV(Loop *L, PHINode *PH);
168 PHINode *IndVar, SCEVExpander &Rewriter);
212 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV()
363 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()
449 for (PHINode &PN : ExitBB->phis()) { in rewriteFirstIterationLoopExitValues()
479 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx)); in rewriteFirstIterationLoopExitValues()
571 PHINode *IVPhi;
576 IndVarSimplifyVisitor(PHINode *IV, ScalarEvolution *SCEV, in IndVarSimplifyVisitor()
[all …]
H A DLoopFlatten.cpp77 PHINode *InnerInductionPHI = nullptr;
78 PHINode *OuterInductionPHI = nullptr;
86 SmallPtrSet<PHINode *, 4> InnerPHIsToTransform;
98 PHINode *&InductionPHI, Value *&Limit, BinaryOperator *&Increment, in findLoopComponents()
128 for (PHINode &PHI : L->getHeader()->phis()) { in findLoopComponents()
212 SmallPtrSet<PHINode *, 4> SafeOuterPHIs; in checkPHIs()
217 for (PHINode &InnerPHI : FI.InnerLoop->getHeader()->phis()) { in checkPHIs()
234 PHINode *OuterPHI = dyn_cast<PHINode>(PreHeaderValue); in checkPHIs()
244 PHINode *LCSSAPHI = dyn_cast<PHINode>( in checkPHIs()
266 for (PHINode &OuterPHI : FI.OuterLoop->getHeader()->phis()) { in checkPHIs()
[all …]
H A DJumpThreading.cpp222 static void updatePredecessorProfileMetadata(PHINode *PN, BasicBlock *BB) { in updatePredecessorProfileMetadata()
691 if (PHINode *PN = dyn_cast<PHINode>(I)) { in computeValueKnownInPredecessorsImpl()
827 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in computeValueKnownInPredecessorsImpl()
829 PN = dyn_cast<PHINode>(CmpRHS); in computeValueKnownInPredecessorsImpl()
1224 if (PHINode *PN = dyn_cast<PHINode>(CondInst)) in processBlock()
1236 PHINode *PN = dyn_cast<PHINode>( in processBlock()
1330 if (isOpDefinedInBlock(LoadedPtr, LoadBB) && !isa<PHINode>(LoadedPtr)) in simplifyPartiallyRedundantLoad()
1511 PHINode *PN = PHINode::Create(LoadI->getType(), std::distance(PB, PE), "", in simplifyPartiallyRedundantLoad()
1604 if (PHINode *PHI = dyn_cast<PHINode>(V)) { in evaluateOnPredecessorEdge()
1809 bool JumpThreadingPass::processBranchOnPHI(PHINode *PN) { in processBranchOnPHI()
[all …]
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/external/apache2/llvm/dist/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.h151 static bool AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop,
162 static bool isReductionPHI(PHINode *Phi, Loop *TheLoop,
176 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop,
238 SmallVector<Instruction *, 4> getReductionOpChain(PHINode *Phi,
295 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
302 static bool isFPInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
311 static bool isInductionPHI(PHINode *Phi, const Loop *L,
/netbsd-src/external/apache2/llvm/dist/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>;
288 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction()
319 bool isReductionVariable(PHINode *PN) { return Reductions.count(PN); } in isReductionVariable()
322 bool isFirstOrderRecurrence(const PHINode *Phi);
453 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
502 PHINode *PrimaryInduction = nullptr;
/netbsd-src/external/apache2/llvm/dist/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,
169 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse()
196 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused()
224 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition()
261 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front()); in handleLoop()
352 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
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()
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()
/netbsd-src/external/apache2/llvm/dist/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,

12345678910>>...12