Home
last modified time | relevance | path

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

1234567

/external/llvm/lib/Transforms/Utils/
DSSAUpdater.cpp37 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode*> *NewPHI) in SSAUpdater()
64 static bool IsEquivalentPHI(PHINode *PHI, in IsEquivalentPHI()
99 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
137 if (isa<PHINode>(BB->begin())) { in GetValueInMiddleOfBlock()
140 PHINode *SomePHI; in GetValueInMiddleOfBlock()
142 (SomePHI = dyn_cast<PHINode>(It)); ++It) { in GetValueInMiddleOfBlock()
149 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(), in GetValueInMiddleOfBlock()
180 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUse()
197 if (PHINode *UserPN = dyn_cast<PHINode>(User)) in RewriteUseAfterInsertions()
211 typedef PHINode PhiT;
[all …]
DLocal.cpp377 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN, in RecursivelyDeleteDeadPHINode()
452 if (!isa<PHINode>(BB->begin())) in RemovePredecessorAndSimplify()
461 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) { in RemovePredecessorAndSimplify()
483 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) { in MergeBasicBlockIntoOnlyPred()
551 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) { in CanPropagatePredecessorsForPHIs()
552 PHINode *PN = cast<PHINode>(I); in CanPropagatePredecessorsForPHIs()
557 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB)); in CanPropagatePredecessorsForPHIs()
632 static void gatherIncomingValuesToPhi(PHINode *PN, in gatherIncomingValuesToPhi()
648 static void replaceUndefValuesInPhi(PHINode *PN, in replaceUndefValuesInPhi()
672 PHINode *PN) { in redirectValuesFromPredecessorsToPhi()
[all …]
DBreakCriticalEdges.cpp101 PHINode *PN = dyn_cast<PHINode>(I); ++I) { in createPHIsForSplitLoopExit()
107 if (const PHINode *VP = dyn_cast<PHINode>(V)) in createPHIsForSplitLoopExit()
112 PHINode *NewPN = in createPHIsForSplitLoopExit()
113 PHINode::Create(PN->getType(), Preds.size(), "split", in createPHIsForSplitLoopExit()
176 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { in SplitCriticalEdge()
180 PHINode *PN = cast<PHINode>(I); in SplitCriticalEdge()
231 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) { in SplitCriticalEdge()
DBasicBlockUtils.cpp69 if (!isa<PHINode>(BB->begin())) return; in FoldSingleEntryPHINodes()
78 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { in FoldSingleEntryPHINodes()
103 PHINode *PN = dyn_cast<PHINode>(I); ++I) in DeleteDeadPHIs()
108 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*())) in DeleteDeadPHIs()
142 if (PHINode *PN = dyn_cast<PHINode>(BI)) { in MergeBlockIntoPredecessor()
151 if (isa<PHINode>(BB->front())) in MergeBlockIntoPredecessor()
275 while (isa<PHINode>(SplitIt) || isa<LandingPadInst>(SplitIt)) in SplitBlock()
389 for (BasicBlock::iterator I = OrigBB->begin(); isa<PHINode>(I); ) { in UpdatePHINodes()
390 PHINode *PN = cast<PHINode>(I++); in UpdatePHINodes()
431 PHINode *NewPHI = in UpdatePHINodes()
[all …]
DLCSSA.cpp72 if (PHINode *PN = dyn_cast<PHINode>(User)) in processInstruction()
96 SmallVector<PHINode *, 16> AddedPHIs; in processInstruction()
114 PHINode *PN = PHINode::Create(Inst.getType(), PredCache.GetNumPreds(ExitBB), in processInstruction()
145 if (PHINode *PN = dyn_cast<PHINode>(User)) in processInstruction()
148 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { in processInstruction()
212 !isa<PHINode>(I->user_back()))) in formLCSSA()
DSimplifyCFG.cpp136 isa<PHINode>(BBI); ++BBI) { in SafeToMergeTerminators()
137 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators()
154 SmallVectorImpl<PHINode*> &PhiNodes) { in isProfitableToFoldUnconditional()
177 isa<PHINode>(BBI); ++BBI) { in isProfitableToFoldUnconditional()
178 PHINode *PN = cast<PHINode>(BBI); in isProfitableToFoldUnconditional()
193 if (!isa<PHINode>(Succ->begin())) return; // Quick exit if nothing to do in AddPredecessorToBlock()
195 PHINode *PN; in AddPredecessorToBlock()
197 (PN = dyn_cast<PHINode>(I)); ++I) in AddPredecessorToBlock()
985 PHINode *PN; in isSafeToHoistInvoke()
987 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in isSafeToHoistInvoke()
[all …]
DLoopUnroll.cpp56 if (PHINode *PN = dyn_cast<PHINode>(I)) { in RemapInstruction()
273 std::vector<PHINode*> OrigPHINode; in UnrollLoop()
274 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in UnrollLoop()
275 OrigPHINode.push_back(cast<PHINode>(I)); in UnrollLoop()
305 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHINode[i]]); in UnrollLoop()
328 PHINode *phi = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop()
355 PHINode *PN = OrigPHINode[i]; in UnrollLoop()
414 PHINode *Phi = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop()
DDemoteRegToStack.cpp45 if (PHINode *PN = dyn_cast<PHINode>(U)) { in DemoteRegToStack()
100 for (; isa<PHINode>(InsertPt) || isa<LandingPadInst>(InsertPt); ++InsertPt) in DemoteRegToStack()
110 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { in DemotePHIToStack()
140 for (; isa<PHINode>(InsertPt) || isa<LandingPadInst>(InsertPt); ++InsertPt) in DemotePHIToStack()
DCloneFunction.cpp322 if (!isa<PHINode>(NewInst)) { in CloneBlock()
452 SmallVector<const PHINode*, 16> PHIToResolve; in CloneAndPruneFunctionInto()
465 if (const PHINode *PN = dyn_cast<PHINode>(I)) in CloneAndPruneFunctionInto()
479 const PHINode *OPN = PHIToResolve[phino]; in CloneAndPruneFunctionInto()
489 PHINode *PN = cast<PHINode>(VMap[OPN]); in CloneAndPruneFunctionInto()
511 PHINode *PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneFunctionInto()
529 for (; (PN = dyn_cast<PHINode>(I)); ++I) { in CloneAndPruneFunctionInto()
542 PN = cast<PHINode>(NewBB->begin()); in CloneAndPruneFunctionInto()
546 while ((PN = dyn_cast<PHINode>(I++))) { in CloneAndPruneFunctionInto()
565 if (PHINode *PN = dyn_cast<PHINode>(VMap[PHIToResolve[Idx]])) in CloneAndPruneFunctionInto()
[all …]
DCodeExtractor.cpp193 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()
410 PHINode *P = dyn_cast<PHINode>(U.getUser()); in FindPhiPredForUseInBlock()
741 for (BasicBlock::iterator I = header->begin(); isa<PHINode>(I); ++I) { in extractCodeRegion()
742 PHINode *PN = cast<PHINode>(I); in extractCodeRegion()
754 for (BasicBlock::iterator I = Succs[i]->begin(); isa<PHINode>(I); ++I) { in extractCodeRegion()
755 PHINode *PN = cast<PHINode>(I); in extractCodeRegion()
DLoopUnrollRuntime.cpp72 PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI) { in ConnectProlog()
76 PHINode *NewPN = PHINode::Create(PN->getType(), 2, PN->getName()+".unr", in ConnectProlog()
170 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { in CloneLoopBlocks()
171 PHINode *NewPHI = cast<PHINode>(VMap[I]); in CloneLoopBlocks()
DBypassSlowDivision.cpp39 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/
DInstCombinePHI.cpp26 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { in FoldPHIArgBinOpIntoPHI()
83 PHINode *NewLHS = nullptr, *NewRHS = nullptr; in FoldPHIArgBinOpIntoPHI()
85 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(), in FoldPHIArgBinOpIntoPHI()
93 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(), in FoldPHIArgBinOpIntoPHI()
132 Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) { in FoldPHIArgGEPIntoPHI()
203 SmallVector<PHINode*, 16> OperandPhis(FixedOperands.size()); in FoldPHIArgGEPIntoPHI()
209 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e, in FoldPHIArgGEPIntoPHI()
227 if (PHINode *OpPhi = OperandPhis[op]) in FoldPHIArgGEPIntoPHI()
287 Instruction *InstCombiner::FoldPHIArgLoadIntoPHI(PHINode &PN) { in FoldPHIArgLoadIntoPHI()
348 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in FoldPHIArgLoadIntoPHI()
[all …]
/external/llvm/lib/IR/
DBasicBlock.cpp140 while (isa<PHINode>(i)) ++i; in getFirstNonPHI()
150 while (isa<PHINode>(i) || isa<DbgInfoIntrinsic>(i)) ++i; in getFirstNonPHIOrDbg()
161 if (isa<PHINode>(i) || isa<DbgInfoIntrinsic>(i)) in getFirstNonPHIOrDbgOrLifetime()
227 PHINode *APN = dyn_cast<PHINode>(&front()); in removePredecessor()
254 while (PHINode *PN = dyn_cast<PHINode>(&front())) { in removePredecessor()
274 PHINode *PN; in removePredecessor()
275 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) { in removePredecessor()
328 PHINode *PN; in splitBasicBlock()
330 (PN = dyn_cast<PHINode>(II)); ++II) { in splitBasicBlock()
352 PHINode *PN = dyn_cast<PHINode>(II); in replaceSuccessorsPhiUsesWith()
DDominators.cpp101 if (isa<InvokeInst>(Def) || isa<PHINode>(User)) in dominates()
202 PHINode *PN = dyn_cast<PHINode>(UserInst); in dominates()
225 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) in dominates()
257 if (isa<PHINode>(UserInst)) in dominates()
276 if (PHINode *PN = dyn_cast<PHINode>(I)) in isReachableFromEntry()
/external/llvm/lib/Target/R600/
DSIAnnotateControlFlow.cpp75 bool isElse(PHINode *Phi);
77 void eraseIfUnused(PHINode *Phi);
83 Value *handleLoopCondition(Value *Cond, PHINode *Broken);
168 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse()
186 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused()
206 Value *SIAnnotateControlFlow::handleLoopCondition(Value *Cond, PHINode *Broken) { in handleLoopCondition()
207 if (PHINode *Phi = dyn_cast<PHINode>(Cond)) { in handleLoopCondition()
209 PHINode *NewPhi = PHINode::Create(Int64, 0, "", &Parent->front()); in handleLoopCondition()
265 PHINode *Broken = PHINode::Create(Int64, 0, "", &Target->front()); in handleLoop()
311 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
/external/llvm/lib/Transforms/Scalar/
DIndVarSimplify.cpp109 void HandleFloatingPointIV(Loop *L, PHINode *PH);
117 PHINode *IndVar, SCEVExpander &Rewriter);
196 PHINode *PHI = dyn_cast<PHINode>(User); in getInsertPointForUses()
245 void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PN) { in HandleFloatingPointIV()
400 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); in HandleFloatingPointIV()
452 PHINode *PN = dyn_cast<PHINode>(I); ++I) in RewriteNonIntegerIVs()
456 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i])) in RewriteNonIntegerIVs()
496 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin()); in RewriteLoopExitValues()
518 while ((PN = dyn_cast<PHINode>(BBI++))) { in RewriteLoopExitValues()
628 PHINode *NewPN = cast<PHINode>(PN->clone()); in RewriteLoopExitValues()
[all …]
DTailRecursionElimination.cpp108 SmallVectorImpl<PHINode *> &ArgumentPHIs,
113 SmallVectorImpl<PHINode *> &ArgumentPHIs,
117 SmallVectorImpl<PHINode *> &ArgumentPHIs,
390 SmallVector<PHINode*, 8> ArgumentPHIs; in runTRE()
423 PHINode *PN = ArgumentPHIs[i]; in runTRE()
622 SmallVectorImpl<PHINode *> &ArgumentPHIs, in EliminateRecursiveTailCall()
712 PHINode *PN = PHINode::Create(I->getType(), 2, in EliminateRecursiveTailCall()
744 PHINode *AccPN = in EliminateRecursiveTailCall()
745 PHINode::Create(AccumulatorRecursionEliminationInitVal->getType(), in EliminateRecursiveTailCall()
801 SmallVectorImpl<PHINode *> &ArgumentPHIs, in FoldReturnAndProcessPred()
[all …]
DSimplifyCFGPass.cpp95 (!isa<PHINode>(I) || I != BB.begin() || in mergeEmptyReturnBlocks()
122 PHINode *RetBlockPHI = dyn_cast<PHINode>(RetBlock->begin()); in mergeEmptyReturnBlocks()
126 RetBlockPHI = PHINode::Create(Ret->getOperand(0)->getType(), in mergeEmptyReturnBlocks()
DJumpThreading.cpp130 bool ProcessBranchOnPHI(PHINode *PN);
393 if (PHINode *PN = dyn_cast<PHINode>(I)) { in ComputeValueKnownInPredecessors()
498 PHINode *PN = dyn_cast<PHINode>(Cmp->getOperand(0)); in ComputeValueKnownInPredecessors()
827 if (PHINode *PN = dyn_cast<PHINode>(CondInst)) in ProcessBlock()
998 PHINode *PN = PHINode::Create(LI->getType(), std::distance(PB, PE), "", in SimplifyPartiallyRedundantLoad()
1196 bool JumpThreading::ProcessBranchOnPHI(PHINode *PN) { in ProcessBranchOnPHI()
1237 if (!isa<PHINode>(BB->front())) in ProcessBranchOnXOR()
1306 cast<PHINode>(BB->front()).getNumIncomingValues()) { in ProcessBranchOnXOR()
1336 PHINode *PN = dyn_cast<PHINode>(PNI); ++PNI) { in AddPHINodeEntriesForMappedBlock()
1410 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI) in ThreadEdge()
[all …]
DLICM.cpp202 PHINode &PN);
499 static bool isTriviallyReplacablePHI(PHINode &PN, Instruction &I) { in isTriviallyReplacablePHI()
514 if (PHINode *PN = dyn_cast<PHINode>(UI)) { in isNotUsedInLoop()
544 PHINode &PN) { in CloneInstructionInExitBlock()
561 PHINode *OpPN = in CloneInstructionInExitBlock()
562 PHINode::Create(OInst->getType(), PN.getNumIncomingValues(), in CloneInstructionInExitBlock()
598 PHINode *PN = cast<PHINode>(I.user_back()); in sink()
701 PHINode *PN = PHINode::Create( in maybeInsertLCSSAPHI()
896 SmallVector<PHINode*, 16> NewPHIs; in PromoteAliasSet()
/external/llvm/lib/Transforms/ObjCARC/
DProvenanceAnalysis.cpp47 bool ProvenanceAnalysis::relatedPHI(const PHINode *A, in relatedPHI()
52 if (const PHINode *PNB = dyn_cast<PHINode>(B)) in relatedPHI()
149 if (const PHINode *PN = dyn_cast<PHINode>(A)) in relatedCheck()
151 if (const PHINode *PN = dyn_cast<PHINode>(B)) in relatedCheck()
/external/llvm/include/llvm/Analysis/
DScalarEvolutionExpander.h70 std::set<AssertingVH<PHINode> > ChainedPhis;
121 PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty);
188 void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); }
255 bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
257 bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
260 PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
266 Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
/external/llvm/lib/Analysis/
DIVUsers.cpp127 if (!isa<PHINode>(I) && !isSafeToSpeculativelyExecute(I, DL)) in AddUsersImpl()
152 if (isa<PHINode>(User) && Processed.count(User)) in AddUsersImpl()
159 if (PHINode *PHI = dyn_cast<PHINode>(User)) { in AddUsersImpl()
161 unsigned ValNo = PHINode::getIncomingValueNumForOperand(OperandNo); in AddUsersImpl()
175 if (isa<PHINode>(User) || Processed.count(User) || in AddUsersImpl()
262 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) in runOnLoop()
/external/llvm/include/llvm/Transforms/Utils/
DSSAUpdater.h26 class PHINode; variable
54 SmallVectorImpl<PHINode*> *InsertedPHIs;
59 explicit SSAUpdater(SmallVectorImpl<PHINode*> *InsertedPHIs = nullptr);

1234567