/external/llvm/lib/Transforms/Utils/ |
D | SSAUpdater.cpp | 38 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode*> *NewPHI) in SSAUpdater() 65 static bool IsEquivalentPHI(PHINode *PHI, in IsEquivalentPHI() 100 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock() 138 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock() 141 PHINode *SomePHI; in GetValueInMiddleOfBlock() 143 (SomePHI = dyn_cast<PHINode>(It)); ++It) { in GetValueInMiddleOfBlock() 150 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock() 182 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse() 199 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions() 213 typedef PHINode PhiT; [all …]
|
D | BreakCriticalEdges.cpp | 93 PHINode *PN = dyn_cast<PHINode>(I); ++I) { in createPHIsForSplitLoopExit() 99 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit() 104 PHINode *NewPN = PHINode::Create( in createPHIsForSplitLoopExit() 166 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitCriticalEdge() 170 PHINode *PN = cast<PHINode>(I); in SplitCriticalEdge() 213 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) { in SplitCriticalEdge()
|
D | LCSSA.cpp | 81 if (PHINode *PN = dyn_cast<PHINode>(User)) in processInstruction() 104 SmallVector<PHINode *, 16> AddedPHIs; in processInstruction() 105 SmallVector<PHINode *, 8> PostProcessPHIs; in processInstruction() 120 PHINode *PN = PHINode::Create(Inst.getType(), PredCache.size(ExitBB), in processInstruction() 163 if (PHINode *PN = dyn_cast<PHINode>(User)) in processInstruction() 166 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in processInstruction() 198 for (PHINode *PN : AddedPHIs) in processInstruction() 246 !isa<PHINode>(I.user_back()))) in formLCSSA()
|
D | Local.cpp | 403 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN, in RecursivelyDeleteDeadPHINode() 524 if (!isa<PHINode>(BB->begin())) in RemovePredecessorAndSimplify() 533 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) { in RemovePredecessorAndSimplify() 555 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) { in MergeBasicBlockIntoOnlyPred() 624 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) { in CanPropagatePredecessorsForPHIs() 625 PHINode *PN = cast<PHINode>(I); in CanPropagatePredecessorsForPHIs() 630 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB)); in CanPropagatePredecessorsForPHIs() 705 static void gatherIncomingValuesToPhi(PHINode *PN, in gatherIncomingValuesToPhi() 721 static void replaceUndefValuesInPhi(PHINode *PN, in replaceUndefValuesInPhi() 745 PHINode *PN) { in redirectValuesFromPredecessorsToPhi() [all …]
|
D | BasicBlockUtils.cpp | 70 if (!isa<PHINode>(BB->begin())) return; in FoldSingleEntryPHINodes() 72 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes() 95 PHINode *PN = dyn_cast<PHINode>(I); ++I) in DeleteDeadPHIs() 100 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs() 137 if (PHINode *PN = dyn_cast<PHINode>(BI)) { in MergeBlockIntoPredecessor() 146 if (isa<PHINode>(BB->front())) in MergeBlockIntoPredecessor() 287 while (isa<PHINode>(SplitIt) || SplitIt->isEHPad()) in SplitBlock() 398 for (BasicBlock::iterator I = OrigBB->begin(); isa<PHINode>(I); ) { in UpdatePHINodes() 399 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes() 440 PHINode *NewPHI = in UpdatePHINodes() [all …]
|
D | SimplifyCFG.cpp | 109 typedef SmallVector<std::pair<PHINode *, Constant *>, 4> SwitchCaseResultsTy; 173 isa<PHINode>(BBI); ++BBI) { in SafeToMergeTerminators() 174 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators() 189 SmallVectorImpl<PHINode*> &PhiNodes) { in isProfitableToFoldUnconditional() 212 isa<PHINode>(BBI); ++BBI) { in isProfitableToFoldUnconditional() 213 PHINode *PN = cast<PHINode>(BBI); in isProfitableToFoldUnconditional() 228 if (!isa<PHINode>(Succ->begin())) return; // Quick exit if nothing to do in AddPredecessorToBlock() 230 PHINode *PN; in AddPredecessorToBlock() 232 (PN = dyn_cast<PHINode>(I)); ++I) in AddPredecessorToBlock() 1059 PHINode *PN; in isSafeToHoistInvoke() [all …]
|
D | LoopUnroll.cpp | 58 if (PHINode *PN = dyn_cast<PHINode>(I)) { in RemapInstruction() 291 std::vector<PHINode*> OrigPHINode; in UnrollLoop() 292 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in UnrollLoop() 293 OrigPHINode.push_back(cast<PHINode>(I)); in UnrollLoop() 353 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHINode[i]]); in UnrollLoop() 374 PHINode *phi = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop() 401 PHINode *PN = OrigPHINode[i]; in UnrollLoop() 461 PHINode *Phi = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop()
|
D | DemoteRegToStack.cpp | 58 if (PHINode *PN = dyn_cast<PHINode>(U)) { in DemoteRegToStack() 93 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemoteRegToStack() 107 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { in DemotePHIToStack() 137 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) in DemotePHIToStack()
|
D | LoopUnrollRuntime.cpp | 78 PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI) { in ConnectProlog() 82 PHINode *NewPN = PHINode::Create(PN->getType(), 2, PN->getName()+".unr", in ConnectProlog() 191 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2, "prol.iter", in CloneLoopBlocks() 208 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks() 209 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in CloneLoopBlocks()
|
D | CloneFunction.cpp | 357 if (!isa<PHINode>(NewInst)) { in CloneBlock() 533 SmallVector<const PHINode*, 16> PHIToResolve; in CloneAndPruneIntoFromInst() 547 if (const PHINode *PN = dyn_cast<PHINode>(I)) { in CloneAndPruneIntoFromInst() 548 if (isa<PHINode>(VMap[PN])) in CloneAndPruneIntoFromInst() 567 const PHINode *OPN = PHIToResolve[phino]; in CloneAndPruneIntoFromInst() 577 PHINode *PN = cast<PHINode>(VMap[OPN]); in CloneAndPruneIntoFromInst() 599 PHINode *PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst() 617 for (; (PN = dyn_cast<PHINode>(I)); ++I) { in CloneAndPruneIntoFromInst() 630 PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneIntoFromInst() 634 while ((PN = dyn_cast<PHINode>(I++))) { in CloneAndPruneIntoFromInst() [all …]
|
D | CodeExtractor.cpp | 193 PHINode *PN = dyn_cast<PHINode>(Header->begin()); in severSplitPHINodes() 233 PHINode *PN = cast<PHINode>(OldPred->begin()); in severSplitPHINodes() 244 for (AfterPHIs = OldPred->begin(); isa<PHINode>(AfterPHIs); ++AfterPHIs) { in severSplitPHINodes() 245 PHINode *PN = cast<PHINode>(AfterPHIs); in severSplitPHINodes() 248 PHINode *NewPN = PHINode::Create(PN->getType(), 1 + NumPredsFromRegion, in severSplitPHINodes() 411 PHINode *P = dyn_cast<PHINode>(U.getUser()); in FindPhiPredForUseInBlock() 743 for (BasicBlock::iterator I = header->begin(); isa<PHINode>(I); ++I) { in extractCodeRegion() 744 PHINode *PN = cast<PHINode>(I); in extractCodeRegion() 756 for (BasicBlock::iterator I = Succs[i]->begin(); isa<PHINode>(I); ++I) { in extractCodeRegion() 757 PHINode *PN = cast<PHINode>(I); in extractCodeRegion()
|
D | BypassSlowDivision.cpp | 39 PHINode *Quotient; 40 PHINode *Remainder; 42 DivPhiNodes(PHINode *InQuotient, PHINode *InRemainder) in DivPhiNodes() 142 PHINode *QuoPhi = SuccessorBuilder.CreatePHI(Instr->getType(), 2); in insertFastDiv() 145 PHINode *RemPhi = SuccessorBuilder.CreatePHI(Instr->getType(), 2); in insertFastDiv()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombinePHI.cpp | 25 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { in FoldPHIArgBinOpIntoPHI() 82 PHINode *NewLHS = nullptr, *NewRHS = nullptr; in FoldPHIArgBinOpIntoPHI() 84 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(), in FoldPHIArgBinOpIntoPHI() 92 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(), in FoldPHIArgBinOpIntoPHI() 131 Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) { in FoldPHIArgGEPIntoPHI() 202 SmallVector<PHINode*, 16> OperandPhis(FixedOperands.size()); in FoldPHIArgGEPIntoPHI() 208 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e, in FoldPHIArgGEPIntoPHI() 226 if (PHINode *OpPhi = OperandPhis[op]) in FoldPHIArgGEPIntoPHI() 286 Instruction *InstCombiner::FoldPHIArgLoadIntoPHI(PHINode &PN) { in FoldPHIArgLoadIntoPHI() 347 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in FoldPHIArgLoadIntoPHI() [all …]
|
/external/llvm/lib/Target/PowerPC/ |
D | PPCBoolRetToInt.cpp | 82 if (PHINode *P = dyn_cast<PHINode>(V)) { in translate() 86 PHINode *Q = in translate() 87 PHINode::Create(Int32Ty, P->getNumIncomingValues(), P->getName(), P); in translate() 102 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet; 117 if (const PHINode *P = dyn_cast<PHINode>(&I)) in getPromotablePHINodes() 121 SmallVector<const PHINode *, 8> ToRemove; in getPromotablePHINodes() 125 return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHINode>(V) || in getPromotablePHINodes() 130 isa<PHINode>(V); in getPromotablePHINodes() 141 const PHINode *Phi = dyn_cast<PHINode>(V); in getPromotablePHINodes() 203 if (!isa<PHINode>(V) && !isa<Constant>(V) && !isa<Argument>(V)) in runOnUse() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | LoopInterchange.cpp | 302 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) { in getInductionVariable() 303 PHINode *InnerIndexVar = L->getCanonicalInductionVariable(); in getInductionVariable() 308 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) { in getInductionVariable() 309 PHINode *PhiVar = cast<PHINode>(I); in getInductionVariable() 343 bool isLoopStructureUnderstood(PHINode *InnerInductionVar); 355 SmallVector<PHINode *, 8> &Inductions, 356 SmallVector<PHINode *, 8> &Reductions); 544 if (isa<PHINode>(LoopNestExit->begin())) { in processLoopList() 605 PHINode *UserIns = dyn_cast<PHINode>(U); in areAllUsesReductions() 631 PHINode *PHI = dyn_cast<PHINode>(L->getOperand(0)); in containsUnsafeInstructionsInLatch() [all …]
|
D | IndVarSimplify.cpp | 129 void handleFloatingPointIV(Loop *L, PHINode *PH); 138 PHINode *IndVar, SCEVExpander &Rewriter); 220 PHINode *PHI = dyn_cast<PHINode>(User); in getInsertPointForUses() 280 void IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) { in handleFloatingPointIV() 433 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); in handleFloatingPointIV() 485 PHINode *PN = dyn_cast<PHINode>(I); ++I) in rewriteNonIntegerIVs() 489 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in rewriteNonIntegerIVs() 503 PHINode *PN; 509 RewritePhi(PHINode *P, unsigned I, Value *V, bool H, bool S) in RewritePhi() 558 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin()); in rewriteLoopExitValues() [all …]
|
D | TailRecursionElimination.cpp | 110 SmallVectorImpl<PHINode *> &ArgumentPHIs, 115 SmallVectorImpl<PHINode *> &ArgumentPHIs, 119 SmallVectorImpl<PHINode *> &ArgumentPHIs, 396 SmallVector<PHINode*, 8> ArgumentPHIs; in runTRE() 429 PHINode *PN = ArgumentPHIs[i]; in runTRE() 623 SmallVectorImpl<PHINode *> &ArgumentPHIs, in EliminateRecursiveTailCall() 713 PHINode *PN = PHINode::Create(I->getType(), 2, in EliminateRecursiveTailCall() 745 PHINode *AccPN = PHINode::Create( in EliminateRecursiveTailCall() 801 SmallVectorImpl<PHINode *> &ArgumentPHIs, in FoldReturnAndProcessPred() 847 SmallVectorImpl<PHINode *> &ArgumentPHIs, in ProcessReturningBlock()
|
/external/llvm/lib/Target/AMDGPU/ |
D | SIAnnotateControlFlow.cpp | 78 bool isElse(PHINode *Phi); 80 void eraseIfUnused(PHINode *Phi); 86 Value *handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L); 172 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse() 190 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused() 210 Value *SIAnnotateControlFlow::handleLoopCondition(Value *Cond, PHINode *Broken, in handleLoopCondition() 218 PHINode *Phi = nullptr; in handleLoopCondition() 219 if ((Phi = dyn_cast<PHINode>(Cond)) && L->contains(Phi)) { in handleLoopCondition() 222 PHINode *NewPhi = PHINode::Create(Int64, 0, "", &Parent->front()); in handleLoopCondition() 285 PHINode *Broken = PHINode::Create(Int64, 0, "", &Target->front()); in handleLoop() [all …]
|
/external/llvm/lib/IR/ |
D | BasicBlock.cpp | 167 if (!isa<PHINode>(I)) in getFirstNonPHI() 174 if (!isa<PHINode>(I) && !isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbg() 181 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I)) in getFirstNonPHIOrDbgOrLifetime() 273 PHINode *APN = dyn_cast<PHINode>(&front()); in removePredecessor() 300 while (PHINode *PN = dyn_cast<PHINode>(&front())) { in removePredecessor() 320 PHINode *PN; in removePredecessor() 321 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) { in removePredecessor() 388 PHINode *PN; in splitBasicBlock() 390 (PN = dyn_cast<PHINode>(II)); ++II) { in splitBasicBlock() 411 PHINode *PN = dyn_cast<PHINode>(II); in replaceSuccessorsPhiUsesWith()
|
D | Dominators.cpp | 98 if (isa<InvokeInst>(Def) || isa<PHINode>(User)) in dominates() 201 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates() 224 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates() 256 if (isa<PHINode>(UserInst)) in dominates() 275 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
|
/external/llvm/lib/Transforms/ObjCARC/ |
D | ProvenanceAnalysis.cpp | 48 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI() 54 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()
|
/external/llvm/include/llvm/Analysis/ |
D | ScalarEvolutionExpander.h | 70 std::set<AssertingVH<PHINode> > ChainedPhis; 134 PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty); 215 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); } 296 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); 298 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); 301 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, 307 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
|
/external/llvm/unittests/Transforms/Utils/ |
D | Local.cpp | 29 PHINode *phi = builder.CreatePHI(Type::getInt32Ty(C), 2); in TEST() 75 AssertingVH<PHINode> P1 = B.CreatePHI(Type::getInt32Ty(C), 2); in TEST() 78 PHINode *P2 = B.CreatePHI(Type::getInt32Ty(C), 2); in TEST() 81 AssertingVH<PHINode> P3 = B.CreatePHI(Type::getInt32Ty(C), 2); in TEST() 85 PHINode *P4 = B.CreatePHI(Type::getInt32Ty(C), 2); in TEST()
|
/external/llvm/lib/Analysis/ |
D | IVUsers.cpp | 133 if (!isa<PHINode>(I) && !isSafeToSpeculativelyExecute(I)) in AddUsersImpl() 163 if (isa<PHINode>(User) && Processed.count(User)) in AddUsersImpl() 170 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in AddUsersImpl() 172 unsigned ValNo = PHINode::getIncomingValueNumForOperand(OperandNo); in AddUsersImpl() 186 if (isa<PHINode>(User) || Processed.count(User) || in AddUsersImpl() 278 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) in runOnLoop()
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | SSAUpdater.h | 27 class PHINode; variable 55 SmallVectorImpl<PHINode*> *InsertedPHIs; 60 explicit SSAUpdater(SmallVectorImpl<PHINode*> *InsertedPHIs = nullptr);
|