/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | PhiValues.cpp | 49 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 D | IVDescriptors.cpp | 68 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd() 182 Instruction *Exit, PHINode *Phi) { in checkOrderedReduction() 214 PHINode *Phi, RecurKind Kind, Loop *TheLoop, FastMathFlags FuncFMF, in AddReductionVar() 358 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar() 473 if (isa<PHINode>(UI)) { in AddReductionVar() 484 } else if (!isa<PHINode>(UI) && in AddReductionVar() 628 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() 737 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) || in isConditionalRdxPattern() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | SSAUpdater.cpp | 46 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 = in GetValueInMiddleOfBlock() 160 PHINode::Create(ProtoType, PredValues.size(), ProtoName); in GetValueInMiddleOfBlock() 192 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse() 252 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions() 267 using PhiT = PHINode; [all …]
|
H A D | LCSSA.cpp | 80 SmallVectorImpl<PHINode *> *PHIsToRemove, in formLCSSAForInstructions() 81 SmallVectorImpl<PHINode *> *InsertedPHIs) { in formLCSSAForInstructions() 83 SmallSetVector<PHINode *, 16> LocalPHIsToRemove; in formLCSSAForInstructions() 121 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions() 144 SmallVector<PHINode *, 16> AddedPHIs; in formLCSSAForInstructions() 145 SmallVector<PHINode *, 8> PostProcessPHIs; in formLCSSAForInstructions() 147 SmallVector<PHINode *, 4> LocalInsertedPHIs; in formLCSSAForInstructions() 162 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), in formLCSSAForInstructions() 221 if (auto *PN = dyn_cast<PHINode>(User)) in formLCSSAForInstructions() 228 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in formLCSSAForInstructions() [all …]
|
H A D | BreakCriticalEdges.cpp | 191 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitKnownCriticalEdge() 195 PHINode *PN = cast<PHINode>(I); in SplitKnownCriticalEdge() 431 PHINode *DirPHI = cast<PHINode>(Direct); in SplitIndirectBrCriticalEdges() 432 PHINode *IndPHI = cast<PHINode>(Indirect); in SplitIndirectBrCriticalEdges() 444 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", InsertPt); in SplitIndirectBrCriticalEdges() 450 PHINode *MergePHI = PHINode::Create(IndPHI->getType(), 2, "merge"); in SplitIndirectBrCriticalEdges()
|
H A D | LoopUnrollRuntime.cpp | 111 for (PHINode &PN : Succ->phis()) { in ConnectProlog() 119 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr"); in ConnectProlog() 236 for (PHINode &PN : NewExit->phis()) { in ConnectEpilog() 252 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser()); in ConnectEpilog() 287 for (PHINode &PN : Succ->phis()) { in ConnectEpilog() 290 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr"); in ConnectEpilog() 299 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog() 391 PHINode *NewIdx = in CloneLoopBlocks() 392 PHINode::Create(NewIter->getType(), 2, suffix + ".iter"); in CloneLoopBlocks() 427 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks() [all …]
|
H A D | CanonicalizeFreezeInLoops.cpp | 97 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()
|
H A D | BasicBlockUtils.cpp | 147 if (!isa<PHINode>(BB->begin())) in FoldSingleEntryPHINodes() 150 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes() 169 for (PHINode &PN : BB->phis()) in DeleteDeadPHIs() 174 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs() 220 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor() 229 if (isa<PHINode>(BB->front())) { in MergeBlockIntoPredecessor() 230 for (PHINode &PN : BB->phis()) in MergeBlockIntoPredecessor() 231 if (!isa<PHINode>(PN.getIncomingValue(0)) || in MergeBlockIntoPredecessor() 232 cast<PHINode>(PN.getIncomingValue(0))->getParent() != BB) in MergeBlockIntoPredecessor() 811 BasicBlock *NewPred, PHINode *Until) { in updatePhiNodes() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombinePHI.cpp | 43 void InstCombinerImpl::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { in PHIArgMergedDebugLoc() 106 bool InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) { in foldIntegerTypedPHI() 170 if (isa<PHINode>(Arg)) { in foldIntegerTypedPHI() 193 PHINode *MatchingPtrPHI = nullptr; in foldIntegerTypedPHI() 195 for (PHINode &PtrPHI : BB->phis()) { 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() 307 Instruction *InstCombinerImpl::foldPHIArgIntToPtrToPHI(PHINode &PN) { in foldPHIArgIntToPtrToPHI() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCBoolRetToInt.cpp | 99 if (auto *P = dyn_cast<PHINode>(V)) { in translate() 103 PHINode *Q = in translate() 104 PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P->getIterator()); 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 …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LoopInterchange.cpp | 253 bool findInductions(Loop *L, SmallVectorImpl<PHINode *> &Inductions); 261 const SmallPtrSetImpl<PHINode *> &getOuterInnerReductions() const { in getOuterInnerReductions() 265 const SmallVectorImpl<PHINode *> &getInnerLoopInductions() const { in getInnerLoopInductions() 278 SmallVector<PHINode *, 8> &Inductions, 291 SmallPtrSet<PHINode *, 4> OuterInnerReductions; 294 SmallVector<PHINode *, 8> InnerLoopInductions; 604 for (PHINode *InnerInduction : InnerLoopInductions) { in isLoopStructureUnderstood() 616 unsigned IncomBlockIndx = PHINode::getIncomingValueNumForOperand(i); in isLoopStructureUnderstood() 696 PHINode *PHI = dyn_cast<PHINode>(SV); in followLCSSA() 706 static PHINode *findInnerReductionPhi(Loop *L, Value *V) { in findInnerReductionPhi() [all …]
|
H A D | DFAJumpThreading.cpp | 123 PHINode *SIUse; 126 SelectInstToUnfold(SelectInst *SI, PHINode *SIUse) : SI(SI), SIUse(SIUse) {} in SelectInstToUnfold() 129 PHINode *getUse() { return SIUse; } in getUse() 182 DomTreeUpdater *DTU, SelectInst *SI, PHINode *SIUse, SelectInst *SIToSink, in createBasicBlockAndSinkSelectInst() 209 PHINode *SIUse = SIToUnfold.getUse(); in unfold() 264 for (PHINode &Phi : EndBlock->phis()) { in unfold() 300 for (auto II = EndBlock->begin(); PHINode *Phi = dyn_cast<PHINode>(II); in unfold() 426 if (!isa<PHINode>(SICond)) in isCandidate() 441 if (auto *Phi = dyn_cast<PHINode>(Current)) { in isCandidate() 453 if (auto *SelIUse = dyn_cast<PHINode>(SelI->user_back())) in isCandidate() [all …]
|
H A D | IndVarSimplify.cpp | 143 bool handleFloatingPointIV(Loop *L, PHINode *PH); 161 PHINode *IndVar, SCEVExpander &Rewriter); 207 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV() 358 PHINode *NewPHI = in handleFloatingPointIV() 359 PHINode::Create(Int32Ty, 2, PN->getName() + ".int", PN->getIterator()); in handleFloatingPointIV() 413 for (PHINode &PN : Header->phis()) in rewriteNonIntegerIVs() 418 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHI)) in rewriteNonIntegerIVs() 449 for (PHINode &PN : ExitBB->phis()) { in rewriteFirstIterationLoopExitValues() 479 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx)); in rewriteFirstIterationLoopExitValues() 572 PHINode *IVPhi; [all …]
|
H A D | LoopFlatten.cpp | 118 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/Target/AMDGPU/ |
H A D | AMDGPULateCodeGenPrepare.cpp | 280 SmallPtrSet<PHINode *, 4> PhiNodes; in optimizeLiveType() 294 if (PHINode *Phi = dyn_cast<PHINode>(II)) { in optimizeLiveType() 299 if (PHINode *OpPhi = dyn_cast<PHINode>(V)) { in optimizeLiveType() 319 if (PHINode *OpPhi = dyn_cast<PHINode>(V)) { in optimizeLiveType() 327 if (UseInst->getParent() != II->getParent() || isa<PHINode>(II)) { in optimizeLiveType() 329 if (!Defs.count(II) && !isa<PHINode>(II)) { in optimizeLiveType() 347 for (PHINode *Phi : PhiNodes) { in optimizeLiveType() 348 ValMap[Phi] = PHINode::Create(calculateConvertType(Phi->getType()), in optimizeLiveType() 354 for (PHINode *Phi : PhiNodes) { in optimizeLiveType() 355 PHINode *NewPhi = cast<PHINode>(ValMap[Phi]); in optimizeLiveType() [all …]
|
H A D | SIAnnotateControlFlow.cpp | 73 bool isElse(PHINode *Phi); 77 bool eraseIfUnused(PHINode *Phi); 84 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L, 170 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse() 197 bool SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused() 235 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition() 280 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken"); in handleLoop() 383 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/ |
H A D | ProvenanceAnalysis.cpp | 54 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/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/ |
H A D | LoopVectorizationLegality.h | 254 using ReductionList = MapVector<PHINode *, RecurrenceDescriptor>; 258 using InductionList = MapVector<PHINode *, InductionDescriptor>; 262 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>; 287 PHINode *getPrimaryInduction() { return PrimaryInduction; } in getPrimaryInduction() 314 const InductionDescriptor *getIntOrFpInductionDescriptor(PHINode *Phi) const; 318 const InductionDescriptor *getPointerInductionDescriptor(PHINode *Phi) const; 331 bool isReductionVariable(PHINode *PN) const { return Reductions.count(PN); } in isReductionVariable() 334 bool isFixedOrderRecurrence(const PHINode *Phi) const; 463 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID, 500 PHINode *PrimaryInduction = nullptr;
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | PhiValues.h | 32 class PHINode; variable 51 const ValueSet &getValuesForPhi(const PHINode *PN); 79 DenseMap<const PHINode *, unsigned int> DepthMap; 108 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
|
H A D | IVDescriptors.h | 126 static InstDesc isRecurrenceInstr(Loop *L, PHINode *Phi, Instruction *I, 152 static InstDesc isAnyOfPattern(Loop *Loop, PHINode *OrigPhi, Instruction *I, 156 /// Select(FCmp(X, Y), (Z = X op PHINode), PHINode) instruction pattern. 170 AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop, 181 isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes, 194 static bool isFixedOrderRecurrence(PHINode *Phi, Loop *TheLoop, 264 SmallVector<Instruction *, 4> getReductionOpChain(PHINode *Phi, 336 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE, 343 static bool isFPInductionPHI(PHINode *Ph [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | SimplifyIndVar.h | 29 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 D | ScalarEvolutionExpander.h | 111 DenseSet<AssertingVH<PHINode>> ChainedPhis; 283 static bool canReuseFlagsFromOriginalIVInc(PHINode *OrigPhi, PHINode *WidePhi, 404 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); } 514 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); 516 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); 519 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, 522 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L, 534 void replaceCongruentIVInc(PHINode *&Phi, PHINode *&OrigPhi, Loop *L,
|
H A D | Local.h | 47 class PHINode; variable 129 bool RecursivelyDeleteDeadPHINode(PHINode *PN, 176 SmallPtrSetImpl<PHINode *> &ToRemove); 215 AllocaInst *DemotePHIToStack(PHINode *P, std::optional<BasicBlock::iterator> AllocaPoint = std::nul… 279 PHINode *LI, DIBuilder &Builder); 280 void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, PHINode *LI, 289 SmallVectorImpl<PHINode *> &InsertedPHIs);
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86LowerAMXType.cpp | 193 static std::pair<Value *, Value *> getShape(PHINode *Phi) { in getShape() 210 } else if (isa<PHINode>(V)) { in getShape() 495 Value *PhiOp = cast<PHINode>(V)->getIncomingValue(0); in replaceWithTileLoad() 516 if (isa<PHINode>(V)) in isIncomingOfPHI() 534 void volatileTilePHI(PHINode *PHI); 548 if (isa<PHINode>(V) || V == Store) in updatePhiIncomings() 618 void X86VolatileTileData::volatileTilePHI(PHINode *PHI) { in volatileTilePHI() 657 assert(!isa<PHINode>(V) && "PHI Nodes should be excluded!"); in volatileTileNonPHI() 684 if (isa<PHINode>(&I)) in volatileTileData() 699 volatileTilePHI(dyn_cast<PHINode>(I)); in volatileTileData() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | Dominators.cpp | 124 if (auto *PN = dyn_cast<PHINode>(UserInst)) in dominates() 163 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() 315 if (isa<PHINode>(UserInst)) in dominates() 329 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
|