|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
Declarations
include/llvm/Analysis/BasicAliasAnalysis.h 42 class PHINode;
include/llvm/Analysis/LoopInfo.h 63 class PHINode;
include/llvm/Analysis/MemoryBuiltins.h 48 class PHINode;
include/llvm/Analysis/PhiValues.h 34 class PHINode;
include/llvm/CodeGen/GlobalISel/IRTranslator.h 48 class PHINode;
include/llvm/IR/BasicBlock.h 39 class PHINode;
include/llvm/IR/Instruction.def 208 HANDLE_OTHER_INST(55, PHI , PHINode ) // PHI node instruction
include/llvm/Transforms/Scalar/GVN.h 50 class PHINode;
include/llvm/Transforms/Scalar/JumpThreading.h 43 class PHINode;
include/llvm/Transforms/Scalar/SROA.h 31 class PHINode;
include/llvm/Transforms/Utils/Local.h 54 class PHINode;
include/llvm/Transforms/Utils/SSAUpdater.h 25 class PHINode;
include/llvm/Transforms/Utils/SSAUpdaterBulk.h 24 class PHINode;
include/llvm/Transforms/Utils/SimplifyIndVar.h 26 class PHINode;
include/llvm/Transforms/Vectorize/SLPVectorizer.h 42 class PHINode;
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h 76 class PHINode;
lib/Transforms/ObjCARC/ProvenanceAnalysis.h 36 class PHINode;
tools/polly/include/polly/ZoneAlgo.h 26 class PHINode;
References
examples/BrainF/BrainF.cpp 190 void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
302 PHINode *phi_0 =
303 PHINode::Create(PointerType::getUnqual(IntegerType::getInt8Ty(C)),
457 PHINode *phi_1 = builder->
examples/BrainF/BrainF.h 73 void readloop(PHINode *phi, BasicBlock *oldbb,
examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp 880 PHINode *PN = Builder->CreatePHI(Type::getDoubleTy(*TheContext), 2, "iftmp");
examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp 880 PHINode *PN = Builder->CreatePHI(Type::getDoubleTy(*TheContext), 2, "iftmp");
examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp 879 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp 865 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
examples/Kaleidoscope/BuildingAJIT/Chapter5/toy.cpp 889 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
examples/Kaleidoscope/Chapter5/toy.cpp 666 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
707 PHINode *Variable =
examples/Kaleidoscope/Chapter6/toy.cpp 778 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
819 PHINode *Variable =
examples/Kaleidoscope/Chapter7/toy.cpp 885 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
examples/Kaleidoscope/Chapter8/toy.cpp 884 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
examples/Kaleidoscope/Chapter9/toy.cpp 1047 PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
include/llvm/ADT/ArrayRef.h 108 const ArrayRef<U *> &A,
110 std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
118 const SmallVectorTemplateCommon<U *, DummyT> &Vec,
120 std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
include/llvm/ADT/DenseMapInfo.h 39 static inline T* getEmptyKey() {
41 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
45 static inline T* getTombstoneKey() {
47 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
51 static unsigned getHashValue(const T *PtrVal) {
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/SmallSet.h 249 class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
include/llvm/ADT/iterator.h 68 : public std::iterator<IteratorCategoryT, T, DifferenceTypeT, PointerT,
include/llvm/Analysis/BasicAliasAnalysis.h 204 AliasResult aliasPHI(const PHINode *PN, LocationSize PNSize,
include/llvm/Analysis/DivergenceAnalysis.h 86 bool updatePHINode(const PHINode &Phi) const;
include/llvm/Analysis/IVDescriptors.h 170 static bool AddReductionVar(PHINode *Phi, RecurrenceKind Kind, Loop *TheLoop,
181 static bool isReductionPHI(PHINode *Phi, Loop *TheLoop,
195 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop,
294 isInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
301 static bool isFPInductionPHI(PHINode *Phi, const Loop *L, ScalarEvolution *SE,
310 static bool isInductionPHI(PHINode *Phi, const Loop *L,
include/llvm/Analysis/LoopInfo.h 131 template <class InstT> bool contains(const InstT *Inst) const {
569 PHINode *getCanonicalInductionVariable() const;
622 static Optional<Loop::LoopBounds> getBounds(const Loop &L, PHINode &IndVar,
717 PHINode *getInductionVariable(ScalarEvolution &SE) const;
731 bool isAuxiliaryInductionVariable(PHINode &AuxIndVar,
1130 auto *UBB = isa<PHINode>(UI) ? cast<PHINode>(UI)->getIncomingBlock(U)
1130 auto *UBB = isa<PHINode>(UI) ? cast<PHINode>(UI)->getIncomingBlock(U)
1142 if (isa<PHINode>(Inst))
include/llvm/Analysis/LoopUnrollAnalyzer.h 91 bool visitPHINode(PHINode &PN);
include/llvm/Analysis/MemoryBuiltins.h 271 SizeOffsetType visitPHINode(PHINode&);
338 SizeOffsetEvalType visitPHINode(PHINode &PHI);
include/llvm/Analysis/PhiValues.h 74 using PhiSet = SmallPtrSet<const PHINode *, 4>;
82 DenseMap<const PHINode *, unsigned int> DepthMap;
111 void processPhi(const PHINode *PN, SmallVector<const PHINode *, 8> &Stack);
111 void processPhi(const PHINode *PN, SmallVector<const PHINode *, 8> &Stack);
include/llvm/Analysis/ScalarEvolution.h 1173 SmallPtrSet<const PHINode *, 6> PendingPhiRanges;
1176 SmallPtrSet<const PHINode *, 6> PendingMerges;
1368 DenseMap<PHINode *, Constant *> ConstantEvolutionLoopExitValue;
1462 const SCEV *createNodeForPHI(PHINode *PN);
1465 const SCEV *createAddRecFromPHI(PHINode *PN);
1468 const SCEV *createSimpleAffineAddRec(PHINode *PN, Value *BEValueV,
1472 const SCEV *createNodeFromSelectLikePHI(PHINode *PN);
1726 Constant *getConstantEvolutionLoopExitValue(PHINode *PN, const APInt &BEs,
include/llvm/Analysis/ScalarEvolutionExpander.h 78 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);
include/llvm/Analysis/SparsePropagation.h 76 virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; }
195 void visitPHINode(PHINode &I);
279 for (BasicBlock::iterator I = Dest->begin(); isa<PHINode>(I); ++I)
280 visitPHINode(*cast<PHINode>(I));
397 void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) {
452 if (PHINode *PN = dyn_cast<PHINode>(&I))
452 if (PHINode *PN = dyn_cast<PHINode>(&I))
include/llvm/Analysis/TargetTransformInfoImpl.h 846 if (isa<PHINode>(U))
include/llvm/CodeGen/FunctionLoweringInfo.h 254 void ComputePHILiveOutRegInfo(const PHINode*);
258 void InvalidatePHILiveOutRegInfo(const PHINode *PN) {
include/llvm/CodeGen/GlobalISel/IRTranslator.h 162 SmallVector<std::pair<const PHINode *, SmallVector<MachineInstr *, 1>>, 4>
include/llvm/CodeGen/StackProtector.h 68 SmallPtrSet<const PHINode *, 16> VisitedPHIs;
include/llvm/IR/BasicBlock.h 293 : public iterator_facade_base<phi_iterator_impl<PHINodeT, BBIteratorT>,
294 std::forward_iterator_tag, PHINodeT> {
297 PHINodeT *PN;
299 phi_iterator_impl(PHINodeT *PN) : PN(PN) {}
308 phi_iterator_impl(const phi_iterator_impl<PHINodeU, BBIteratorU> &Arg)
313 PHINodeT &operator*() const { return *PN; }
318 PN = dyn_cast<PHINodeT>(std::next(BBIteratorT(PN)));
324 phi_iterator_impl<const PHINode, BasicBlock::const_iterator>;
include/llvm/IR/IRBuilder.h 845 InstTy *Insert(InstTy *I, const Twine &Name = "") const {
845 InstTy *Insert(InstTy *I, const Twine &Name = "") const {
2249 PHINode *CreatePHI(Type *Ty, unsigned NumReservedValues,
2251 PHINode *Phi = PHINode::Create(Ty, NumReservedValues);
2251 PHINode *Phi = PHINode::Create(Ty, NumReservedValues);
include/llvm/IR/InstVisitor.h 177 RetTy visitPHINode(PHINode &I) { DELEGATE(Instruction);}
include/llvm/IR/Instructions.h 2551 PHINode(const PHINode &PN);
2574 PHINode *cloneImpl() const;
2586 static PHINode *Create(Type *Ty, unsigned NumReservedValues,
2589 return new PHINode(Ty, NumReservedValues, NameStr, InsertBefore);
2592 static PHINode *Create(Type *Ty, unsigned NumReservedValues,
2594 return new PHINode(Ty, NumReservedValues, NameStr, InsertAtEnd);
include/llvm/IR/User.h 127 template <int Idx, typename U> static Use &OpFrom(const U *that) {
129 ? OperandTraits<U>::op_end(const_cast<U*>(that))[Idx]
130 : OperandTraits<U>::op_begin(const_cast<U*>(that))[Idx];
include/llvm/IR/ValueHandle.h 256 ValueTy *getValPtr() const { return static_cast<ValueTy *>(getRawValPtr()); }
257 void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
262 AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {}
269 operator ValueTy*() const {
273 ValueTy *operator=(ValueTy *RHS) {
273 ValueTy *operator=(ValueTy *RHS) {
277 ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
277 ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
282 ValueTy *operator->() const { return getValPtr(); }
283 ValueTy &operator*() const { return *getValPtr(); }
289 static inline AssertingVH<T> getEmptyKey() {
290 AssertingVH<T> Res;
295 static inline AssertingVH<T> getTombstoneKey() {
296 AssertingVH<T> Res;
301 static unsigned getHashValue(const AssertingVH<T> &Val) {
305 static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
305 static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
include/llvm/Support/Casting.h 57 static inline bool doit(const From &Val) {
58 return To::classof(&Val);
66 static inline bool doit(const From &) { return true; }
77 return isa_impl<To, From>::doit(Val);
92 return isa_impl<To, From>::doit(*Val);
104 static inline bool doit(const From *Val) {
106 return isa_impl<To, From>::doit(*Val);
106 return isa_impl<To, From>::doit(*Val);
122 return isa_impl_wrap<To, SimpleFrom,
132 return isa_impl_cl<To,FromTy>::doit(Val);
142 return isa_impl_wrap<X, const Y,
165 using ret_type = To &; // Normal case, return Ty&
168 using ret_type = const To &; // Normal case, return Ty&
172 using ret_type = To *; // Pointer arg case, return Ty*
176 using ret_type = const To *; // Constant pointer arg case, return const Ty*
198 using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
204 using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
218 static typename cast_retty<To, From>::ret_type doit(From &Val) {
219 return cast_convert_val<To, SimpleFrom,
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
228 typename cast_retty<To, FromTy>::ret_type Res2
248 typename cast_retty<X, const Y>::ret_type>::type
252 X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
258 return cast_convert_val<X, Y,
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
265 return cast_convert_val<X, Y*,
265 return cast_convert_val<X, Y*,
266 typename simplify_type<Y*>::SimpleType>::doit(Val);
331 typename cast_retty<X, const Y>::ret_type>::type
333 return isa<X>(Val) ? cast<X>(Val) : nullptr;
333 return isa<X>(Val) ? cast<X>(Val) : nullptr;
337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
338 return isa<X>(Val) ? cast<X>(Val) : nullptr;
338 return isa<X>(Val) ? cast<X>(Val) : nullptr;
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
367 dyn_cast_or_null(Y *Val) {
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h 56 static inline void *getAsVoidPointer(T *P) { return P; }
57 static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
59 enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
91 typedef PointerLikeTypeTraits<T *> NonConst;
93 static inline const void *getAsVoidPointer(const T *P) {
96 static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Transforms/Scalar/GVN.h 103 DenseMap<uint32_t, PHINode *> NumberingPhi;
include/llvm/Transforms/Scalar/JumpThreading.h 136 bool ProcessBranchOnPHI(PHINode *PN);
142 PHINode *SIUse, unsigned Idx);
include/llvm/Transforms/Scalar/SROA.h 101 SetVector<PHINode *, SmallVector<PHINode *, 2>> SpeculatablePHIs;
101 SetVector<PHINode *, SmallVector<PHINode *, 2>> SpeculatablePHIs;
include/llvm/Transforms/Utils/Local.h 164 bool RecursivelyDeleteDeadPHINode(PHINode *PN,
249 AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = nullptr);
300 PHINode *LI, DIBuilder &Builder);
308 SmallVectorImpl<PHINode *> &InsertedPHIs);
include/llvm/Transforms/Utils/SSAUpdater.h 54 SmallVectorImpl<PHINode *> *InsertedPHIs;
59 explicit SSAUpdater(SmallVectorImpl<PHINode *> *InsertedPHIs = nullptr);
include/llvm/Transforms/Utils/SSAUpdaterBulk.h 86 SmallVectorImpl<PHINode *> *InsertedPHIs = nullptr);
include/llvm/Transforms/Utils/SSAUpdaterImpl.h 390 for (auto &SomePHI : BB->phis()) {
include/llvm/Transforms/Utils/SimplifyIndVar.h 48 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT,
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h 211 using ReductionList = DenseMap<PHINode *, RecurrenceDescriptor>;
215 using InductionList = MapVector<PHINode *, InductionDescriptor>;
219 using RecurrenceSet = SmallPtrSet<const PHINode *, 8>;
235 PHINode *getPrimaryInduction() { return PrimaryInduction; }
266 bool isReductionVariable(PHINode *PN) { return Reductions.count(PN); }
269 bool isFirstOrderRecurrence(const PHINode *Phi);
372 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
421 PHINode *PrimaryInduction = nullptr;
include/llvm/Transforms/Vectorize/SLPVectorizer.h 116 bool vectorizeRootInstruction(PHINode *P, Value *V, BasicBlock *BB,
lib/Analysis/BasicAliasAnalysis.cpp 692 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
692 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
1181 if (isa<PHINode>(GEP1LastIdx) || isa<PHINode>(GEP2LastIdx)) {
1181 if (isa<PHINode>(GEP1LastIdx) || isa<PHINode>(GEP2LastIdx)) {
1581 AliasResult BasicAAResult::aliasPHI(const PHINode *PN, LocationSize PNSize,
1593 if (const PHINode *PN2 = dyn_cast<PHINode>(V2))
1593 if (const PHINode *PN2 = dyn_cast<PHINode>(V2))
1670 if (isa<PHINode>(PV1))
1853 if (isa<PHINode>(V2) && !isa<PHINode>(V1)) {
1853 if (isa<PHINode>(V2) && !isa<PHINode>(V1)) {
1859 if (const PHINode *PN = dyn_cast<PHINode>(V1)) {
1859 if (const PHINode *PN = dyn_cast<PHINode>(V1)) {
lib/Analysis/BranchProbabilityInfo.cpp 506 PHINode *CmpPHI = dyn_cast<PHINode>(CmpLHS);
506 PHINode *CmpPHI = dyn_cast<PHINode>(CmpLHS);
518 CmpPHI = dyn_cast<PHINode>(CmpLHS);
524 SmallPtrSet<PHINode*, 8> VisitedInsts;
525 SmallVector<PHINode*, 8> WorkList;
529 PHINode *P = WorkList.back();
538 if (PHINode *PN = dyn_cast<PHINode>(V)) {
538 if (PHINode *PN = dyn_cast<PHINode>(V)) {
lib/Analysis/CFLGraph.h 311 void visitPHINode(PHINode &Inst) {
lib/Analysis/CaptureTracking.cpp 103 if (isa<InvokeInst>(BeforeHere) || isa<PHINode>(I) || I == BeforeHere)
lib/Analysis/ConstantFolding.cpp 1121 if (auto *PN = dyn_cast<PHINode>(I)) {
1121 if (auto *PN = dyn_cast<PHINode>(I)) {
lib/Analysis/DivergenceAnalysis.cpp 153 bool DivergenceAnalysis::updatePHINode(const PHINode &Phi) const {
218 for (auto &Phi : UserBlock->phis()) {
254 for (const auto &Phi : Block.phis()) {
392 const auto *Phi = dyn_cast<const PHINode>(&I);
392 const auto *Phi = dyn_cast<const PHINode>(&I);
lib/Analysis/GlobalsModRef.cpp 668 if (auto *PN = dyn_cast<PHINode>(Input)) {
785 if (auto *PN = dyn_cast<PHINode>(Input)) {
lib/Analysis/IVDescriptors.cpp 87 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT,
190 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurrenceKind Kind,
283 bool IsAPhi = isa<PHINode>(Cur);
372 if (isa<PHINode>(UI))
376 } else if (!isa<PHINode>(UI) &&
534 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) ||
534 if ((isa<PHINode>(*TrueVal) && isa<PHINode>(*FalseVal)) ||
535 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal)))
535 (!isa<PHINode>(*TrueVal) && !isa<PHINode>(*FalseVal)))
539 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal)
611 bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
672 PHINode *Phi, Loop *TheLoop,
695 if (!Previous || !TheLoop->contains(Previous) || isa<PHINode>(Previous) ||
827 bool InductionDescriptor::isFPInductionPHI(PHINode *Phi, const Loop *TheLoop,
918 auto *PN = cast<PHINode>(PhiScev->getValue());
918 auto *PN = cast<PHINode>(PhiScev->getValue());
985 bool InductionDescriptor::isInductionPHI(PHINode *Phi, const Loop *TheLoop,
1030 PHINode *Phi, const Loop *TheLoop, ScalarEvolution *SE,
lib/Analysis/IVUsers.cpp 147 PHINode *PN = dyn_cast<PHINode>(User);
147 PHINode *PN = dyn_cast<PHINode>(User);
182 if (!isa<PHINode>(I) && !isSafeToSpeculativelyExecute(I))
212 if (isa<PHINode>(User) && Processed.count(User))
219 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
219 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
221 unsigned ValNo = PHINode::getIncomingValueNumForOperand(OperandNo);
235 if (isa<PHINode>(User) || Processed.count(User) ||
314 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I)
lib/Analysis/InlineCost.cpp 266 bool visitPHI(PHINode &I);
464 bool CallAnalyzer::visitPHI(PHINode &I) {
lib/Analysis/InstructionSimplify.cpp 141 static bool valueDominatesPHI(Value *V, PHINode *P, const DominatorTree *DT) {
490 PHINode *PI;
491 if (isa<PHINode>(LHS)) {
492 PI = cast<PHINode>(LHS);
498 PI = cast<PHINode>(RHS);
533 if (!isa<PHINode>(LHS)) {
538 PHINode *PI = cast<PHINode>(LHS);
538 PHINode *PI = cast<PHINode>(LHS);
877 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
877 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1055 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1055 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1097 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1097 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1224 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
1224 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
2011 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
2011 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
2190 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
2190 if (isa<PHINode>(Op0) || isa<PHINode>(Op1))
3462 if (isa<PHINode>(LHS) || isa<PHINode>(RHS))
3462 if (isa<PHINode>(LHS) || isa<PHINode>(RHS))
3651 if (isa<PHINode>(LHS) || isa<PHINode>(RHS))
3651 if (isa<PHINode>(LHS) || isa<PHINode>(RHS))
4244 static Value *SimplifyPHINode(PHINode *PN, const SimplifyQuery &Q) {
5371 Result = SimplifyPHINode(cast<PHINode>(I), Q);
lib/Analysis/LazyValueInfo.cpp 419 bool solveBlockValuePHINode(ValueLatticeElement &BBLV, PHINode *PN,
627 if (PHINode *PN = dyn_cast<PHINode>(BBI))
627 if (PHINode *PN = dyn_cast<PHINode>(BBI))
781 PHINode *PN, BasicBlock *BB) {
1904 if (auto *PHI = dyn_cast<PHINode>(V))
1904 if (auto *PHI = dyn_cast<PHINode>(V))
2030 if (!isa<PHINode>(UseI) || DT.dominates(ParentBB, UseI->getParent()))
lib/Analysis/LegacyDivergenceAnalysis.cpp 170 for (auto I = IPostDom->begin(); isa<PHINode>(I); ++I) {
173 if (!cast<PHINode>(I)->hasConstantOrUndefValue() && DV.insert(&*I).second)
lib/Analysis/Lint.cpp 689 } else if (PHINode *PN = dyn_cast<PHINode>(V)) {
689 } else if (PHINode *PN = dyn_cast<PHINode>(V)) {
lib/Analysis/Loads.cpp 187 if (isa<BinaryOperator>(A) || isa<CastInst>(A) || isa<PHINode>(A) ||
lib/Analysis/LoopInfo.cpp 146 PHINode *Loop::getCanonicalInductionVariable() const {
154 for (BasicBlock::iterator I = H->begin(); isa<PHINode>(I); ++I) {
155 PHINode *PN = cast<PHINode>(I);
155 PHINode *PN = cast<PHINode>(I);
180 static Value *findFinalIVValue(const Loop &L, const PHINode &IndVar,
198 PHINode &IndVar,
284 if (PHINode *IndVar = getInductionVariable(SE))
290 PHINode *Loop::getInductionVariable(ScalarEvolution &SE) const {
303 for (PHINode &IndVar : Header->phis()) {
330 if (PHINode *IndVar = getInductionVariable(SE))
336 bool Loop::isAuxiliaryInductionVariable(PHINode &AuxIndVar,
433 if (const PHINode *P = dyn_cast<PHINode>(UI))
433 if (const PHINode *P = dyn_cast<PHINode>(UI))
lib/Analysis/LoopUnrollAnalyzer.cpp 206 bool UnrolledInstAnalyzer::visitPHINode(PHINode &PN) {
lib/Analysis/MemoryBuiltins.cpp 780 SizeOffsetType ObjectSizeOffsetVisitor::visitPHINode(PHINode&) {
989 SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitPHINode(PHINode &PHI) {
991 PHINode *SizePHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues());
992 PHINode *OffsetPHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues());
lib/Analysis/MustExecute.cpp 135 auto *LHS = dyn_cast<PHINode>(Cond->getOperand(0));
135 auto *LHS = dyn_cast<PHINode>(Cond->getOperand(0));
lib/Analysis/PHITransAddr.cpp 26 if (isa<PHINode>(Inst) ||
168 if (PHINode *PN = dyn_cast<PHINode>(Inst))
168 if (PHINode *PN = dyn_cast<PHINode>(Inst))
lib/Analysis/PhiValues.cpp 49 void PhiValues::processPhi(const PHINode *Phi,
50 SmallVector<const PHINode *, 8> &Stack) {
60 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) {
60 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) {
85 const PHINode *ComponentPhi = Stack.pop_back_val();
89 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) {
89 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) {
107 if (!isa<PHINode>(V))
115 SmallVector<const PHINode *, 8> Stack;
132 if (const PHINode *PN = dyn_cast<PHINode>(V))
132 if (const PHINode *PN = dyn_cast<PHINode>(V))
153 for (const PHINode &PN : BB.phis()) {
186 for (const PHINode &PN : BB.phis())
lib/Analysis/ScalarEvolution.cpp 4218 if (!isa<PHINode>(I) ||
4621 static const Loop *isIntegerLoopHeaderPHI(const PHINode *PN, LoopInfo &LI) {
4690 auto *PN = cast<PHINode>(SymbolicPHI->getValue());
4690 auto *PN = cast<PHINode>(SymbolicPHI->getValue());
4896 auto *PN = cast<PHINode>(SymbolicPHI->getValue());
4896 auto *PN = cast<PHINode>(SymbolicPHI->getValue());
4959 const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN,
5003 const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) {
5238 static bool BrPHIToSelect(DominatorTree &DT, BranchInst *BI, PHINode *Merge,
5268 const SCEV *ScalarEvolution::createNodeFromSelectLikePHI(PHINode *PN) {
5307 const SCEV *ScalarEvolution::createNodeForPHI(PHINode *PN) {
5729 if (const PHINode *Phi = dyn_cast<PHINode>(U->getValue())) {
5729 if (const PHINode *Phi = dyn_cast<PHINode>(U->getValue())) {
6486 return createNodeForPHI(cast<PHINode>(U));
6641 for (PHINode &PN : Header->phis())
6691 isa<PHINode>(L->getHeader()->begin())) {
6721 if (!isa<PHINode>(I) || !isa<SCEVUnknown>(Old)) {
6725 if (PHINode *PN = dyn_cast<PHINode>(I))
6725 if (PHINode *PN = dyn_cast<PHINode>(I))
6839 if (PHINode *PN = dyn_cast<PHINode>(I))
6839 if (PHINode *PN = dyn_cast<PHINode>(I))
6878 if (PHINode *PN = dyn_cast<PHINode>(I))
6878 if (PHINode *PN = dyn_cast<PHINode>(I))
7631 PNOut = dyn_cast<PHINode>(LHS);
7651 PHINode *PN;
7729 if (isa<PHINode>(I)) {
7742 static PHINode *
7744 DenseMap<Instruction *, PHINode *> &PHIMap,
7751 PHINode *PHI = nullptr;
7758 PHINode *P = dyn_cast<PHINode>(OpInst);
7758 PHINode *P = dyn_cast<PHINode>(OpInst);
7785 static PHINode *getConstantEvolvingPHI(Value *V, const Loop *L) {
7789 if (PHINode *PN = dyn_cast<PHINode>(I))
7789 if (PHINode *PN = dyn_cast<PHINode>(I))
7793 DenseMap<Instruction *, PHINode *> PHIMap;
7819 if (isa<PHINode>(I)) return nullptr;
7849 static Constant *getOtherIncomingValue(PHINode *PN, BasicBlock *BB) {
7875 ScalarEvolution::getConstantEvolutionLoopExitValue(PHINode *PN,
7895 for (PHINode &PHI : Header->phis()) {
7929 SmallVector<std::pair<PHINode *, Constant *>, 8> PHIsToCompute;
7931 PHINode *PHI = dyn_cast<PHINode>(I.first);
7931 PHINode *PHI = dyn_cast<PHINode>(I.first);
7938 PHINode *PHI = I.first;
7960 PHINode *PN = getConstantEvolvingPHI(Cond, L);
7974 for (PHINode &PHI : Header->phis()) {
8004 SmallVector<PHINode *, 8> PHIsToCompute;
8006 PHINode *PHI = dyn_cast<PHINode>(I.first);
8006 PHINode *PHI = dyn_cast<PHINode>(I.first);
8010 for (PHINode *PHI : PHIsToCompute) {
8152 if (PHINode *PN = dyn_cast<PHINode>(I)) {
8152 if (PHINode *PN = dyn_cast<PHINode>(I)) {
10008 const PHINode *LPhi = nullptr, *RPhi = nullptr;
10025 if (auto *Phi = dyn_cast<PHINode>(LU->getValue())) {
10025 if (auto *Phi = dyn_cast<PHINode>(LU->getValue())) {
10031 if (auto *Phi = dyn_cast<PHINode>(RU->getValue())) {
10031 if (auto *Phi = dyn_cast<PHINode>(RU->getValue())) {
11358 if (PHINode *PN = dyn_cast<PHINode>(getValPtr()))
11358 if (PHINode *PN = dyn_cast<PHINode>(getValPtr()))
11381 if (PHINode *PN = dyn_cast<PHINode>(U))
11381 if (PHINode *PN = dyn_cast<PHINode>(U))
11387 if (PHINode *PN = dyn_cast<PHINode>(Old))
11387 if (PHINode *PN = dyn_cast<PHINode>(Old))
12190 if (!isa<PHINode>(Expr->getValue()))
lib/Analysis/ScalarEvolutionExpander.cpp 92 while (isa<PHINode>(IP))
896 bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV,
898 if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) ||
1007 if (isa<PHINode>(InsertPos) ||
1038 bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV,
1052 Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
1081 Instruction *Pos, PHINode *LoopPhi) {
1158 PHINode *
1170 PHINode *AddRecPhiMatch = nullptr;
1181 for (PHINode &PN : L->getHeader()->phis()) {
1296 PHINode *PN = Builder.CreatePHI(ExpandTy, std::distance(HPB, HPE),
1394 PHINode *PN = getAddRecExprPHILiterally(Normalized, L, AddRecPHIExpandTy,
1503 PHINode *CanonicalIV = nullptr;
1504 if (PHINode *PN = L->getCanonicalInductionVariable())
1565 CanonicalIV = PHINode::Create(Ty, std::distance(HPB, HPE), "indvar",
1864 if (isa<PHINode>(*InsertPt))
1924 PHINode *
1936 PHINode *V =
1937 cast<PHINode>(expandCodeFor(H, nullptr, &L->getHeader()->front()));
1953 SmallVector<PHINode*, 8> Phis;
1954 for (PHINode &PN : L->getHeader()->phis())
1967 DenseMap<const SCEV *, PHINode *> ExprToIVMap;
1970 for (PHINode *Phi : Phis) {
1998 PHINode *&OrigPhiRef = ExprToIVMap[SE.getSCEV(Phi)];
2054 if (PHINode *PN = dyn_cast<PHINode>(OrigInc))
2054 if (PHINode *PN = dyn_cast<PHINode>(OrigInc))
lib/Analysis/ValueTracking.cpp 1348 const PHINode *P = cast<PHINode>(I);
1348 const PHINode *P = cast<PHINode>(I);
2216 else if (const PHINode *PN = dyn_cast<PHINode>(V)) {
2216 else if (const PHINode *PN = dyn_cast<PHINode>(V)) {
2576 const PHINode *PN = cast<PHINode>(U);
2576 const PHINode *PN = cast<PHINode>(U);
3592 SmallPtrSetImpl<const PHINode*> &PHIs,
3599 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
3599 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
3656 SmallPtrSet<const PHINode*, 32> PHIs;
3689 static bool isSameUnderlyingObjectInLoop(const PHINode *PN,
3783 if (auto *PN = dyn_cast<PHINode>(P)) {
3823 !isa<PHINode>(U->getOperand(1))))
lib/Analysis/VectorUtils.cpp 450 if (isa<PHINode>(I))
488 if (isa<PHINode>(*MI) && MinBW < (*MI)->getType()->getScalarSizeInBits()) {
lib/AsmParser/LLParser.cpp 6694 PHINode *PN = PHINode::Create(Ty, PHIVals.size());
6694 PHINode *PN = PHINode::Create(Ty, PHIVals.size());
lib/Bitcode/Reader/BitcodeReader.cpp 4647 PHINode *PN = PHINode::Create(Ty, NumArgs);
4647 PHINode *PN = PHINode::Create(Ty, NumArgs);
lib/Bitcode/Writer/BitcodeWriter.cpp 2872 const PHINode &PN = cast<PHINode>(I);
2872 const PHINode &PN = cast<PHINode>(I);
lib/CodeGen/AtomicExpandPass.cpp 885 PHINode *Loaded_MaskOut = Builder.CreatePHI(PMV.WordType, 2);
1252 PHINode *Success = Builder.CreatePHI(Type::getInt1Ty(Ctx), 2);
1262 PHINode *TryStoreLoaded = Builder.CreatePHI(UnreleasedLoad->getType(), 2);
1267 PHINode *NoStoreLoaded = Builder.CreatePHI(UnreleasedLoad->getType(), 2);
1272 PHINode *ExitLoaded = Builder.CreatePHI(UnreleasedLoad->getType(), 2);
1384 PHINode *Loaded = Builder.CreatePHI(ResultTy, 2, "loaded");
lib/CodeGen/CodeGenPrepare.cpp 611 if (!isa<DbgInfoIntrinsic>(BBI) && !isa<PHINode>(BBI))
713 if (!isa<PHINode>(DestBB->begin()))
759 for (const PHINode &PN : BB->phis()) {
762 if (UI->getParent() != DestBB || !isa<PHINode>(UI))
768 if (const PHINode *UPN = dyn_cast<PHINode>(UI))
768 if (const PHINode *UPN = dyn_cast<PHINode>(UI))
782 const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin());
782 const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin());
787 if (const PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) {
787 if (const PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) {
799 for (const PHINode &PN : DestBB->phis()) {
804 if (const PHINode *V2PN = dyn_cast<PHINode>(V2))
804 if (const PHINode *V2PN = dyn_cast<PHINode>(V2))
843 for (PHINode &PN : DestBB->phis()) {
849 PHINode *InValPhi = dyn_cast<PHINode>(InVal);
849 PHINode *InValPhi = dyn_cast<PHINode>(InVal);
858 if (PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) {
858 if (PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) {
1087 if (PHINode *PN = dyn_cast<PHINode>(User)) {
1087 if (PHINode *PN = dyn_cast<PHINode>(User)) {
1372 if (isa<PHINode>(User))
1554 if (isa<PHINode>(TruncUser))
1630 if (isa<PHINode>(User))
1760 PHINode *PN = Builder.CreatePHI(Ty, 2, "ctz");
1980 PHINode *PN = nullptr;
1988 PN = dyn_cast<PHINode>(V);
2842 PHINode * operator*() const;
2861 using MapType = SmallDenseMap<PHINode *, size_t, 32>;
2866 SmallVector<PHINode *, 32> NodeList;
2883 bool insert(PHINode *Ptr) {
2894 bool erase(PHINode *Ptr) {
2928 size_t count(PHINode *Ptr) const {
2953 PHINode * PhiNodeSetIterator::operator*() const {
3014 if (auto *PHI = dyn_cast<PHINode>(PI))
3014 if (auto *PHI = dyn_cast<PHINode>(PI))
3028 void ReplacePhi(PHINode *From, PHINode *To) {
3028 void ReplacePhi(PHINode *From, PHINode *To) {
3032 To = dyn_cast<PHINode>(OldReplacement);
3044 void insertNewPhi(PHINode *PN) { AllPhiNodes.insert(PN); }
3071 typedef std::pair<PHINode *, PHINode *> PHIPair;
3071 typedef std::pair<PHINode *, PHINode *> PHIPair;
3280 bool MatchPhiNode(PHINode *PHI, PHINode *Candidate,
3280 bool MatchPhiNode(PHINode *PHI, PHINode *Candidate,
3285 SmallSet<PHINode *, 8> MatchedPHIs;
3304 PHINode *FirstPhi = dyn_cast<PHINode>(FirstValue);
3304 PHINode *FirstPhi = dyn_cast<PHINode>(FirstValue);
3305 PHINode *SecondPhi = dyn_cast<PHINode>(SecondValue);
3305 PHINode *SecondPhi = dyn_cast<PHINode>(SecondValue);
3339 SmallPtrSet<PHINode *, 8> WillNotMatch;
3342 PHINode *PHI = *PhiNodesToMatch.begin();
3350 for (auto &P : PHI->getParent()->phis()) {
3374 for (auto *P : WillNotMatch)
3399 auto *PHI = cast<PHINode>(V);
3399 auto *PHI = cast<PHINode>(V);
3402 Value *PV = cast<PHINode>(Current)->getIncomingValueForBlock(B);
3446 PHINode *CurrentPhi = cast<PHINode>(Current);
3446 PHINode *CurrentPhi = cast<PHINode>(Current);
3448 PHINode *PHI =
3449 PHINode::Create(CommonType, PredCount, "sunk_phi", CurrentPhi);
4695 if (PHINode *P = dyn_cast<PHINode>(V)) {
4695 if (PHINode *P = dyn_cast<PHINode>(V)) {
5345 if (isa<PHINode>(BaseI))
5616 if (isa<PHINode>(UI) || isa<LoadInst>(UI) || isa<StoreInst>(UI))
5732 if (auto *Phi = dyn_cast<PHINode>(I)) {
5732 if (auto *Phi = dyn_cast<PHINode>(I)) {
6083 PHINode *PN = PHINode::Create(SI->getType(), 2, "", &EndBlock->front());
6083 PHINode *PN = PHINode::Create(SI->getType(), 2, "", &EndBlock->front());
6184 if (UI->getParent() == TargetBB || isa<PHINode>(UI))
6928 if (PHINode *P = dyn_cast<PHINode>(I)) {
6928 if (PHINode *P = dyn_cast<PHINode>(I)) {
7137 if (isa<PHINode>(VI) && VI->getParent()->getTerminator()->isEHPad())
7142 if (isa<PHINode>(VI))
7261 for (PHINode &PN : FBB->phis()) {
lib/CodeGen/DwarfEHPrepare.cpp 234 PHINode *PN = PHINode::Create(Type::getInt8PtrTy(Ctx), ResumesLeft,
234 PHINode *PN = PHINode::Create(Type::getInt8PtrTy(Ctx), ResumesLeft,
lib/CodeGen/ExpandMemCmp.cpp 55 PHINode *PhiSrc1 = nullptr;
56 PHINode *PhiSrc2 = nullptr;
69 PHINode *PhiRes;
lib/CodeGen/GlobalISel/IRTranslator.cpp 1928 const PHINode &PI = cast<PHINode>(U);
1928 const PHINode &PI = cast<PHINode>(U);
2054 const PHINode *PI = Phi.first;
lib/CodeGen/HardwareLoops.cpp 138 PHINode *InsertPHICounter(Value *NumElts, Value *EltsRem);
429 PHINode* HardwareLoop::InsertPHICounter(Value *NumElts, Value *EltsRem) {
434 PHINode *Index = Builder.CreatePHI(NumElts->getType(), 2);
lib/CodeGen/IndirectBrExpandPass.cpp 196 auto *SwitchPN = PHINode::Create(CommonITy, IndirectBrs.size(),
196 auto *SwitchPN = PHINode::Create(CommonITy, IndirectBrs.size(),
lib/CodeGen/SafeStack.cpp 602 if (auto *PHI = dyn_cast<PHINode>(User))
602 if (auto *PHI = dyn_cast<PHINode>(User))
612 if (auto *PHI = dyn_cast<PHINode>(User))
612 if (auto *PHI = dyn_cast<PHINode>(User))
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp 226 PHINode *Phi = Builder.CreatePHI(VecType, 2, "res.phi.else");
475 PHINode *Phi = Builder.CreatePHI(VecType, 2, "res.phi.else");
691 PHINode *ResultPhi = Builder.CreatePHI(VecType, 2, "res.phi.else");
698 PHINode *PtrPhi = Builder.CreatePHI(Ptr->getType(), 2, "ptr.phi.else");
798 PHINode *PtrPhi = Builder.CreatePHI(Ptr->getType(), 2, "ptr.phi.else");
lib/CodeGen/SelectionDAG/FastISel.cpp 2261 if (!isa<PHINode>(SuccBB->begin()))
2275 for (const PHINode &PN : SuccBB->phis()) {
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp 50 if (isa<PHINode>(I)) return true;
53 if (cast<Instruction>(U)->getParent() != BB || isa<PHINode>(U))
269 for (const PHINode &PN : BB.phis()) {
411 void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) {
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 1115 void SelectionDAGBuilder::visitPHI(const PHINode &) {
3042 if (Inst->getOpcode() == OpCode || isa<PHINode>(U)) {
3044 if (!isa<PHINode>(FPOp) && !FPOp->getFastMathFlags().isFast())
9936 if (!isa<PHINode>(SuccBB->begin())) continue;
9949 for (const PHINode &PN : SuccBB->phis()) {
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h 730 void visitPHI(const PHINode &I);
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp 358 PHINode *PN = dyn_cast<PHINode>(BB.begin());
358 PHINode *PN = dyn_cast<PHINode>(BB.begin());
366 for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast<PHINode>(I)); ++I)
1412 for (const PHINode &PN : LLVMBB->phis())
1415 for (const PHINode &PN : LLVMBB->phis())
lib/CodeGen/SelectionDAG/StatepointLowering.cpp 170 if (const PHINode *Phi = dyn_cast<PHINode>(Val)) {
170 if (const PHINode *Phi = dyn_cast<PHINode>(Val)) {
lib/CodeGen/SjLjEHPrepare.cpp 271 !isa<PHINode>(Inst.user_back()))
284 if (UI->getParent() != &BB || isa<PHINode>(UI))
294 if (!isa<PHINode>(U)) {
298 PHINode *PN = cast<PHINode>(U);
298 PHINode *PN = cast<PHINode>(U);
335 SmallPtrSet<PHINode *, 8> PHIsToDemote;
336 for (BasicBlock::iterator PN = UnwindBlock->begin(); isa<PHINode>(PN); ++PN)
337 PHIsToDemote.insert(cast<PHINode>(PN));
342 for (PHINode *PN : PHIsToDemote)
lib/CodeGen/StackProtector.cpp 197 const auto *PN = cast<PHINode>(I);
197 const auto *PN = cast<PHINode>(I);
lib/CodeGen/WinEHPrepare.cpp 74 void insertPHIStores(PHINode *OriginalPHI, AllocaInst *SpillSlot);
78 AllocaInst *insertPHILoads(PHINode *PN, Function &F);
692 SmallVector<PHINode *, 16> PHINodes;
702 auto *PN = dyn_cast<PHINode>(I);
702 auto *PN = dyn_cast<PHINode>(I);
715 for (auto *PN : PHINodes) {
854 for (PHINode &OldPN : OldBlock->phis()) {
857 for (PHINode &NewPN : NewBlock->phis()) {
868 for (PHINode &SuccPN : SuccBB->phis()) {
1071 AllocaInst *WinEHPrepare::insertPHILoads(PHINode *PN, Function &F) {
1096 if (isa<PHINode>(UsingInst) && UsingInst->getParent()->isEHPad()) {
1110 void WinEHPrepare::insertPHIStores(PHINode *OriginalPHI,
1123 PHINode *PN = dyn_cast<PHINode>(InVal);
1123 PHINode *PN = dyn_cast<PHINode>(InVal);
1171 if (auto *UsingPHI = dyn_cast<PHINode>(UsingInst)) {
1171 if (auto *UsingPHI = dyn_cast<PHINode>(UsingInst)) {
lib/ExecutionEngine/Interpreter/Execution.cpp 988 if (!isa<PHINode>(SF.CurInst)) return; // Nothing fancy to do
993 for (; PHINode *PN = dyn_cast<PHINode>(SF.CurInst); ++SF.CurInst) {
993 for (; PHINode *PN = dyn_cast<PHINode>(SF.CurInst); ++SF.CurInst) {
1005 for (unsigned i = 0; isa<PHINode>(SF.CurInst); ++SF.CurInst, ++i) {
1006 PHINode *PN = cast<PHINode>(SF.CurInst);
1006 PHINode *PN = cast<PHINode>(SF.CurInst);
lib/ExecutionEngine/Interpreter/Interpreter.h 135 void visitPHINode(PHINode &PN) {
lib/FuzzMutate/IRMutator.cpp 158 Inst.isSwiftError() || isa<PHINode>(Inst))
lib/FuzzMutate/Operations.cpp 158 for (PHINode &PHI : Block->phis())
lib/IR/AsmWriter.cpp 3755 } else if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
3755 } else if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
lib/IR/BasicBlock.cpp 198 if (!isa<PHINode>(I))
205 if (!isa<PHINode>(I) && !isa<DbgInfoIntrinsic>(I))
212 if (isa<PHINode>(I) || isa<DbgInfoIntrinsic>(I))
298 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin());
298 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin());
315 PHINode *APN = dyn_cast<PHINode>(&front());
315 PHINode *APN = dyn_cast<PHINode>(&front());
342 while (PHINode *PN = dyn_cast<PHINode>(&front())) {
342 while (PHINode *PN = dyn_cast<PHINode>(&front())) {
362 PHINode *PN;
363 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) {
445 PHINode *PN = dyn_cast<PHINode>(II);
445 PHINode *PN = dyn_cast<PHINode>(II);
lib/IR/Core.cpp 2939 PHINode *PhiVal = unwrap<PHINode>(PhiNode);
2939 PHINode *PhiVal = unwrap<PHINode>(PhiNode);
2945 return unwrap<PHINode>(PhiNode)->getNumIncomingValues();
2949 return wrap(unwrap<PHINode>(PhiNode)->getIncomingValue(Index));
2953 return wrap(unwrap<PHINode>(PhiNode)->getIncomingBlock(Index));
lib/IR/Dominators.cpp 136 if (isa<InvokeInst>(Def) || isa<PHINode>(User))
233 PHINode *PN = dyn_cast<PHINode>(UserInst);
233 PHINode *PN = dyn_cast<PHINode>(UserInst);
256 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
256 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
288 if (isa<PHINode>(UserInst))
307 if (PHINode *PN = dyn_cast<PHINode>(I))
307 if (PHINode *PN = dyn_cast<PHINode>(I))
lib/IR/Instruction.cpp 460 if (const PHINode *thisPHI = dyn_cast<PHINode>(this)) {
460 if (const PHINode *thisPHI = dyn_cast<PHINode>(this)) {
461 const PHINode *otherPHI = cast<PHINode>(I);
461 const PHINode *otherPHI = cast<PHINode>(I);
500 const PHINode *PN = dyn_cast<PHINode>(I);
500 const PHINode *PN = dyn_cast<PHINode>(I);
lib/IR/Instructions.cpp 106 PHINode::PHINode(const PHINode &PN)
4252 PHINode *PHINode::cloneImpl() const { return new PHINode(*this); }
4252 PHINode *PHINode::cloneImpl() const { return new PHINode(*this); }
lib/IR/SafepointIRVerifier.cpp 83 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const {
350 if (const auto *PN = dyn_cast<PHINode>(V)) {
350 if (const auto *PN = dyn_cast<PHINode>(V)) {
459 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const {
658 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
658 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
794 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
794 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
lib/IR/Value.cpp 737 auto *PN = dyn_cast<PHINode>(this);
lib/IR/Verifier.cpp 450 void visitPHINode(PHINode &PN);
2383 if (isa<PHINode>(BB.front())) {
2387 for (const PHINode &PN : BB.phis()) {
2793 void Verifier::visitPHINode(PHINode &PN) {
3998 if (!isa<PHINode>(I) && InstsInThisBlock.count(Op))
4064 if (!isa<PHINode>(I)) { // Check that non-phi nodes are not self referential
lib/Target/AArch64/AArch64PromoteConstant.cpp 360 if (PHINode *PhiInst = dyn_cast<PHINode>(&User))
360 if (PHINode *PhiInst = dyn_cast<PHINode>(&User))
lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp 583 PHINode *const PHI = B.CreatePHI(Ty, 2);
646 PHINode *const PHI = B.CreatePHI(Ty, 2);
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp 601 if (PHINode *Phi = dyn_cast<PHINode>(UseInst)) {
601 if (PHINode *Phi = dyn_cast<PHINode>(UseInst)) {
865 } else if (PHINode *Phi = dyn_cast<PHINode>(V)) {
865 } else if (PHINode *Phi = dyn_cast<PHINode>(V)) {
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp 81 if (const PHINode *PHI = dyn_cast<PHINode>(V)) {
81 if (const PHINode *PHI = dyn_cast<PHINode>(V)) {
lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp 128 PHINode *PN = nullptr;
133 PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(),
lib/Target/AMDGPU/SIAnnotateControlFlow.cpp 89 bool isElse(PHINode *Phi);
91 void eraseIfUnused(PHINode *Phi);
98 handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
184 bool SIAnnotateControlFlow::isElse(PHINode *Phi) {
202 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) {
230 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) {
267 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front());
267 PHINode *Broken = PHINode::Create(IntMask, 0, "phi.broken", &Target->front());
351 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
351 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
lib/Target/ARM/ARMParallelDSP.cpp 755 isa<PHINode>(Source) || isa<PHINode>(Sink))
755 isa<PHINode>(Source) || isa<PHINode>(Sink))
lib/Target/ARM/MVETailPredication.cpp 264 auto *Phi = dyn_cast<PHINode>(IV);
264 auto *Phi = dyn_cast<PHINode>(IV);
477 PHINode *Processed = Builder.CreatePHI(Ty, 2);
lib/Target/Hexagon/HexagonCommonGEP.cpp 736 if (isa<PHINode>(V))
778 BasicBlock *PB = isa<PHINode>(R)
779 ? cast<PHINode>(R)->getIncomingBlock(*U)
lib/Target/Hexagon/HexagonISelLowering.cpp 1724 static Value *returnEdge(const PHINode *PN, Value *IntrBaseVal) {
1765 if (const PHINode *PN = dyn_cast<PHINode>(V))
1765 if (const PHINode *PN = dyn_cast<PHINode>(V))
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp 324 if (isa<PHINode>(U) || U->getParent() != Block)
458 if (isa<PHINode>(I))
629 for (auto I = BB->begin(), E = BB->end(); I != E && isa<PHINode>(I); ++I) {
630 auto *PN = cast<PHINode>(I);
630 auto *PN = cast<PHINode>(I);
903 auto *RPhi = dyn_cast<PHINode>(PV.R);
903 auto *RPhi = dyn_cast<PHINode>(PV.R);
1011 if (PHINode *P = dyn_cast<PHINode>(In)) {
1011 if (PHINode *P = dyn_cast<PHINode>(In)) {
1065 for (PHINode &P : ExitB->phis()) {
1091 PHINode *P = dyn_cast<PHINode>(I);
1091 PHINode *P = dyn_cast<PHINode>(I);
1131 bool IsPhi = isa<PHINode>(I);
1157 else if (!isa<PHINode>(V))
1172 if (DivI == V || isa<PHINode>(V))
1339 if (T->getParent() != LoopB || RShifts.count(T) || isa<PHINode>(T))
1394 if (isa<PHINode>(I) || !Users.count(&*I))
1450 if (!isa<PHINode>(P))
1452 auto *PN = cast<PHINode>(P);
1452 auto *PN = cast<PHINode>(P);
1806 if (const auto *P = dyn_cast<const PHINode>(U))
1806 if (const auto *P = dyn_cast<const PHINode>(U))
2182 PHINode *PN = dyn_cast<PHINode>(&In);
2182 PHINode *PN = dyn_cast<PHINode>(&In);
lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp 458 PHINode *PN = cast<PHINode>(D->front());
458 PHINode *PN = cast<PHINode>(D->front());
477 if (isa<PHINode>(User))
594 PHINode *PN = dyn_cast<PHINode>(Op);
594 PHINode *PN = dyn_cast<PHINode>(Op);
637 PHINode *NewPhi;
683 PHINode *PN = dyn_cast<PHINode>(I);
683 PHINode *PN = dyn_cast<PHINode>(I);
729 for (auto I = BB->begin(), E = BB->end(); I != E && isa<PHINode>(I); ++I) {
730 auto *PN = cast<PHINode>(I);
730 auto *PN = cast<PHINode>(I);
lib/Target/PowerPC/PPCBoolRetToInt.cpp 98 if (auto *P = dyn_cast<PHINode>(V)) {
98 if (auto *P = dyn_cast<PHINode>(V)) {
102 PHINode *Q =
103 PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P);
118 typedef SmallPtrSet<const PHINode *, 8> PHINodeSet;
133 if (const auto *P = dyn_cast<PHINode>(&I))
133 if (const auto *P = dyn_cast<PHINode>(&I))
137 SmallVector<const PHINode *, 8> ToRemove;
138 for (const PHINode *P : Promotable) {
141 return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHINode>(V) ||
146 isa<PHINode>(V);
157 const auto *Phi = dyn_cast<PHINode>(V);
157 const auto *Phi = dyn_cast<PHINode>(V);
165 for (const PHINode *P : Promotable) {
230 if (!isa<PHINode>(V) && !isa<Constant>(V) &&
235 if (const auto *P = dyn_cast<PHINode>(V))
235 if (const auto *P = dyn_cast<PHINode>(V))
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp 369 PHINode *NewPHI =
370 PHINode::Create(I8PtrTy, HeaderLoopPredCount,
431 else if (PtrIP && isa<PHINode>(PtrIP))
505 for (auto & CurrentPHI : PHIIter) {
506 PHINode *CurrentPHINode = dyn_cast<PHINode>(&CurrentPHI);
506 PHINode *CurrentPHINode = dyn_cast<PHINode>(&CurrentPHI);
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp 589 PHINode *LabelPHI = IRB.CreatePHI(IRB.getInt32Ty(), 2, "label");
612 if (auto *UserPN = dyn_cast<PHINode>(User))
612 if (auto *UserPN = dyn_cast<PHINode>(User))
904 std::vector<PHINode *> SetjmpRetPHIs;
922 PHINode *SetjmpRet = IRB.CreatePHI(IRB.getInt32Ty(), 2, "setjmp.ret");
lib/Target/XCore/XCoreLowerThreadLocal.cpp 135 if (PHINode *PN = dyn_cast<PHINode>(WU)) {
135 if (PHINode *PN = dyn_cast<PHINode>(WU)) {
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp 106 PHINode &Phi = cast<PHINode>(I);
106 PHINode &Phi = cast<PHINode>(I);
lib/Transforms/Coroutines/CoroFrame.cpp 120 if (auto *PN = dyn_cast<PHINode>(I))
120 if (auto *PN = dyn_cast<PHINode>(I))
689 } else if (isa<PHINode>(CurrentValue)) {
731 if (auto *PN = dyn_cast<PHINode>(E.user())) {
731 if (auto *PN = dyn_cast<PHINode>(E.user())) {
811 PHINode *LandingPadReplacement) {
813 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
814 PHINode *PN = cast<PHINode>(I);
814 PHINode *PN = cast<PHINode>(I);
838 PHINode *LandingPadReplacement) {
890 PHINode *ReplPHI = nullptr;
895 ReplPHI = PHINode::Create(LandingPad->getType(), 1, "", LandingPad);
906 auto *PN = cast<PHINode>(&BB.front());
906 auto *PN = cast<PHINode>(&BB.front());
910 PHINode *InputV = PHINode::Create(
910 PHINode *InputV = PHINode::Create(
915 PN = dyn_cast<PHINode>(PN->getNextNode());
931 if (auto *PN = dyn_cast<PHINode>(&BB.front()))
931 if (auto *PN = dyn_cast<PHINode>(&BB.front()))
978 if (auto *PN = dyn_cast<PHINode>(E.user())) {
978 if (auto *PN = dyn_cast<PHINode>(E.user())) {
lib/Transforms/Coroutines/CoroSplit.cpp 347 auto *PN = PHINode::Create(Builder.getInt8Ty(), 2, "", &LandingBB->front());
347 auto *PN = PHINode::Create(Builder.getInt8Ty(), 2, "", &LandingBB->front());
893 for (PHINode &PN : NewBlock->phis()) {
1234 SmallVector<PHINode *, 4> ReturnPHIs;
lib/Transforms/IPO/ArgumentPromotion.cpp 828 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) {
lib/Transforms/IPO/Attributor.cpp 216 if (auto *PHI = dyn_cast<PHINode>(V)) {
216 if (auto *PHI = dyn_cast<PHINode>(V)) {
lib/Transforms/IPO/FunctionAttrs.cpp 895 PHINode *PN = cast<PHINode>(RVI);
895 PHINode *PN = cast<PHINode>(RVI);
1008 PHINode *PN = cast<PHINode>(RVI);
1008 PHINode *PN = cast<PHINode>(RVI);
lib/Transforms/IPO/GlobalOpt.cpp 615 SmallPtrSetImpl<const PHINode*> &PHIs) {
644 } else if (const PHINode *PN = dyn_cast<PHINode>(U)) {
644 } else if (const PHINode *PN = dyn_cast<PHINode>(U)) {
666 SmallPtrSet<const PHINode*, 8> PHIs;
967 SmallPtrSetImpl<const PHINode*> &PHIs) {
988 if (const PHINode *PN = dyn_cast<PHINode>(Inst)) {
988 if (const PHINode *PN = dyn_cast<PHINode>(Inst)) {
1023 } else if (PHINode *PN = dyn_cast<PHINode>(U)) {
1023 } else if (PHINode *PN = dyn_cast<PHINode>(U)) {
1057 SmallPtrSetImpl<const PHINode*> &LoadUsingPHIs,
1058 SmallPtrSetImpl<const PHINode*> &LoadUsingPHIsPerLoad) {
1081 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1081 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1109 SmallPtrSet<const PHINode*, 32> LoadUsingPHIs;
1110 SmallPtrSet<const PHINode*, 32> LoadUsingPHIsPerLoad;
1124 for (const PHINode *PN : LoadUsingPHIs) {
1131 if (const PHINode *InPN = dyn_cast<PHINode>(InVal)) {
1131 if (const PHINode *InPN = dyn_cast<PHINode>(InVal)) {
1155 std::vector<std::pair<PHINode *, unsigned>> &PHIsToRewrite) {
1176 PHINode *PN = cast<PHINode>(V);
1176 PHINode *PN = cast<PHINode>(V);
1184 PHINode *NewPN =
1185 PHINode::Create(PointerType::get(ST->getElementType(FieldNo), AS),
1199 std::vector<std::pair<PHINode *, unsigned>> &PHIsToRewrite) {
1244 PHINode *PN = cast<PHINode>(LoadUser);
1244 PHINode *PN = cast<PHINode>(LoadUser);
1262 std::vector<std::pair<PHINode *, unsigned> > &PHIsToRewrite) {
1395 std::vector<std::pair<PHINode *, unsigned>> PHIsToRewrite;
1425 PHINode *PN = PHIsToRewrite.back().first;
1428 PHINode *FieldPN = cast<PHINode>(InsertedScalarizedValues[PN][FieldNo]);
1428 PHINode *FieldPN = cast<PHINode>(InsertedScalarizedValues[PN][FieldNo]);
1444 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1444 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1454 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1454 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1492 SmallPtrSet<const PHINode*, 8> PHIs;
lib/Transforms/IPO/LowerTypeTests.cpp 790 for (auto &Phi : Else->phis())
807 PHINode *P = B.CreatePHI(Int1Ty, 2);
lib/Transforms/IPO/PartialInlining.cpp 1025 PHINode *FirstPhi = nullptr;
1027 PHINode *Phi = dyn_cast<PHINode>(I);
1027 PHINode *Phi = dyn_cast<PHINode>(I);
1049 PHINode *FirstPhi = getFirstPHI(PreReturn);
1069 PHINode *OldPhi = dyn_cast<PHINode>(I);
1069 PHINode *OldPhi = dyn_cast<PHINode>(I);
1073 PHINode *RetPhi =
1074 PHINode::Create(OldPhi->getType(), NumPredsFromEntries + 1, "", Ins);
lib/Transforms/IPO/SampleProfile.cpp 671 if (isa<BranchInst>(Inst) || isa<IntrinsicInst>(Inst) || isa<PHINode>(Inst))
lib/Transforms/InstCombine/InstCombineAddSub.cpp 1757 if (PHINode *PN = dyn_cast<PHINode>(Op1))
1757 if (PHINode *PN = dyn_cast<PHINode>(Op1))
lib/Transforms/InstCombine/InstCombineCalls.cpp 4465 if (PHINode *PN = dyn_cast<PHINode>(U))
4465 if (PHINode *PN = dyn_cast<PHINode>(U))
lib/Transforms/InstCombine/InstCombineCasts.cpp 213 PHINode *OPN = cast<PHINode>(I);
213 PHINode *OPN = cast<PHINode>(I);
214 PHINode *NPN = PHINode::Create(Ty, OPN->getNumIncomingValues());
214 PHINode *NPN = PHINode::Create(Ty, OPN->getNumIncomingValues());
291 if (auto *PN = dyn_cast<PHINode>(Src)) {
291 if (auto *PN = dyn_cast<PHINode>(Src)) {
436 PHINode *PN = cast<PHINode>(I);
436 PHINode *PN = cast<PHINode>(I);
1071 PHINode *PN = cast<PHINode>(I);
1071 PHINode *PN = cast<PHINode>(I);
1347 PHINode *PN = cast<PHINode>(I);
1347 PHINode *PN = cast<PHINode>(I);
2162 Instruction *InstCombiner::optimizeBitCastFromPhi(CastInst &CI, PHINode *PN) {
2171 SmallVector<PHINode *, 4> PhiWorklist;
2172 SmallSetVector<PHINode *, 4> OldPhiNodes;
2181 auto *OldPN = PhiWorklist.pop_back_val();
2201 if (auto *PNode = dyn_cast<PHINode>(IncValue)) {
2201 if (auto *PNode = dyn_cast<PHINode>(IncValue)) {
2221 SmallDenseMap<PHINode *, PHINode *> NewPNodes;
2221 SmallDenseMap<PHINode *, PHINode *> NewPNodes;
2222 for (auto *OldPN : OldPhiNodes) {
2224 PHINode *NewPN = Builder.CreatePHI(DestTy, OldPN->getNumOperands());
2229 for (auto *OldPN : OldPhiNodes) {
2230 PHINode *NewPN = NewPNodes[OldPN];
2242 } else if (auto *PrevPN = dyn_cast<PHINode>(V)) {
2242 } else if (auto *PrevPN = dyn_cast<PHINode>(V)) {
2260 for (auto *OldPN : OldPhiNodes) {
2261 PHINode *NewPN = NewPNodes[OldPN];
2453 if (PHINode *PN = dyn_cast<PHINode>(Src))
2453 if (PHINode *PN = dyn_cast<PHINode>(Src))
lib/Transforms/InstCombine/InstCombineCompares.cpp 534 SetVector<PHINode *> PHIs;
548 !isa<GetElementPtrInst>(V) && !isa<PHINode>(V))
580 if (auto *PN = dyn_cast<PHINode>(V)) {
580 if (auto *PN = dyn_cast<PHINode>(V)) {
590 for (auto *PN : PHIs)
602 auto *PHI = dyn_cast<PHINode>(Use);
602 auto *PHI = dyn_cast<PHINode>(Use);
620 if (auto *PHI = dyn_cast<PHINode>(V)) {
620 if (auto *PHI = dyn_cast<PHINode>(V)) {
665 if (auto *PHI = dyn_cast<PHINode>(Val))
665 if (auto *PHI = dyn_cast<PHINode>(Val))
666 NewInsts[PHI] = PHINode::Create(IndexType, PHI->getNumIncomingValues(),
705 if (isa<PHINode>(Val))
717 if (auto *PHI = dyn_cast<PHINode>(Val)) {
717 if (auto *PHI = dyn_cast<PHINode>(Val)) {
718 PHINode *NewPhi = static_cast<PHINode *>(NewInsts[PHI]);
1059 if (isa<BitCastInst>(V) || isa<GetElementPtrInst>(V) || isa<PHINode>(V) ||
3189 if (Instruction *NV = foldOpIntoPhi(I, cast<PHINode>(LHSI)))
6046 if (Instruction *NV = foldOpIntoPhi(I, cast<PHINode>(LHSI)))
lib/Transforms/InstCombine/InstCombineInternal.h 428 Instruction *SliceUpIllegalIntegerPHI(PHINode &PN);
429 Instruction *visitPHINode(PHINode &PN);
597 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
603 Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
871 Instruction *foldOpIntoPhi(Instruction &I, PHINode *PN);
886 Instruction *FoldPHIArgOpIntoPHI(PHINode &PN);
887 Instruction *FoldPHIArgBinOpIntoPHI(PHINode &PN);
888 Instruction *FoldPHIArgGEPIntoPHI(PHINode &PN);
889 Instruction *FoldPHIArgLoadIntoPHI(PHINode &PN);
890 Instruction *FoldPHIArgZextsIntoPHI(PHINode &PN);
895 Instruction *FoldIntegerTypedPHI(PHINode &PN);
899 void PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN);
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp 775 if (PHINode *PN = dyn_cast<PHINode>(P)) {
775 if (PHINode *PN = dyn_cast<PHINode>(P)) {
1300 isa<PHINode>(A) ||
1573 PHINode *PN = PHINode::Create(MergedVal->getType(), 2, "storemerge");
1573 PHINode *PN = PHINode::Create(MergedVal->getType(), 2, "storemerge");
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 1323 } else if (auto *PN = dyn_cast<PHINode>(Op0I)) {
1323 } else if (auto *PN = dyn_cast<PHINode>(Op0I)) {
lib/Transforms/InstCombine/InstCombinePHI.cpp 32 void InstCombiner::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) {
95 Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode &PN) {
158 if (isa<PHINode>(Arg)) {
181 PHINode *MatchingPtrPHI = nullptr;
188 PHINode *PtrPHI = dyn_cast<PHINode>(II);
188 PHINode *PtrPHI = dyn_cast<PHINode>(II);
229 PHINode *NewPtrPHI = PHINode::Create(
229 PHINode *NewPtrPHI = PHINode::Create(
265 if (isa<PHINode>(IncomingI))
283 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) {
324 PHINode *NewLHS = nullptr, *NewRHS = nullptr;
326 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(),
334 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(),
376 Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) {
447 SmallVector<PHINode*, 16> OperandPhis(FixedOperands.size());
453 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e,
453 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e,
471 if (PHINode *OpPhi = OperandPhis[op])
531 Instruction *InstCombiner::FoldPHIArgLoadIntoPHI(PHINode &PN) {
592 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(),
592 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(),
650 Instruction *InstCombiner::FoldPHIArgZextsIntoPHI(PHINode &Phi) {
712 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues,
712 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues,
724 Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) {
779 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(),
779 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(),
832 static bool DeadPHICycle(PHINode *PN,
833 SmallPtrSetImpl<PHINode*> &PotentiallyDeadPHIs) {
845 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back()))
845 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back()))
854 static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal,
855 SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) {
867 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) {
867 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) {
879 static ConstantInt *GetAnyNonZeroConstInt(PHINode &PN) {
908 PHINode *PN; // The PHI that was lowered.
912 LoweredPHIRecord(PHINode *pn, unsigned Sh, Type *Ty)
916 LoweredPHIRecord(PHINode *pn, unsigned Sh)
931 return DenseMapInfo<PHINode*>::getHashValue(Val.PN) ^ (Val.Shift>>3) ^
951 Instruction *InstCombiner::SliceUpIllegalIntegerPHI(PHINode &FirstPhi) {
960 SmallVector<PHINode*, 8> PHIsToSlice;
961 SmallPtrSet<PHINode*, 8> PHIsInspected;
967 PHINode *PN = PHIsToSlice[PHIId];
989 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) {
989 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) {
1035 DenseMap<LoweredPHIRecord, PHINode*> ExtractedVals;
1039 PHINode *PN = PHIsToSlice[PHIId];
1043 PHINode *EltPHI;
1050 EltPHI = PHINode::Create(Ty, PN->getNumIncomingValues(),
1073 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) {
1073 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) {
1097 if (PHINode *OldInVal = dyn_cast<PHINode>(PN->getIncomingValue(i)))
1097 if (PHINode *OldInVal = dyn_cast<PHINode>(PN->getIncomingValue(i)))
1127 Instruction *InstCombiner::visitPHINode(PHINode &PN) {
1154 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) {
1154 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) {
1155 SmallPtrSet<PHINode*, 16> PotentiallyDeadPHIs;
1207 isa<PHINode>(PN.getIncomingValue(InValNo)))
1217 if (OpVal != NonPhiInVal && !isa<PHINode>(OpVal))
1225 SmallPtrSet<PHINode*, 16> ValueEqualPHIs;
1236 PHINode *FirstPN = cast<PHINode>(PN.getParent()->begin());
1236 PHINode *FirstPN = cast<PHINode>(PN.getParent()->begin());
lib/Transforms/InstCombine/InstCombineSelect.cpp 1517 const PHINode *CondPHI = cast<PHINode>(SI.getCondition());
1517 const PHINode *CondPHI = cast<PHINode>(SI.getCondition());
1519 if (const PHINode *VP = dyn_cast<PHINode>(I))
1519 if (const PHINode *VP = dyn_cast<PHINode>(I))
2524 if (auto *PN = dyn_cast<PHINode>(SI.getCondition()))
2524 if (auto *PN = dyn_cast<PHINode>(SI.getCondition()))
lib/Transforms/InstCombine/InstCombineShifts.cpp 457 PHINode *PN = cast<PHINode>(I);
457 PHINode *PN = cast<PHINode>(I);
577 PHINode *PN = cast<PHINode>(I);
577 PHINode *PN = cast<PHINode>(I);
lib/Transforms/InstCombine/InstCombineVectorOps.cpp 84 Instruction *InstCombiner::scalarizePHI(ExtractElementInst &EI, PHINode *PN) {
116 PHINode *scalarPHI = cast<PHINode>(InsertNewInstWith(
116 PHINode *scalarPHI = cast<PHINode>(InsertNewInstWith(
117 PHINode::Create(EI.getType(), PN->getNumIncomingValues(), ""), *PN));
144 if (pos && !isa<PHINode>(pos)) {
371 if (auto *Phi = dyn_cast<PHINode>(SrcVec))
371 if (auto *Phi = dyn_cast<PHINode>(SrcVec))
548 BasicBlock *InsertionBlock = (ExtVecOpInst && !isa<PHINode>(ExtVecOpInst))
579 if (ExtVecOpInst && !isa<PHINode>(ExtVecOpInst))
lib/Transforms/InstCombine/InstructionCombining.cpp 929 Instruction *InstCombiner::foldOpIntoPhi(Instruction &I, PHINode *PN) {
958 if (isa<PHINode>(InVal)) return nullptr; // Itself a phi.
986 PHINode *NewPN = PHINode::Create(I.getType(), PN->getNumIncomingValues());
986 PHINode *NewPN = PHINode::Create(I.getType(), PN->getNumIncomingValues());
1081 } else if (auto *PN = dyn_cast<PHINode>(I.getOperand(0))) {
1081 } else if (auto *PN = dyn_cast<PHINode>(I.getOperand(0))) {
1687 if (auto *PN = dyn_cast<PHINode>(PtrOp)) {
1687 if (auto *PN = dyn_cast<PHINode>(PtrOp)) {
1771 PHINode *NewPN;
3123 if (isa<PHINode>(I) || I->isEHPad() || I->mayHaveSideEffects() ||
3267 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
3267 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
3335 if (!isa<PHINode>(Result) && isa<PHINode>(InsertPos))
3335 if (!isa<PHINode>(Result) && isa<PHINode>(InsertPos))
lib/Transforms/Instrumentation/AddressSanitizer.cpp 1107 PHINode *createPHI(IRBuilder<> &IRB, Value *Cond, Value *ValueIfTrue,
2918 PHINode *FunctionStackPoisoner::createPHI(IRBuilder<> &IRB, Value *Cond,
2922 PHINode *PHI = IRB.CreatePHI(IntptrTy, 2);
lib/Transforms/Instrumentation/ControlHeightReduction.cpp 374 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
1452 DenseSet<PHINode *> &TrivialPHIs,
1462 if (auto *PN = dyn_cast<PHINode>(I))
1462 if (auto *PN = dyn_cast<PHINode>(I))
1498 DenseSet<PHINode *> &TrivialPHIs,
1574 DenseSet<PHINode *> &TrivialPHIs) {
1596 !(isa<PHINode>(UI) && UI->getParent() == ExitBlock)) {
1600 } else if (UI->getParent() == EntryBlock && isa<PHINode>(UI)) {
1617 PHINode *PN = PHINode::Create(I.getType(), PredCount, "",
1617 PHINode *PN = PHINode::Create(I.getType(), PredCount, "",
1695 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) {
1799 for (PHINode &PN : ExitBlock->phis())
1978 DenseSet<PHINode *> TrivialPHIs;
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp 395 std::vector<std::pair<PHINode *, PHINode *>> PHIFixups;
395 std::vector<std::pair<PHINode *, PHINode *>> PHIFixups;
449 void visitPHINode(PHINode &PN);
959 for (std::vector<std::pair<PHINode *, PHINode *>>::iterator
959 for (std::vector<std::pair<PHINode *, PHINode *>>::iterator
981 while (isa<PHINode>(Pos) || isa<AllocaInst>(Pos))
1138 PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1138 PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1286 PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1286 PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1765 void DFSanVisitor::visitPHINode(PHINode &PN) {
1766 PHINode *ShadowPN =
1767 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN);
1771 for (PHINode::block_iterator i = PN.block_begin(), e = PN.block_end(); i != e;
lib/Transforms/Instrumentation/GCOVProfiling.cpp 817 PHINode *Phi = BuilderForPhi.CreatePHI(Int64PtrTy, EdgeCount);
1095 PHINode *IV =
1129 auto *JV = Builder.CreatePHI(Builder.getInt32Ty(), /*NumReservedValues*/ 2);
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp 954 PHINode *ThreadLongPhi = IRB.CreatePHI(IntptrTy, 2);
lib/Transforms/Instrumentation/InstrProfiling.cpp 267 SmallVector<PHINode *, 4> NewPHIs;
lib/Transforms/Instrumentation/MemorySanitizer.cpp 1022 SmallVector<PHINode *, 16> ShadowPHINodes, OriginPHINodes;
1292 for (PHINode *PN : ShadowPHINodes) {
1293 PHINode *PNS = cast<PHINode>(getShadow(PN));
1293 PHINode *PNS = cast<PHINode>(getShadow(PN));
1294 PHINode *PNO = MS.TrackOrigins ? cast<PHINode>(getOrigin(PN)) : nullptr;
1294 PHINode *PNO = MS.TrackOrigins ? cast<PHINode>(getOrigin(PN)) : nullptr;
3418 void visitPHINode(PHINode &I) {
lib/Transforms/Instrumentation/PoisonChecking.cpp 262 for (auto I = BB.begin(); isa<PHINode>(&*I); I++) {
263 auto *OldPHI = cast<PHINode>(&*I);
263 auto *OldPHI = cast<PHINode>(&*I);
264 auto *NewPHI = PHINode::Create(Int1Ty,
264 auto *NewPHI = PHINode::Create(Int1Ty,
275 if (isa<PHINode>(I)) continue;
302 for (auto I = BB.begin(); isa<PHINode>(&*I); I++) {
303 auto *OldPHI = cast<PHINode>(&*I);
303 auto *OldPHI = cast<PHINode>(&*I);
306 auto *NewPHI = cast<PHINode>(ValToPoison[OldPHI]);
306 auto *NewPHI = cast<PHINode>(ValToPoison[OldPHI]);
lib/Transforms/ObjCARC/ObjCARC.h 86 void getEquivalentPHIs(PHINodeTy &PN, VectorTy &PHIList) {
88 for (auto &P : BB->phis()) {
lib/Transforms/ObjCARC/ObjCARCContract.cpp 650 if (PHINode *PHI = dyn_cast<PHINode>(U.getUser())) {
650 if (PHINode *PHI = dyn_cast<PHINode>(U.getUser())) {
652 unsigned ValNo = PHINode::getIncomingValueNumForOperand(OperandNo);
677 PHINode::getOperandNumForIncomingValue(i)) == &*UI)
710 if (PHINode *PN = dyn_cast<PHINode>(Arg)) {
710 if (PHINode *PN = dyn_cast<PHINode>(Arg)) {
lib/Transforms/ObjCARC/ObjCARCOpts.cpp 624 if (const PHINode *PN = dyn_cast<PHINode>(Arg)) {
624 if (const PHINode *PN = dyn_cast<PHINode>(Arg)) {
686 if (const PHINode *PN = dyn_cast<PHINode>(Ptr))
686 if (const PHINode *PN = dyn_cast<PHINode>(Ptr))
945 const PHINode *PN = dyn_cast<PHINode>(Arg);
945 const PHINode *PN = dyn_cast<PHINode>(Arg);
lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp 56 bool ProvenanceAnalysis::relatedPHI(const PHINode *A,
62 if (const PHINode *PNB = dyn_cast<PHINode>(B))
62 if (const PHINode *PNB = dyn_cast<PHINode>(B))
150 if (const PHINode *PN = dyn_cast<PHINode>(A))
150 if (const PHINode *PN = dyn_cast<PHINode>(A))
152 if (const PHINode *PN = dyn_cast<PHINode>(B))
152 if (const PHINode *PN = dyn_cast<PHINode>(B))
lib/Transforms/ObjCARC/ProvenanceAnalysis.h 63 bool relatedPHI(const PHINode *A, const Value *B);
lib/Transforms/Scalar/ADCE.cpp 167 void markPhiLive(PHINode *PN);
366 if (auto *PN = dyn_cast<PHINode>(LiveInst))
366 if (auto *PN = dyn_cast<PHINode>(LiveInst))
444 void AggressiveDeadCodeElimination::markPhiLive(PHINode *PN) {
lib/Transforms/Scalar/CallSiteSplitting.cpp 312 PHINode *CallPN = nullptr;
318 CallPN = PHINode::Create(Instr->getType(), Preds.size(), "phi.call");
341 for (PHINode &PN : TailBB->phis()) {
400 if (isa<PHINode>(CurrentI))
402 PHINode *NewPN = PHINode::Create(CurrentI->getType(), Preds.size());
402 PHINode *NewPN = PHINode::Create(CurrentI->getType(), Preds.size());
426 if (PHINode *PN = dyn_cast<PHINode>(&BI)) {
426 if (PHINode *PN = dyn_cast<PHINode>(&BI)) {
lib/Transforms/Scalar/ConstantHoisting.cpp 181 if (!isa<PHINode>(Inst) && !Inst->isEHPad())
187 if (Idx != ~0U && isa<PHINode>(Inst))
188 return cast<PHINode>(Inst)->getIncomingBlock(Idx)->getTerminator();
327 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
705 if (auto PHI = dyn_cast<PHINode>(Inst)) {
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp 159 static bool simplifyCommonValuePhi(PHINode *P, LazyValueInfo *LVI,
211 static bool processPHI(PHINode *P, LazyValueInfo *LVI, DominatorTree *DT,
846 BBChanged |= processPHI(cast<PHINode>(II), LVI, DT, SQ);
lib/Transforms/Scalar/GVN.cpp 371 if (PHINode *PN = dyn_cast<PHINode>(V))
371 if (PHINode *PN = dyn_cast<PHINode>(V))
543 NumberingPhi[nextValueNumber] = cast<PHINode>(V);
594 if (isa<PHINode>(V))
744 SmallVector<PHINode*, 8> NewPHIs;
1279 if (isa<PHINode>(V))
1367 if (isa<PHINode>(V))
1643 if (PHINode *PN = NumberingPhi[Num]) {
2044 if (isa<AllocaInst>(I) || I->isTerminator() || isa<PHINode>(I)) {
2245 isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() ||
2382 PHINode *Phi =
2383 PHINode::Create(CurInst->getType(), predMap.size(),
2591 for (PHINode &Phi : B->phis()) {
lib/Transforms/Scalar/GVNSink.cpp 236 ModelledPHI(const PHINode *PN) {
580 if (isa<PHINode>(I) || I->isEHPad() || isa<AllocaInst>(I) ||
596 for (PHINode &PN : BB->phis()) {
615 while (PHINode *PN = dyn_cast<PHINode>(I++)) {
615 while (PHINode *PN = dyn_cast<PHINode>(I++)) {
852 auto *PN = PHINode::Create(Op->getType(), Insts.size(),
852 auto *PN = PHINode::Create(Op->getType(), Insts.size(),
lib/Transforms/Scalar/IndVarSimplify.cpp 147 bool handleFloatingPointIV(Loop *L, PHINode *PH);
164 PHINode *IndVar, SCEVExpander &Rewriter);
239 PHINode *PHI = dyn_cast<PHINode>(User);
239 PHINode *PHI = dyn_cast<PHINode>(User);
307 bool IndVarSimplify::handleFloatingPointIV(Loop *L, PHINode *PN) {
458 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN);
458 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN);
508 for (PHINode &PN : Header->phis())
513 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i]))
513 if (PHINode *PN = dyn_cast_or_null<PHINode>(&*PHIs[i]))
529 PHINode *PN;
540 RewritePhi(PHINode *P, unsigned I, Value *V, bool H)
599 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin());
599 PHINode *PN = dyn_cast<PHINode>(ExitBB->begin());
606 while ((PN = dyn_cast<PHINode>(BBI++))) {
706 PHINode *PN = Phi.PN;
760 for (PHINode &PN : ExitBB->phis()) {
790 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx));
790 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx));
838 while (PHINode *P = dyn_cast<PHINode>(BI)) {
838 while (PHINode *P = dyn_cast<PHINode>(BI)) {
880 PHINode *NarrowIV = nullptr;
967 PHINode *OrigPhi;
981 PHINode *WidePhi = nullptr;
1014 void calculatePostIncRanges(PHINode *OrigPhi);
1037 PHINode *createWideIV(SCEVExpander &Rewriter);
1548 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) {
1548 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) {
1562 PHINode *WidePhi =
1563 PHINode::Create(DU.WideDef->getType(), 1, UsePhi->getName() + ".wide",
1725 PHINode *WidenIV::createWideIV(SCEVExpander &Rewriter) {
1770 WidePhi = cast<PHINode>(Rewriter.expandCodeFor(AddRec, WideType, InsertPt));
1899 void WidenIV::calculatePostIncRanges(PHINode *OrigPhi) {
1939 PHINode *IVPhi;
1944 IndVarSimplifyVisitor(PHINode *IV, ScalarEvolution *SCEV,
1972 SmallVector<PHINode*, 8> LoopPhis;
1973 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
1974 LoopPhis.push_back(cast<PHINode>(I));
1989 PHINode *CurrIV = LoopPhis.pop_back_val();
2004 if (PHINode *WidePhi = Widener.createWideIV(Rewriter)) {
2020 static PHINode *getLoopPhiForCounter(Value *IncV, Loop *L) {
2038 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0));
2038 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0));
2048 Phi = dyn_cast<PHINode>(IncI->getOperand(1));
2101 PHINode *Phi = dyn_cast<PHINode>(LHS);
2101 PHINode *Phi = dyn_cast<PHINode>(LHS);
2204 static bool AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) {
2219 static bool isLoopCounter(PHINode* Phi, Loop *L,
2247 static PHINode *FindLoopCounter(Loop *L, BasicBlock *ExitingBB,
2255 PHINode *BestPhi = nullptr;
2261 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
2262 PHINode *Phi = cast<PHINode>(I);
2262 PHINode *Phi = cast<PHINode>(I);
2331 static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB,
2424 PHINode *IndVar, SCEVExpander &Rewriter) {
2579 if (isa<PHINode>(I))
2612 if (PHINode *P = dyn_cast<PHINode>(User)) {
2612 if (PHINode *P = dyn_cast<PHINode>(User)) {
2614 PHINode::getIncomingValueNumForOperand(U.getOperandNo());
3064 PHINode *IndVar = FindLoopCounter(L, ExitingBB, ExitCount, SE, DT);
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp 521 std::vector<PHINode *> PHIValuesAtPseudoExit;
522 PHINode *IndVarEnd = nullptr;
1170 for (PHINode &PN : SBB->phis()) {
1311 for (PHINode &PN : LS.Header->phis()) {
1312 PHINode *NewPHI = PHINode::Create(PN.getType(), 2, PN.getName() + ".copy",
1312 PHINode *NewPHI = PHINode::Create(PN.getType(), 2, PN.getName() + ".copy",
1321 RRI.IndVarEnd = PHINode::Create(IndVarBase->getType(), 2, "indvar.end",
1337 for (PHINode &PN : LS.Header->phis())
lib/Transforms/Scalar/InferAddressSpaces.cpp 247 auto IncomingValues = cast<PHINode>(Op).incoming_values();
474 PHINode *PHI = cast<PHINode>(I);
474 PHINode *PHI = cast<PHINode>(I);
475 PHINode *NewPHI = PHINode::Create(NewPtrType, PHI->getNumIncomingValues());
475 PHINode *NewPHI = PHINode::Create(NewPtrType, PHI->getNumIncomingValues());
477 unsigned OperandNo = PHINode::getOperandNumForIncomingValue(Index);
1007 while (isa<PHINode>(InsertPos))
lib/Transforms/Scalar/JumpThreading.cpp 210 static void updatePredecessorProfileMetadata(PHINode *PN, BasicBlock *BB) {
647 if (PHINode *PN = dyn_cast<PHINode>(I)) {
647 if (PHINode *PN = dyn_cast<PHINode>(I)) {
672 if (!isa<PHINode>(Source) && !isa<CmpInst>(Source))
775 PHINode *PN = dyn_cast<PHINode>(CmpLHS);
775 PHINode *PN = dyn_cast<PHINode>(CmpLHS);
777 PN = dyn_cast<PHINode>(CmpRHS);
1213 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1213 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1225 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1225 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1313 if (isOpDefinedInBlock(LoadedPtr, LoadBB) && !isa<PHINode>(LoadedPtr))
1490 PHINode *PN = PHINode::Create(LoadI->getType(), std::distance(PB, PE), "",
1490 PHINode *PN = PHINode::Create(LoadI->getType(), std::distance(PB, PE), "",
1767 bool JumpThreadingPass::ProcessBranchOnPHI(PHINode *PN) {
1807 if (!isa<PHINode>(BB->front()))
1879 cast<PHINode>(BB->front()).getNumIncomingValues()) {
1907 for (PHINode &PN : PHIBB->phis()) {
2001 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
2001 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
2002 PHINode *NewPN = PHINode::Create(PN->getType(), 1, PN->getName(), NewBB);
2002 PHINode *NewPN = PHINode::Create(PN->getType(), 1, PN->getName(), NewBB);
2061 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2061 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2321 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
2321 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
2380 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2380 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2425 SelectInst *SI, PHINode *SIUse,
2454 PHINode *Phi = dyn_cast<PHINode>(BI); ++BI)
2454 PHINode *Phi = dyn_cast<PHINode>(BI); ++BI)
2460 PHINode *CondPHI = dyn_cast<PHINode>(SI->getCondition());
2460 PHINode *CondPHI = dyn_cast<PHINode>(SI->getCondition());
2499 PHINode *CondLHS = dyn_cast<PHINode>(CondCmp->getOperand(0));
2499 PHINode *CondLHS = dyn_cast<PHINode>(CondCmp->getOperand(0));
2569 PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
2569 PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
2611 PHINode *NewPN = PHINode::Create(SI->getType(), 2, "", SI);
2611 PHINode *NewPN = PHINode::Create(SI->getType(), 2, "", SI);
2739 if (!isa<PHINode>(&*BI))
2747 PHINode *NewPN = PHINode::Create(Inst->getType(), 2);
2747 PHINode *NewPN = PHINode::Create(Inst->getType(), 2);
lib/Transforms/Scalar/LICM.cpp 157 Instruction &I, BasicBlock &ExitBlock, PHINode &PN, const LoopInfo *LI,
646 bool canHoistPHI(PHINode *PN) {
910 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
910 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
1289 static bool isTriviallyReplaceablePHI(const PHINode &PN, const Instruction &I) {
1333 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1333 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1359 Instruction &I, BasicBlock &ExitBlock, PHINode &PN, const LoopInfo *LI,
1422 PHINode *OpPN =
1423 PHINode::Create(OInst->getType(), PN.getNumIncomingValues(),
1455 PHINode *TPN, Instruction *I, LoopInfo *LI,
1472 static bool canSplitPredecessors(PHINode *PN, LoopSafetyInfo *SafetyInfo) {
1490 static void splitPredecessorsOfLoopExit(PHINode *PN, DominatorTree *DT,
1595 PHINode *PN = cast<PHINode>(User);
1595 PHINode *PN = cast<PHINode>(User);
1647 PHINode *PN = cast<PHINode>(User);
1647 PHINode *PN = cast<PHINode>(User);
1684 if (isa<PHINode>(I))
1755 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(BB),
1755 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(BB),
2109 SmallVector<PHINode *, 16> NewPHIs;
lib/Transforms/Scalar/LoopDeletion.cpp 53 for (PHINode &P : ExitBlock->phis()) {
162 for (PHINode &P : ExitBlock->phis()) {
lib/Transforms/Scalar/LoopFuse.cpp 1171 SmallVector<PHINode *, 8> OriginalFC0PHIs;
1173 for (PHINode &PHI : FC0.Header->phis())
1215 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
1215 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
1229 for (PHINode *LCPHI : OriginalFC0PHIs) {
1236 PHINode *L1HeaderPHI = PHINode::Create(
1236 PHINode *L1HeaderPHI = PHINode::Create(
1404 SmallVector<PHINode *, 8> OriginalFC0PHIs;
1406 for (PHINode &PHI : FC0.Header->phis())
1457 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
1457 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
1471 for (PHINode *LCPHI : OriginalFC0PHIs) {
1478 PHINode *L1HeaderPHI = PHINode::Create(
1478 PHINode *L1HeaderPHI = PHINode::Create(
lib/Transforms/Scalar/LoopIdiomRecognize.cpp 247 PHINode *CntPhi, Value *Var);
250 Instruction *CntInst, PHINode *CntPhi,
1251 static PHINode *getRecurrenceVar(Value *VarX, Instruction *DefX,
1253 auto *PhiX = dyn_cast<PHINode>(VarX);
1253 auto *PhiX = dyn_cast<PHINode>(VarX);
1285 Instruction *&CntInst, PHINode *&CntPhi,
1292 PHINode *PhiX, *CountPhi;
1352 PHINode *Phi = getRecurrenceVar(Inst->getOperand(0), Inst, LoopEntry);
1421 Instruction *&CntInst, PHINode *&CntPhi,
1449 PHINode *PhiX = getRecurrenceVar(VarX, DefX, LoopEntry);
1477 PHINode *Phi = getRecurrenceVar(Inst->getOperand(0), Inst, LoopEntry);
1502 PHINode *CntPhi = nullptr;
1625 PHINode *CntPhi;
1694 PHINode *CntPhi, Value *InitX, Instruction *DefX, const DebugLoc &DL,
1755 PHINode *TcPhi = PHINode::Create(Ty, 2, "tcphi", &Body->front());
1755 PHINode *TcPhi = PHINode::Create(Ty, 2, "tcphi", &Body->front());
1785 PHINode *CntPhi, Value *Var) {
1862 PHINode *TcPhi = PHINode::Create(Ty, 2, "tcphi", &Body->front());
1862 PHINode *TcPhi = PHINode::Create(Ty, 2, "tcphi", &Body->front());
1997 for (const PHINode &PHI : ExitBB->phis()) {
lib/Transforms/Scalar/LoopInstSimplify.cpp 66 SmallPtrSet<PHINode *, 4> VisitedPHIs;
87 if (auto *PI = dyn_cast<PHINode>(&I))
87 if (auto *PI = dyn_cast<PHINode>(&I))
116 if (auto *UserPI = dyn_cast<PHINode>(UserI))
116 if (auto *UserPI = dyn_cast<PHINode>(UserI))
lib/Transforms/Scalar/LoopInterchange.cpp 295 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) {
296 PHINode *InnerIndexVar = L->getCanonicalInductionVariable();
301 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
302 PHINode *PhiVar = cast<PHINode>(I);
302 PHINode *PhiVar = cast<PHINode>(I);
337 bool isLoopStructureUnderstood(PHINode *InnerInductionVar);
341 const SmallPtrSetImpl<PHINode *> &getOuterInnerReductions() const {
354 SmallVector<PHINode *, 8> &Inductions,
367 SmallPtrSet<PHINode *, 4> OuterInnerReductions;
627 PHINode *InnerInduction) {
640 unsigned IncomBlockIndx = PHINode::getIncomingValueNumForOperand(i);
653 PHINode *PHI = dyn_cast<PHINode>(SV);
653 PHINode *PHI = dyn_cast<PHINode>(SV);
663 static PHINode *findInnerReductionPhi(Loop *L, Value *V) {
665 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
665 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
679 Loop *L, SmallVector<PHINode *, 8> &Inductions, Loop *InnerLoop) {
682 for (PHINode &PHI : L->getHeader()->phis()) {
702 PHINode *InnerRedPhi = findInnerReductionPhi(InnerLoop, V);
720 for (PHINode &PHI : Block->phis()) {
729 if (!isa<PHINode>(Ins) && isOuterLoopExitBlock)
760 PHINode *InnerInductionVar;
761 SmallVector<PHINode *, 8> Inductions;
932 for (PHINode &PHI : LoopNestExit->phis()) {
1228 PHINode *InductionPHI = getInductionVariable(InnerLoop, SE);
1351 for (PHINode &P : make_early_inc_range(InnerExit->phis())) {
1375 SmallVector<PHINode *, 8> LcssaInnerExit;
1376 for (PHINode &P : InnerExit->phis())
1379 SmallVector<PHINode *, 8> LcssaInnerLatch;
1380 for (PHINode &P : InnerLatch->phis())
1388 for (PHINode *P : LcssaInnerExit)
1393 for (PHINode *P : LcssaInnerLatch)
1401 for (PHINode &P : OuterExit->phis()) {
1408 if (!I || ((I->getParent() != OuterLatch || isa<PHINode>(I)) &&
1412 PHINode *NewPhi = dyn_cast<PHINode>(P.clone());
1412 PHINode *NewPhi = dyn_cast<PHINode>(P.clone());
1440 if (isa<PHINode>(OuterLoopPreHeader->begin()) ||
1529 SmallVector<PHINode *, 4> InnerLoopPHIs, OuterLoopPHIs;
1530 for (PHINode &PHI : drop_begin(InnerLoopHeader->phis(), 1))
1531 InnerLoopPHIs.push_back(cast<PHINode>(&PHI));
1532 for (PHINode &PHI : drop_begin(OuterLoopHeader->phis(), 1))
1533 OuterLoopPHIs.push_back(cast<PHINode>(&PHI));
1541 for (PHINode *PHI : OuterLoopPHIs) {
1546 for (PHINode *PHI : InnerLoopPHIs) {
lib/Transforms/Scalar/LoopLoadElimination.cpp 441 PHINode *PHI = PHINode::Create(Initial->getType(), 2, "store_forwarded",
441 PHINode *PHI = PHINode::Create(Initial->getType(), 2, "store_forwarded",
lib/Transforms/Scalar/LoopRerollPass.cpp 545 if (PHINode *PN = dyn_cast<PHINode>(UU)) {
545 if (PHINode *PN = dyn_cast<PHINode>(UU)) {
577 if (!isa<PHINode>(I))
625 if (!(isa<PHINode>(Instructions.back()) ||
656 if (!isa<PHINode>(I))
696 if (PHINode *PN = dyn_cast<PHINode>(User)) {
696 if (PHINode *PN = dyn_cast<PHINode>(User)) {
770 PHINode *PN = dyn_cast<PHINode>(UU);
770 PHINode *PN = dyn_cast<PHINode>(UU);
1292 if (!isa<PHINode>(I) && !isUnorderedLoadStore(I) &&
lib/Transforms/Scalar/LoopSimplifyCFG.cpp 366 for (auto &PN : BB->phis())
lib/Transforms/Scalar/LoopSink.cpp 184 if (dyn_cast<PHINode>(UI))
lib/Transforms/Scalar/LoopStrengthReduce.cpp 884 for (PHINode &PN : AR->getLoop()->getHeader()->phis()) {
1472 if (const PHINode *PN = dyn_cast<PHINode>(UserInst)) {
1472 if (const PHINode *PN = dyn_cast<PHINode>(UserInst)) {
2044 void RewriteForPHI(PHINode *PN, const LSRUse &LU, const LSRFixup &LF,
2109 PHINode *PH = dyn_cast<PHINode>(ShadowUse->getOperand(0));
2109 PHINode *PH = dyn_cast<PHINode>(ShadowUse->getOperand(0));
2165 PHINode *NewPH = PHINode::Create(DestTy, 2, "IV.S.", PH);
2165 PHINode *NewPH = PHINode::Create(DestTy, 2, "IV.S.", PH);
2855 if (isa<PHINode>(Chain.tailUserInst())
2931 if (isa<PHINode>(UserInst) && isa<PHINode>(Chain.tailUserInst()))
2931 if (isa<PHINode>(UserInst) && isa<PHINode>(Chain.tailUserInst()))
2948 if (isa<PHINode>(UserInst))
3053 if (isa<PHINode>(I) || !IU.isIVUserOrOperand(&I))
3080 for (PHINode &PN : L->getHeader()->phis()) {
3178 if (isa<PHINode>(InsertPt))
3218 if (isa<PHINode>(Chain.tailUserInst())) {
3219 for (PHINode &Phi : L->getHeader()->phis()) {
3425 const BasicBlock *UseBB = !isa<PHINode>(UserInst) ?
3427 cast<PHINode>(UserInst)->getIncomingBlock(
3428 PHINode::getIncomingValueNumForOperand(U.getOperandNo()));
5108 while (isa<PHINode>(IP)) ++IP;
5306 PHINode *PN, const LSRUse &LU, const LSRFixup &LF, const Formula &F,
5405 for (BasicBlock::iterator I = Block->begin(); isa<PHINode>(I);
5407 PHINode *NewPN = cast<PHINode>(I);
5407 PHINode *NewPN = cast<PHINode>(I);
5425 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) {
5425 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) {
5473 if (PHINode *PN = dyn_cast<PHINode>(Chain.tailUserInst()))
5473 if (PHINode *PN = dyn_cast<PHINode>(Chain.tailUserInst()))
5522 if (auto *PN = dyn_cast<PHINode>(U.getUser())) {
5522 if (auto *PN = dyn_cast<PHINode>(U.getUser())) {
lib/Transforms/Scalar/LoopUnrollPass.cpp 410 if (auto *PhiI = dyn_cast<PHINode>(I))
410 if (auto *PhiI = dyn_cast<PHINode>(I))
479 auto *PHI = dyn_cast<PHINode>(&I);
479 auto *PHI = dyn_cast<PHINode>(&I);
621 auto *PN = dyn_cast<PHINode>(&I);
621 auto *PN = dyn_cast<PHINode>(&I);
lib/Transforms/Scalar/LoopUnswitch.cpp 610 PHINode *LPHI = dyn_cast<PHINode>(LHS);
610 PHINode *LPHI = dyn_cast<PHINode>(LHS);
611 PHINode *RPHI = dyn_cast<PHINode>(RHS);
611 PHINode *RPHI = dyn_cast<PHINode>(RHS);
1153 if (!LoopExitBB || isa<PHINode>(LoopExitBB->begin()))
1199 if (!LoopExitBB || isa<PHINode>(LoopExitBB->begin()))
1320 for (PHINode &PN : ExitSucc->phis()) {
1328 PHINode *PN = PHINode::Create(LPad->getType(), 0, "",
1328 PHINode *PN = PHINode::Create(LPad->getType(), 0, "",
1561 for (PHINode &PN : NewSISucc->phis())
1630 while (PHINode *PN = dyn_cast<PHINode>(SuccIt++)) {
1630 while (PHINode *PN = dyn_cast<PHINode>(SuccIt++)) {
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp 118 while (!isa<PHINode>(V)) {
164 auto *PhiDef = cast<PHINode>(V);
164 auto *PhiDef = cast<PHINode>(V);
lib/Transforms/Scalar/MergeICmps.cpp 408 BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi,
429 PHINode &Phi_;
435 BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi,
608 PHINode &Phi, const TargetLibraryInfo &TLI,
758 std::vector<BasicBlock *> getOrderedBlocks(PHINode &Phi,
793 bool processPhi(PHINode &Phi, const TargetLibraryInfo &TLI, AliasAnalysis &AA,
883 if (auto *const Phi = dyn_cast<PHINode>(&*BBIt->begin()))
883 if (auto *const Phi = dyn_cast<PHINode>(&*BBIt->begin()))
lib/Transforms/Scalar/MergedLoadStoreMotion.cpp 118 PHINode *getPHIOperand(BasicBlock *BB, StoreInst *S0, StoreInst *S1);
209 PHINode *MergedLoadStoreMotion::getPHIOperand(BasicBlock *BB, StoreInst *S0,
217 auto *NewPN = PHINode::Create(Opd1->getType(), 2, Opd2->getName() + ".sink",
217 auto *NewPN = PHINode::Create(Opd1->getType(), 2, Opd2->getName() + ".sink",
266 if (PHINode *NewPN = getPHIOperand(BB, S0, S1))
lib/Transforms/Scalar/NewGVN.cpp 540 DenseMap<const Value *, PHINode *> RealToTemp;
733 void addPhiOfOps(PHINode *Op, BasicBlock *BB, Instruction *ExistingValue);
734 void removePhiOfOps(Instruction *I, PHINode *PHITemp);
950 static bool isCopyOfPHI(const Value *V, const PHINode *PN) {
956 return CO && isa<PHINode>(CO);
996 if (auto *PHIOp = dyn_cast<PHINode>(I))
1723 return isa<PHINode>(V) || isCopyOfAPHI(V);
1727 if (auto *MemberPhi = dyn_cast<PHINode>(Member))
1975 auto *PN = cast<PHINode>(I);
1975 auto *PN = cast<PHINode>(I);
2549 void NewGVN::removePhiOfOps(Instruction *I, PHINode *PHITemp) {
2562 void NewGVN::addPhiOfOps(PHINode *Op, BasicBlock *BB,
2600 if (isa<PHINode>(V) && getBlockForValue(V) == PHIBlock) {
2717 PHINode *OpPHI = nullptr;
2721 if (!isa<PHINode>(Op)) {
2722 auto *ValuePHI = RealToTemp.lookup(Op);
2728 OpPHI = cast<PHINode>(Op);
2769 if (isa<PHINode>(Op)) {
2773 } else if (auto *ValuePHI = RealToTemp.lookup(Op)) {
2824 auto *ValuePHI = RealToTemp.lookup(I);
2828 PHINode::Create(I->getType(), OpPHI->getNumOperands(), "phiofops");
2898 if (isa<PHINode>(&I))
2995 if (isa<PHINode>(&I))
3093 } else if (auto *Op = RealToTemp.lookup(I)) {
3593 if (auto *PN = RealToTemp.lookup(Def)) {
3614 if (auto *P = dyn_cast<PHINode>(I)) {
3614 if (auto *P = dyn_cast<PHINode>(I)) {
3860 auto *PHI = dyn_cast<PHINode>(Inst);
3860 auto *PHI = dyn_cast<PHINode>(Inst);
3861 PHI = PHI ? PHI : dyn_cast_or_null<PHINode>(RealToTemp.lookup(Inst));
3946 auto *PN = cast<PHINode>(DefInst);
3946 auto *PN = cast<PHINode>(DefInst);
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp 58 PHINode *Phi = Builder.CreatePHI(Ty, 2);
lib/Transforms/Scalar/Reassociate.cpp 884 while (InsertPt != BB->end() && (isa<PHINode>(InsertPt) ||
lib/Transforms/Scalar/Reg2Mem.cpp 53 if (UI->getParent() != BB || isa<PHINode>(UI))
112 if (isa<PHINode>(iib))
118 DemotePHIToStack(cast<PHINode>(ilb), AllocaInsertionPoint);
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp 638 if (!isa<PHINode>(V) && !isa<SelectInst>(V) &&
791 return isa<PHINode>(BDV) || isa<SelectInst>(BDV) ||
825 if (PHINode *PN = dyn_cast<PHINode>(Current)) {
825 if (PHINode *PN = dyn_cast<PHINode>(Current)) {
889 } else if (PHINode *PN = dyn_cast<PHINode>(BDV)) {
889 } else if (PHINode *PN = dyn_cast<PHINode>(BDV)) {
963 if (isa<PHINode>(I)) {
968 return PHINode::Create(I->getType(), NumPreds, Name, I);
1036 if (PHINode *BasePHI = dyn_cast<PHINode>(State.getBaseValue())) {
1036 if (PHINode *BasePHI = dyn_cast<PHINode>(State.getBaseValue())) {
1037 PHINode *PN = cast<PHINode>(BDV);
1037 PHINode *PN = cast<PHINode>(BDV);
1825 if (isa<PHINode>(Use)) {
1826 PHINode *Phi = cast<PHINode>(Use);
1826 PHINode *Phi = cast<PHINode>(Use);
1989 static bool AreEquivalentPhiNodes(PHINode &OrigRootPhi, PHINode &AlternateRootPhi) {
1989 static bool AreEquivalentPhiNodes(PHINode &OrigRootPhi, PHINode &AlternateRootPhi) {
2044 PHINode *OrigRootPhi = dyn_cast<PHINode>(RootOfChain);
2044 PHINode *OrigRootPhi = dyn_cast<PHINode>(RootOfChain);
2045 PHINode *AlternateRootPhi = dyn_cast<PHINode>(Info.PointerToBase[LiveValue]);
2045 PHINode *AlternateRootPhi = dyn_cast<PHINode>(Info.PointerToBase[LiveValue]);
2647 if (isa<PHINode>(I))
2674 PHINode *PN = dyn_cast<PHINode>(&I);
2674 PHINode *PN = dyn_cast<PHINode>(&I);
lib/Transforms/Scalar/SCCP.cpp 565 for (PHINode &PN : Dest->phis())
609 void visitPHINode(PHINode &I);
781 void SCCPSolver::visitPHINode(PHINode &PN) {
lib/Transforms/Scalar/SROA.cpp 636 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
636 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
978 } else if (!isa<BitCastInst>(I) && !isa<PHINode>(I) &&
1042 void visitPHINode(PHINode &PN) { visitPHINodeOrSelectInst(PN); }
1194 static bool isSafePHIToSpeculate(PHINode &PN) {
1262 static void speculatePHINodeLoads(PHINode &PN) {
1268 PHINode *NewPN = PHIBuilder.CreatePHI(LoadTy, PN.getNumIncomingValues(),
2312 SmallSetVector<PHINode *, 8> &PHIUsers;
2325 SmallSetVector<PHINode *, 8> &PHIUsers,
3145 bool visitPHINode(PHINode &PN) {
3155 if (isa<PHINode>(OldPtr))
3449 bool visitPHINode(PHINode &PN) {
4183 SmallSetVector<PHINode *, 8> PHIUsers;
4204 for (PHINode *PHI : PHIUsers)
4228 for (PHINode *PHIUser : PHIUsers)
lib/Transforms/Scalar/Scalarizer.cpp 194 bool visitPHINode(PHINode &PHI);
741 bool ScalarizerVisitor::visitPHINode(PHINode &PHI) {
760 cast<PHINode>(Res[J])->addIncoming(Op[J], IncomingBlock);
840 if (isa<PHINode>(Op))
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp 162 auto *PN = dyn_cast<PHINode>(&I);
162 auto *PN = dyn_cast<PHINode>(&I);
200 for (PHINode &PN : UnswitchedBB.phis()) {
227 for (PHINode &PN : ExitBB.phis()) {
228 auto *NewPN = PHINode::Create(PN.getType(), /*NumReservedValues*/ 2,
228 auto *NewPN = PHINode::Create(PN.getType(), /*NumReservedValues*/ 2,
1052 auto *MergePN =
1053 PHINode::Create(I.getType(), /*NumReservedValues*/ 2, ".us-phi",
1081 for (PHINode &PN : ClonedSuccBB->phis())
1108 for (PHINode &PN : ClonedSuccBB->phis()) {
lib/Transforms/Scalar/SimplifyCFGPass.cpp 95 (!isa<PHINode>(I) || I != BB.begin() || Ret->getNumOperands() == 0 ||
121 PHINode *RetBlockPHI = dyn_cast<PHINode>(RetBlock->begin());
121 PHINode *RetBlockPHI = dyn_cast<PHINode>(RetBlock->begin());
125 RetBlockPHI = PHINode::Create(Ret->getOperand(0)->getType(),
lib/Transforms/Scalar/Sink.cpp 46 if (PHINode *PN = dyn_cast<PHINode>(UseInst)) {
46 if (PHINode *PN = dyn_cast<PHINode>(UseInst)) {
49 unsigned Num = PHINode::getIncomingValueNumForOperand(U.getOperandNo());
74 if (Inst->isTerminator() || isa<PHINode>(Inst) || Inst->isEHPad() ||
lib/Transforms/Scalar/SpeculateAroundPHIs.cpp 49 isSafeToSpeculatePHIUsers(PHINode &PN, DominatorTree &DT,
118 if (isa<PHINode>(OpI)) {
203 PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap,
203 PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap,
343 static void visitPHIUsersAndDepsInPostOrder(ArrayRef<PHINode *> PNs,
347 for (auto *PN : PNs)
420 static SmallVector<PHINode *, 16>
425 SmallVector<PHINode *, 16> SpecPNs;
430 SmallDenseMap<Instruction *, TinyPtrVector<PHINode *>, 16> UserToPNMap;
431 SmallDenseMap<PHINode *, int, 16> PNUserCountMap;
433 for (auto *PN : PNs) {
492 for (auto *PN : llvm::make_range(UserPNsSplitIt, UserPNs.end())) {
559 static void speculatePHIs(ArrayRef<PHINode *> SpecPNs,
628 auto *OpPN = dyn_cast<PHINode>(OpV);
628 auto *OpPN = dyn_cast<PHINode>(OpV);
704 auto *SpecIPN = IRB.CreatePHI(OrigI->getType(), SpecPreds.size(),
722 for (auto *SpecPN : SpecPNs) {
733 static bool tryToSpeculatePHIs(SmallVectorImpl<PHINode *> &PNs,
738 SmallDenseMap<PHINode *, int, 16> CostSavingsMap;
794 SmallVector<PHINode *, 16> SpecPNs = findProfitablePHIs(
811 SmallVector<PHINode *, 16> PNs;
813 while (auto *PN = dyn_cast<PHINode>(&*BBI)) {
813 while (auto *PN = dyn_cast<PHINode>(&*BBI)) {
lib/Transforms/Scalar/StructurizeCFG.cpp 81 using PhiMap = MapVector<PHINode *, BBValueVector>;
585 for (PHINode &Phi : To->phis()) {
595 for (PHINode &Phi : To->phis()) {
604 SmallVector<PHINode *, 8> InsertedPhis;
615 PHINode *Phi = PI.first;
647 PHINode *Phi = InsertedPhis[i];
919 } else if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
919 } else if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
lib/Transforms/Scalar/TailRecursionElimination.cpp 501 bool &TailCallsAreMarkedTail, SmallVectorImpl<PHINode *> &ArgumentPHIs,
596 PHINode *PN = PHINode::Create(I->getType(), 2,
596 PHINode *PN = PHINode::Create(I->getType(), 2,
632 PHINode *AccPN = PHINode::Create(
632 PHINode *AccPN = PHINode::Create(
688 bool &TailCallsAreMarkedTail, SmallVectorImpl<PHINode *> &ArgumentPHIs,
737 SmallVectorImpl<PHINode *> &ArgumentPHIs,
768 SmallVector<PHINode*, 8> ArgumentPHIs;
800 for (PHINode *PN : ArgumentPHIs) {
lib/Transforms/Utils/BasicBlockUtils.cpp 141 if (!isa<PHINode>(BB->begin())) return;
143 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
143 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
160 for (PHINode &PN : BB->phis())
165 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*()))
165 if (PHINode *PN = dyn_cast_or_null<PHINode>(PHIs[i].operator Value*()))
208 for (PHINode &PN : BB->phis())
218 if (isa<PHINode>(BB->front())) {
219 for (PHINode &PN : BB->phis())
220 if (!isa<PHINode>(PN.getIncomingValue(0)) ||
221 cast<PHINode>(PN.getIncomingValue(0))->getParent() != BB)
406 while (isa<PHINode>(SplitIt) || SplitIt->isEHPad())
533 for (BasicBlock::iterator I = OrigBB->begin(); isa<PHINode>(I); ) {
534 PHINode *PN = cast<PHINode>(I++);
534 PHINode *PN = cast<PHINode>(I++);
575 PHINode *NewPHI =
576 PHINode::Create(PN->getType(), Preds.size(), PN->getName() + ".ph", BI);
646 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++I)
647 cast<PHINode>(I)->addIncoming(UndefValue::get(I->getType()), NewBB);
753 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad);
753 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad);
789 if (PHINode *PN = dyn_cast<PHINode>(V)) {
789 if (PHINode *PN = dyn_cast<PHINode>(V)) {
884 PHINode *SomePHI = dyn_cast<PHINode>(BB->begin());
884 PHINode *SomePHI = dyn_cast<PHINode>(BB->begin());
lib/Transforms/Utils/BreakCriticalEdges.cpp 114 for (PHINode &PN : DestBB->phis()) {
120 if (const PHINode *VP = dyn_cast<PHINode>(V))
120 if (const PHINode *VP = dyn_cast<PHINode>(V))
125 PHINode *NewPN = PHINode::Create(
125 PHINode *NewPN = PHINode::Create(
179 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
183 PHINode *PN = cast<PHINode>(I);
183 PHINode *PN = cast<PHINode>(I);
327 PHINode *PN = dyn_cast<PHINode>(BB->begin());
327 PHINode *PN = dyn_cast<PHINode>(BB->begin());
442 PHINode *DirPHI = cast<PHINode>(Direct);
442 PHINode *DirPHI = cast<PHINode>(Direct);
443 PHINode *IndPHI = cast<PHINode>(Indirect);
443 PHINode *IndPHI = cast<PHINode>(Indirect);
454 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", IndPHI);
454 PHINode *NewIndPHI = PHINode::Create(IndPHI->getType(), 1, "ind", IndPHI);
460 PHINode *MergePHI =
461 PHINode::Create(IndPHI->getType(), 2, "merge", &*MergeInsert);
lib/Transforms/Utils/BypassSlowDivision.cpp 219 return llvm::all_of(cast<PHINode>(I)->incoming_values(), [&](Value *V) {
315 PHINode *QuoPhi = Builder.CreatePHI(getSlowType(), 2);
318 PHINode *RemPhi = Builder.CreatePHI(getSlowType(), 2);
lib/Transforms/Utils/CallPromotionUtils.cpp 49 for (PHINode &Phi : Invoke->getNormalDest()->phis()) {
81 for (PHINode &Phi : Invoke->getUnwindDest()->phis()) {
111 PHINode *Phi = Builder.CreatePHI(OrigInst->getType(), 0);
lib/Transforms/Utils/CloneFunction.cpp 340 if (!isa<PHINode>(NewInst)) {
492 SmallVector<const PHINode*, 16> PHIToResolve;
503 for (const PHINode &PN : BI.phis()) {
506 if (isa<PHINode>(VMap[&PN]))
522 const PHINode *OPN = PHIToResolve[phino];
532 PHINode *PN = cast<PHINode>(VMap[OPN]);
532 PHINode *PN = cast<PHINode>(VMap[OPN]);
555 PHINode *PN = cast<PHINode>(NewBB->begin());
555 PHINode *PN = cast<PHINode>(NewBB->begin());
573 for (; (PN = dyn_cast<PHINode>(I)); ++I) {
585 PN = cast<PHINode>(NewBB->begin());
589 while ((PN = dyn_cast<PHINode>(I++))) {
610 if (isa<PHINode>(VMap[PHIToResolve[Idx]]))
845 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
845 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
lib/Transforms/Utils/CodeExtractor.cpp 406 PHINode *FirstPhi = nullptr;
408 PHINode *Phi = dyn_cast<PHINode>(I);
408 PHINode *Phi = dyn_cast<PHINode>(I);
627 PHINode *PN = dyn_cast<PHINode>(Header->begin());
627 PHINode *PN = dyn_cast<PHINode>(Header->begin());
660 PHINode *PN = cast<PHINode>(OldPred->begin());
660 PHINode *PN = cast<PHINode>(OldPred->begin());
672 for (AfterPHIs = OldPred->begin(); isa<PHINode>(AfterPHIs); ++AfterPHIs) {
673 PHINode *PN = cast<PHINode>(AfterPHIs);
673 PHINode *PN = cast<PHINode>(AfterPHIs);
676 PHINode *NewPN = PHINode::Create(PN->getType(), 1 + NumPredsFromRegion,
676 PHINode *NewPN = PHINode::Create(PN->getType(), 1 + NumPredsFromRegion,
703 for (PHINode &PN : ExitBB->phis()) {
732 PHINode *NewPN =
733 PHINode::Create(PN.getType(), IncomingVals.size(),
1246 else if (auto *Phi = dyn_cast<PHINode>(OutI))
1246 else if (auto *Phi = dyn_cast<PHINode>(OutI))
1545 for (BasicBlock::iterator I = header->begin(); isa<PHINode>(I); ++I) {
1546 PHINode *PN = cast<PHINode>(I);
1546 PHINode *PN = cast<PHINode>(I);
1553 for (PHINode &PN : ExitBB->phis()) {
lib/Transforms/Utils/DemoteRegToStack.cpp 59 if (PHINode *PN = dyn_cast<PHINode>(U)) {
59 if (PHINode *PN = dyn_cast<PHINode>(U)) {
96 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
110 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) {
143 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
lib/Transforms/Utils/Evaluator.cpp 723 PHINode *PN = nullptr;
725 (PN = dyn_cast<PHINode>(CurInst)); ++CurInst)
lib/Transforms/Utils/FlattenCFG.cpp 137 PHINode *PHI = dyn_cast<PHINode>(BB->begin());
137 PHINode *PHI = dyn_cast<PHINode>(BB->begin());
193 if (isa<PHINode>(CI) || !isSafeToSpeculativelyExecute(CI))
275 PHI = dyn_cast<PHINode>(PS2->begin());
438 if (isa<PHINode>(CI) || CI->mayHaveSideEffects() ||
458 for (PHINode &Phi : Succ->phis()) {
lib/Transforms/Utils/FunctionComparator.cpp 646 if (const PHINode *PNL = dyn_cast<PHINode>(L)) {
646 if (const PHINode *PNL = dyn_cast<PHINode>(L)) {
647 const PHINode *PNR = cast<PHINode>(R);
647 const PHINode *PNR = cast<PHINode>(R);
lib/Transforms/Utils/GlobalStatus.cpp 145 } else if (isa<SelectInst>(I) || isa<PHINode>(I)) {
lib/Transforms/Utils/InlineFunction.cpp 107 PHINode *InnerEHValuesPHI = nullptr;
119 for (; isa<PHINode>(I); ++I) {
121 PHINode *PHI = cast<PHINode>(I);
121 PHINode *PHI = cast<PHINode>(I);
155 PHINode *phi = cast<PHINode>(I);
155 PHINode *phi = cast<PHINode>(I);
180 PHINode *OuterPHI = cast<PHINode>(I);
180 PHINode *OuterPHI = cast<PHINode>(I);
181 PHINode *InnerPHI = PHINode::Create(OuterPHI->getType(), PHICapacity,
181 PHINode *InnerPHI = PHINode::Create(OuterPHI->getType(), PHICapacity,
189 InnerEHValuesPHI = PHINode::Create(CallerLPad->getType(), PHICapacity,
655 PHINode *PHI = dyn_cast<PHINode>(&I);
655 PHINode *PHI = dyn_cast<PHINode>(&I);
666 PHINode *PHI = cast<PHINode>(I);
666 PHINode *PHI = cast<PHINode>(I);
2311 PHINode *PHI = nullptr;
2316 PHI = PHINode::Create(RTy, Returns.size(), TheCall->getName(),
lib/Transforms/Utils/IntegerDivision.cpp 305 PHINode *Carry_1 = Builder.CreatePHI(DivTy, 2);
306 PHINode *SR_3 = Builder.CreatePHI(DivTy, 2);
307 PHINode *R_1 = Builder.CreatePHI(DivTy, 2);
308 PHINode *Q_2 = Builder.CreatePHI(DivTy, 2);
330 PHINode *Carry_2 = Builder.CreatePHI(DivTy, 2);
331 PHINode *Q_3 = Builder.CreatePHI(DivTy, 2);
340 PHINode *Q_5 = Builder.CreatePHI(DivTy, 2);
lib/Transforms/Utils/LCSSA.cpp 79 SmallSetVector<PHINode *, 16> PHIsToRemove;
107 if (auto *PN = dyn_cast<PHINode>(User))
107 if (auto *PN = dyn_cast<PHINode>(User))
130 SmallVector<PHINode *, 16> AddedPHIs;
131 SmallVector<PHINode *, 8> PostProcessPHIs;
133 SmallVector<PHINode *, 4> InsertedPHIs;
147 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB),
147 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB),
191 if (auto *PN = dyn_cast<PHINode>(User))
191 if (auto *PN = dyn_cast<PHINode>(User))
194 if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) {
237 for (PHINode *InsertedPN : InsertedPHIs) {
245 for (auto *PostProcessPN : PostProcessPHIs)
252 SmallVector<PHINode *, 2> NeedDbgValues;
253 for (PHINode *PN : AddedPHIs)
268 for (PHINode *PN : PHIsToRemove)
358 !isa<PHINode>(I.user_back())))
lib/Transforms/Utils/Local.cpp 523 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN,
645 if (!isa<PHINode>(BB->begin()))
654 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) {
654 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) {
674 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
674 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
773 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
774 PHINode *PN = cast<PHINode>(I);
774 PHINode *PN = cast<PHINode>(I);
779 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB));
779 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB));
856 static void gatherIncomingValuesToPhi(PHINode *PN,
872 static void replaceUndefValuesInPhi(PHINode *PN,
915 if (isa<PHINode>(OldVal) && cast<PHINode>(OldVal)->getParent() == BB) {
915 if (isa<PHINode>(OldVal) && cast<PHINode>(OldVal)->getParent() == BB) {
916 PHINode *OldValPN = cast<PHINode>(OldVal);
916 PHINode *OldValPN = cast<PHINode>(OldVal);
976 while (isa<PHINode>(*BBI)) {
978 if (PHINode* PN = dyn_cast<PHINode>(U.getUser())) {
978 if (PHINode* PN = dyn_cast<PHINode>(U.getUser())) {
1015 if (isa<PHINode>(Succ->begin())) {
1022 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
1023 PHINode *PN = cast<PHINode>(I);
1023 PHINode *PN = cast<PHINode>(I);
1038 while (PHINode *PN = dyn_cast<PHINode>(&BB->front())) {
1038 while (PHINode *PN = dyn_cast<PHINode>(&BB->front())) {
1082 static PHINode *getEmptyKey() {
1083 return DenseMapInfo<PHINode *>::getEmptyKey();
1086 static PHINode *getTombstoneKey() {
1087 return DenseMapInfo<PHINode *>::getTombstoneKey();
1090 static unsigned getHashValue(PHINode *PN) {
1099 static bool isEqual(PHINode *LHS, PHINode *RHS) {
1099 static bool isEqual(PHINode *LHS, PHINode *RHS) {
1108 DenseSet<PHINode *, PHIDenseMapInfo> PHISet;
1112 for (auto I = BB->begin(); PHINode *PN = dyn_cast<PHINode>(I++);) {
1112 for (auto I = BB->begin(); PHINode *PN = dyn_cast<PHINode>(I++);) {
1233 PHINode *APN) {
1349 PHINode *APN, DIBuilder &Builder) {
1449 SmallVectorImpl<PHINode *> &InsertedPHIs) {
1458 if (auto *Loc = dyn_cast_or_null<PHINode>(DbgII->getVariableLocation()))
1458 if (auto *Loc = dyn_cast_or_null<PHINode>(DbgII->getVariableLocation()))
2971 else if (PHINode *PN = dyn_cast<PHINode>(V)) {
2971 else if (PHINode *PN = dyn_cast<PHINode>(V)) {
lib/Transforms/Utils/LoopRotationUtils.cpp 86 SmallVectorImpl<PHINode*> *InsertedPHIs) {
89 for (I = OrigHeader->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I)
89 for (I = OrigHeader->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I)
124 if (!isa<PHINode>(UserInst)) {
182 for (auto &Phi : Header->phis()) {
302 for (; PHINode *PN = dyn_cast<PHINode>(I); ++I)
302 for (; PHINode *PN = dyn_cast<PHINode>(I); ++I)
388 PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
388 PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
404 SmallVector<PHINode*, 2> InsertedPHIs;
lib/Transforms/Utils/LoopSimplify.cpp 182 static PHINode *findPHIToPartitionLoops(Loop *L, DominatorTree *DT,
185 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ) {
186 PHINode *PN = cast<PHINode>(I);
186 PHINode *PN = cast<PHINode>(I);
236 PHINode *PN = findPHIToPartitionLoops(L, DT, AC);
391 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
392 PHINode *PN = cast<PHINode>(I);
392 PHINode *PN = cast<PHINode>(I);
393 PHINode *NewPN = PHINode::Create(PN->getType(), BackedgeBlocks.size(),
393 PHINode *NewPN = PHINode::Create(PN->getType(), BackedgeBlocks.size(),
592 PHINode *PN;
594 (PN = dyn_cast<PHINode>(I++)); )
lib/Transforms/Utils/LoopUnroll.cpp 89 if (PHINode *PN = dyn_cast<PHINode>(I)) {
89 if (PHINode *PN = dyn_cast<PHINode>(I)) {
189 for (const PHINode &PN : Header->phis()) {
384 return isa<PHINode>(BB->begin());
545 std::vector<PHINode*> OrigPHINode;
546 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
547 OrigPHINode.push_back(cast<PHINode>(I));
621 for (PHINode *OrigPHI : OrigPHINode) {
622 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHI]);
622 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHI]);
641 for (PHINode &PHI : Succ->phis()) {
695 for (PHINode *PN : OrigPHINode) {
730 for (PHINode &Phi : Succ->phis())
lib/Transforms/Utils/LoopUnrollAndJam.cpp 95 for (auto &Phi : Header->phis()) {
392 for (PHINode &Phi : ForeBlocksFirst[It]->phis()) {
413 for (PHINode &Phi : BB->phis()) {
423 for (PHINode &Phi : BB->phis()) {
438 while (PHINode *Phi = dyn_cast<PHINode>(Src->begin()))
438 while (PHINode *Phi = dyn_cast<PHINode>(Src->begin()))
453 while (PHINode *Phi = dyn_cast<PHINode>(ForeBlocksFirst[0]->begin())) {
453 while (PHINode *Phi = dyn_cast<PHINode>(ForeBlocksFirst[0]->begin())) {
798 if (isa<PHINode>(I))
lib/Transforms/Utils/LoopUnrollPeel.cpp 126 PHINode *Phi, Loop *L, BasicBlock *BackEdge,
127 SmallDenseMap<PHINode *, unsigned> &IterationsToInvariance) {
145 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) {
145 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) {
303 SmallDenseMap<PHINode *, unsigned> IterationsToInvariance;
311 for (auto BI = L->getHeader()->begin(); isa<PHINode>(&*BI); ++BI) {
312 PHINode *Phi = cast<PHINode>(&*BI);
312 PHINode *Phi = cast<PHINode>(&*BI);
535 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
536 PHINode *NewPHI = cast<PHINode>(VMap[&*I]);
536 PHINode *NewPHI = cast<PHINode>(VMap[&*I]);
555 for (PHINode &PHI : Edge.second->phis()) {
732 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
733 PHINode *PHI = cast<PHINode>(I);
733 PHINode *PHI = cast<PHINode>(I);
lib/Transforms/Utils/LoopUnrollRuntime.cpp 93 for (PHINode &PN : Succ->phis()) {
101 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr",
101 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr",
206 for (PHINode &PN : NewExit->phis()) {
219 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser());
219 PHINode *EpilogPN = cast<PHINode>(PN.use_begin()->getUser());
253 for (PHINode &PN : Succ->phis()) {
256 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr",
256 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr",
265 PHINode *VPN = cast<PHINode>(VMap[&PN]);
265 PHINode *VPN = cast<PHINode>(VMap[&PN]);
357 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2,
357 PHINode *NewIdx = PHINode::Create(NewIter->getType(), 2,
375 for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
376 PHINode *NewPHI = cast<PHINode>(VMap[&*I]);
376 PHINode *NewPHI = cast<PHINode>(VMap[&*I]);
807 if (!isa<PHINode>(II))
809 PHINode *Phi = cast<PHINode>(&II);
809 PHINode *Phi = cast<PHINode>(&II);
898 PHINode *NewIdx = PHINode::Create(TestVal->getType(), 2, "niter",
898 PHINode *NewIdx = PHINode::Create(TestVal->getType(), 2, "niter",
lib/Transforms/Utils/LoopUtils.cpp 564 for (PHINode &P : ExitBlock->phis()) {
lib/Transforms/Utils/LoopVersioning.cpp 127 PHINode *PN;
134 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) {
140 PN = PHINode::Create(Inst->getType(), 2, Inst->getName() + ".lver",
153 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) {
lib/Transforms/Utils/LowerMemIntrinsics.cpp 70 PHINode *LoopIndex = LoopBuilder.CreatePHI(TypeOfCopyLen, 2, "loop-index");
180 PHINode *LoopIndex = LoopBuilder.CreatePHI(CopyLenType, 2, "loop-index");
226 PHINode *ResidualIndex =
331 PHINode *LoopPhi = LoopBuilder.CreatePHI(TypeOfCopyLen, 0);
351 PHINode *FwdCopyPhi = FwdLoopBuilder.CreatePHI(TypeOfCopyLen, 0, "index_ptr");
392 PHINode *LoopIndex = LoopBuilder.CreatePHI(TypeOfCopyLen, 0);
lib/Transforms/Utils/LowerSwitch.cpp 215 PHINode *PN = cast<PHINode>(I);
215 PHINode *PN = cast<PHINode>(I);
379 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
380 PHINode* PN = cast<PHINode>(I);
380 PHINode* PN = cast<PHINode>(I);
lib/Transforms/Utils/PredicateInfo.cpp 164 auto *PHI = cast<PHINode>(VD.U->getUser());
164 auto *PHI = cast<PHINode>(VD.U->getUser());
267 auto *PHI = dyn_cast<PHINode>(VDUse.U->getUser());
267 auto *PHI = dyn_cast<PHINode>(VDUse.U->getUser());
298 if (auto *PN = dyn_cast<PHINode>(I)) {
298 if (auto *PN = dyn_cast<PHINode>(I)) {
lib/Transforms/Utils/PromoteMemoryToRegister.cpp 246 DenseMap<std::pair<unsigned, unsigned>, PHINode *> NewPhiNodes;
250 DenseMap<PHINode *, unsigned> PhiToAllocaMap;
687 for (DenseMap<std::pair<unsigned, unsigned>, PHINode *>::iterator
691 PHINode *PN = I->second;
710 for (DenseMap<std::pair<unsigned, unsigned>, PHINode *>::iterator
716 PHINode *SomePHI = I->second;
757 while ((SomePHI = dyn_cast<PHINode>(BBI++)) &&
845 PHINode *&PN = NewPhiNodes[std::make_pair(BBNumbers[BB], AllocaNo)];
853 PN = PHINode::Create(Allocas[AllocaNo]->getAllocatedType(), getNumPreds(BB),
863 static void updateForIncomingValueLocation(PHINode *PN, DebugLoc DL,
883 if (PHINode *APN = dyn_cast<PHINode>(BB->begin())) {
883 if (PHINode *APN = dyn_cast<PHINode>(BB->begin())) {
918 APN = dyn_cast<PHINode>(PNI);
lib/Transforms/Utils/SSAUpdater.cpp 46 SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode *> *NewPHI)
78 static bool IsEquivalentPHI(PHINode *PHI,
113 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) {
113 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) {
151 if (isa<PHINode>(BB->begin())) {
154 for (PHINode &SomePHI : BB->phis()) {
161 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(),
161 PHINode *InsertedPHI = PHINode::Create(ProtoType, PredValues.size(),
193 if (PHINode *UserPN = dyn_cast<PHINode>(User))
193 if (PHINode *UserPN = dyn_cast<PHINode>(User))
210 if (PHINode *UserPN = dyn_cast<PHINode>(User))
210 if (PHINode *UserPN = dyn_cast<PHINode>(User))
225 using PhiT = PHINode;
233 PHINode *PHI;
237 explicit PHI_iterator(PHINode *P) // begin iterator
239 PHI_iterator(PHINode *P, bool) // end iterator
262 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) {
262 if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) {
280 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds,
280 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds,
287 static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
293 static PHINode *InstrIsPHI(Instruction *I) {
294 return dyn_cast<PHINode>(I);
298 static PHINode *ValueIsPHI(Value *Val, SSAUpdater *Updater) {
299 return dyn_cast<PHINode>(Val);
304 static PHINode *ValueIsNewPHI(Value *Val, SSAUpdater *Updater) {
305 PHINode *PHI = ValueIsPHI(Val, Updater);
313 static Value *GetPHIValue(PHINode *PHI) {
lib/Transforms/Utils/SSAUpdaterBulk.cpp 32 if (auto *UserPN = dyn_cast<PHINode>(User))
32 if (auto *UserPN = dyn_cast<PHINode>(User))
129 SmallVectorImpl<PHINode *> *InsertedPHIs) {
157 SmallVector<PHINode *, 4> InsertedPHIsForVar;
160 PHINode *PN = B.CreatePHI(R.Ty, 0, R.Name);
168 for (auto *PN : InsertedPHIsForVar) {
lib/Transforms/Utils/SimplifyCFG.cpp 160 using SwitchCaseResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
244 for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) {
245 PHINode *PN = cast<PHINode>(BBI);
245 PHINode *PN = cast<PHINode>(BBI);
263 SmallVectorImpl<PHINode *> &PhiNodes) {
287 for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) {
288 PHINode *PN = cast<PHINode>(BBI);
288 PHINode *PN = cast<PHINode>(BBI);
304 for (PHINode &PN : Succ->phis())
1221 for (const PHINode &PN : Succ->phis()) {
1261 if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) ||
1356 for (PHINode &PN : Succ->phis()) {
1397 for (PHINode &PN : Succ->phis()) {
1454 if (isa<PHINode>(I) || I->isEHPad() || isa<AllocaInst>(I) ||
1482 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1565 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1565 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1594 auto *PN = PHINode::Create(Op->getType(), Insts.size(),
1594 auto *PN = PHINode::Create(Op->getType(), Insts.size(),
1626 auto *PN = cast<PHINode>(*I0->user_begin());
1626 auto *PN = cast<PHINode>(*I0->user_begin());
2044 for (PHINode &PN : EndBB->phis()) {
2116 for (PHINode &PN : EndBB->phis()) {
2161 if (UI->getParent() != BB || isa<PHINode>(UI))
2177 PHINode *PN = dyn_cast<PHINode>(BI->getCondition());
2177 PHINode *PN = dyn_cast<PHINode>(BI->getCondition());
2237 if (PHINode *PN = dyn_cast<PHINode>(BBI)) {
2237 if (PHINode *PN = dyn_cast<PHINode>(BBI)) {
2293 static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI,
2319 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++NumPhis, ++I)
2330 for (BasicBlock::iterator II = BB->begin(); isa<PHINode>(II);) {
2331 PHINode *PN = cast<PHINode>(II++);
2331 PHINode *PN = cast<PHINode>(II++);
2347 PN = dyn_cast<PHINode>(BB->begin());
2421 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
2421 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
2479 if (PHINode *TVPN = dyn_cast_or_null<PHINode>(TrueValue))
2479 if (PHINode *TVPN = dyn_cast_or_null<PHINode>(TrueValue))
2482 if (PHINode *FVPN = dyn_cast_or_null<PHINode>(FalseValue))
2482 if (PHINode *FVPN = dyn_cast_or_null<PHINode>(FalseValue))
2675 SmallVector<PHINode *, 4> PHIs;
2912 PHINode *PHI = nullptr;
2915 for (auto I = Succ->begin(); isa<PHINode>(I); ++I)
2916 if (cast<PHINode>(I)->getIncomingValueForBlock(BB) == V) {
2917 PHI = cast<PHINode>(I);
2936 PHI = PHINode::Create(V->getType(), 2, "simplifycfg.merge", &Succ->front());
3245 PHINode *NewPN = PHINode::Create(
3245 PHINode *NewPN = PHINode::Create(
3321 for (BasicBlock::iterator II = CommonDest->begin(); isa<PHINode>(II);
3326 PHINode *PN = cast<PHINode>(II);
3326 PHINode *PN = cast<PHINode>(II);
3415 for (PHINode &PN : CommonDest->phis()) {
3596 if (isa<PHINode>(BB->begin()) || !ICI->hasOneUse())
3648 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back());
3648 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back());
3650 isa<PHINode>(++BasicBlock::iterator(PHIUse)))
3793 for (BasicBlock::iterator BBI = EdgeBB->begin(); isa<PHINode>(BBI); ++BBI) {
3794 PHINode *PN = cast<PHINode>(BBI);
3794 PHINode *PN = cast<PHINode>(BBI);
3808 if (isa<PHINode>(RI->getValue()))
3831 auto *PhiLPInst = cast<PHINode>(RI->getValue());
3831 auto *PhiLPInst = cast<PHINode>(RI->getValue());
3978 PHINode *DestPN = cast<PHINode>(I);
3978 PHINode *DestPN = cast<PHINode>(I);
3995 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal);
3995 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal);
4026 PHINode *PN = cast<PHINode>(I++);
4026 PHINode *PN = cast<PHINode>(I++);
4428 for (auto BBI = ContiguousDest->begin(); isa<PHINode>(BBI); ++BBI) {
4433 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
4435 for (auto BBI = OtherDest->begin(); isa<PHINode>(BBI); ++BBI) {
4440 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
4517 static PHINode *FindPHIForConditionForwarding(ConstantInt *CaseValue,
4530 for (PHINode &PHI : Succ->phis()) {
4549 using ForwardingNodesMap = DenseMap<PHINode *, SmallVector<int, 4>>;
4569 for (PHINode &Phi : CaseDest->phis()) {
4585 if (auto *Phi = FindPHIForConditionForwarding(CaseValue, CaseDest, &PhiIdx))
4590 PHINode *Phi = ForwardingNode.first;
4680 SmallVectorImpl<std::pair<PHINode *, Constant *>> &Res,
4707 if (PHINode *Phi = dyn_cast<PHINode>(User))
4707 if (PHINode *Phi = dyn_cast<PHINode>(User))
4727 for (PHINode &PHI : (*CommonDest)->phis()) {
4768 InitializeUniqueCases(SwitchInst *SI, PHINode *&PHI, BasicBlock *&CommonDest,
4805 SmallVector<std::pair<PHINode *, Constant *>, 1> DefaultResults;
4862 static void RemoveSwitchAfterSelectConversion(SwitchInst *SI, PHINode *PHI,
4890 PHINode *PHI = nullptr;
5167 const SmallDenseMap<PHINode *, Type *> &ResultTypes) {
5325 SmallDenseMap<PHINode *, ResultListTy> ResultLists;
5327 SmallDenseMap<PHINode *, Constant *> DefaultResults;
5328 SmallDenseMap<PHINode *, Type *> ResultTypes;
5329 SmallVector<PHINode *, 4> PHIs;
5339 using ResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
5347 PHINode *PHI = I.first;
5356 for (PHINode *PHI : PHIs) {
5367 SmallVector<std::pair<PHINode *, Constant *>, 4> DefaultResultsList;
5382 PHINode *PHI = I.first;
5479 for (PHINode *PHI : PHIs) {
5749 if (isa<PHINode>(*Succ->begin()))
5940 if (PHINode *PN = dyn_cast<PHINode>(BI->getCondition()))
5940 if (PHINode *PN = dyn_cast<PHINode>(BI->getCondition()))
6018 for (PHINode &PHI : BB->phis())
6079 if (auto *PN = dyn_cast<PHINode>(BB->begin()))
6079 if (auto *PN = dyn_cast<PHINode>(BB->begin()))
lib/Transforms/Utils/SimplifyIndVar.cpp 76 void simplifyUsers(PHINode *CurrIV, IVVisitor *V = nullptr);
195 auto *PN = dyn_cast<PHINode>(IVOperand);
195 auto *PN = dyn_cast<PHINode>(IVOperand);
709 if (isa<PHINode>(UseInst))
852 void SimplifyIndvar::simplifyUsers(PHINode *CurrIV, IVVisitor *V) {
933 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT,
951 for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
952 Changed |= simplifyUsersOfIV(cast<PHINode>(I), SE, DT, LI, Dead, Rewriter);
lib/Transforms/Utils/UnifyFunctionExitNodes.cpp 89 PHINode *PN = nullptr;
94 PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(),
lib/Transforms/Utils/ValueMapper.cpp 865 if (PHINode *PN = dyn_cast<PHINode>(I)) {
865 if (PHINode *PN = dyn_cast<PHINode>(I)) {
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp 307 PHINode *IV = Lp->getCanonicalInductionVariable();
360 for (PHINode &Phi : BB->phis()) {
492 PHINode *Phi, const InductionDescriptor &ID,
581 if (auto *Phi = dyn_cast<PHINode>(&I)) {
581 if (auto *Phi = dyn_cast<PHINode>(&I)) {
853 PHINode *PN = dyn_cast_or_null<PHINode>(In0);
853 PHINode *PN = dyn_cast_or_null<PHINode>(In0);
869 bool LoopVectorizationLegality::isFirstOrderRecurrence(const PHINode *Phi) {
lib/Transforms/Vectorize/LoopVectorize.cpp 446 void widenIntOrFpInduction(PHINode *IV, TruncInst *Trunc = nullptr);
501 using PhiVector = SmallVector<PHINode *, 4>;
510 void fixupIVUsers(PHINode *OrigPhi, const InductionDescriptor &II,
515 PHINode *createInductionVariable(Loop *L, Value *Start, Value *End,
523 void fixFirstOrderRecurrence(PHINode *Phi);
527 void fixReduction(PHINode *Phi);
732 PHINode *Induction = nullptr;
735 PHINode *OldInduction = nullptr;
763 DenseMap<PHINode *, Value *> IVEndValues;
767 SmallVector<PHINode *, 8> OrigPHIsToFix;
1723 PHINode *VecInd = PHINode::Create(SteppedStart->getType(), 2, "vec.ind",
1723 PHINode *VecInd = PHINode::Create(SteppedStart->getType(), 2, "vec.ind",
1794 void InnerLoopVectorizer::widenIntOrFpInduction(PHINode *IV, TruncInst *Trunc) {
2522 PHINode *InnerLoopVectorizer::createInductionVariable(Loop *L, Value *Start,
2535 auto *Induction = Builder.CreatePHI(Start->getType(), 2, "index");
3003 PHINode *OrigPhi = InductionEntry.first;
3007 PHINode *BCResumeVal = PHINode::Create(
3007 PHINode *BCResumeVal = PHINode::Create(
3105 void InnerLoopVectorizer::fixupIVUsers(PHINode *OrigPhi,
3155 PHINode *PHI = cast<PHINode>(I.first);
3155 PHINode *PHI = cast<PHINode>(I.first);
3366 } else if (isa<LoadInst>(I) || isa<PHINode>(I)) {
3464 for (PHINode &Phi : OrigLoop->getHeader()->phis()) {
3473 void InnerLoopVectorizer::fixFirstOrderRecurrence(PHINode *Phi) {
3547 auto *VecPhi = Builder.CreatePHI(VectorInit->getType(), 2, "vector.recur");
3560 isa<PHINode>(PreviousLastPart))
3620 auto *Start = Builder.CreatePHI(Phi->getType(), 2, "scalar.recur.init");
3634 for (PHINode &LCSSAPhi : LoopExitBlock->phis()) {
3641 void InnerLoopVectorizer::fixReduction(PHINode *Phi) {
3709 cast<PHINode>(VecRdxPhi)->addIncoming(StartVal, LoopVectorPreHeader);
3710 cast<PHINode>(VecRdxPhi)
3811 PHINode *BCBlockPhi = PHINode::Create(Phi->getType(), 2, "bc.merge.rdx",
3811 PHINode *BCBlockPhi = PHINode::Create(Phi->getType(), 2, "bc.merge.rdx",
3821 for (PHINode &LCSSAPhi : LoopExitBlock->phis()) {
3844 for (PHINode &LCSSAPhi : LoopExitBlock->phis()) {
3881 if (auto *Phi = dyn_cast<PHINode>(I))
3881 if (auto *Phi = dyn_cast<PHINode>(I))
3883 PHINode::getIncomingValueNumForOperand(U.getOperandNo()));
3904 if (!I || isa<PHINode>(I) || I->getParent() == PredBB ||
3929 for (PHINode *OrigPhi : OrigPHIsToFix) {
3930 PHINode *NewPhi =
3931 cast<PHINode>(VectorLoopValueMap.getVectorValue(OrigPhi, 0));
3966 PHINode *P = cast<PHINode>(PN);
3966 PHINode *P = cast<PHINode>(PN);
3993 Value *EntryPart = PHINode::Create(
4461 auto *Ind = Induction.first;
4504 auto *Ind = Induction.first;
4755 auto *OP = dyn_cast<PHINode>(OV);
4755 auto *OP = dyn_cast<PHINode>(OV);
4786 auto *Ind = Induction.first;
5085 if (!isa<LoadInst>(I) && !isa<StoreInst>(I) && !isa<PHINode>(I))
5090 if (auto *PN = dyn_cast<PHINode>(&I)) {
5090 if (auto *PN = dyn_cast<PHINode>(&I)) {
6059 if ((InstOp->getParent() == I->getParent()) && !isa<PHINode>(InstOp) &&
6137 auto *Phi = cast<PHINode>(I);
6137 auto *Phi = cast<PHINode>(I);
6537 PHINode *Ind = Induction.first;
6777 if (PHINode *Phi = dyn_cast<PHINode>(I)) {
6777 if (PHINode *Phi = dyn_cast<PHINode>(I)) {
6803 return new VPWidenIntOrFpInductionRecipe(cast<PHINode>(I->getOperand(0)),
6809 PHINode *Phi = dyn_cast<PHINode>(I);
6809 PHINode *Phi = dyn_cast<PHINode>(I);
6899 if (!isa<PHINode>(I) && (CM.isScalarAfterVectorization(I, VF) ||
7030 if (PHINode *Phi = dyn_cast<PHINode>(Instr)) {
7030 if (PHINode *Phi = dyn_cast<PHINode>(Instr)) {
7416 PHINode *VPhi = State.Builder.CreatePHI(IEI->getType(), 2);
7422 PHINode *Phi = State.Builder.CreatePHI(PredInstType, 2);
lib/Transforms/Vectorize/SLPVectorizer.cpp 2316 auto *PH = cast<PHINode>(VL0);
2316 auto *PH = cast<PHINode>(VL0);
2322 cast<PHINode>(VL[j])->getIncomingValueForBlock(
2344 Operands.push_back(cast<PHINode>(j)->getIncomingValueForBlock(
3757 auto *PH = cast<PHINode>(VL0);
3757 auto *PH = cast<PHINode>(VL0);
3760 PHINode *NewPhi = Builder.CreatePHI(VecTy, PH->getNumIncomingValues());
4320 if (PHINode *PH = dyn_cast<PHINode>(User)) {
4320 if (PHINode *PH = dyn_cast<PHINode>(User)) {
4481 if (isa<PHINode>(S.OpValue))
4570 if (isa<PHINode>(OpValue))
4960 else if (isa<PHINode>(I) || isa<CastInst>(I) || isa<GetElementPtrInst>(I) ||
5036 PHINode *PN = cast<PHINode>(I);
5036 PHINode *PN = cast<PHINode>(I);
6244 bool matchAssociativeReduction(PHINode *Phi, Instruction *B) {
6678 static Value *getReductionValue(const DominatorTree *DT, PHINode *P,
6734 PHINode *P, Instruction *Root, BasicBlock *BB, BoUpSLP &R,
6743 if (Root->getParent() != BB || isa<PHINode>(Root))
6801 if (!isa<PHINode>(I) && !R.isDeleted(I) && I->getParent() == BB)
6807 bool SLPVectorizerPass::vectorizeRootInstruction(PHINode *P, Value *V,
6899 PHINode *P = dyn_cast<PHINode>(&I);
6899 PHINode *P = dyn_cast<PHINode>(&I);
6970 if (PHINode *P = dyn_cast<PHINode>(it)) {
6970 if (PHINode *P = dyn_cast<PHINode>(it)) {
lib/Transforms/Vectorize/VPlan.h 747 PHINode *IV;
751 VPWidenIntOrFpInductionRecipe(PHINode *IV, TruncInst *Trunc = nullptr)
771 PHINode *Phi;
774 VPWidenPHIRecipe(PHINode *Phi) : VPRecipeBase(VPWidenPHISC), Phi(Phi) {}
793 PHINode *Phi;
799 VPBlendRecipe(PHINode *Phi, ArrayRef<VPValue *> Masks)
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp 60 SmallVector<PHINode *, 8> PhisToFix;
94 for (auto *Phi : PhisToFix) {
214 if (auto *Phi = dyn_cast<PHINode>(Inst)) {
214 if (auto *Phi = dyn_cast<PHINode>(Inst)) {
lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp 60 else if (PHINode *Phi = dyn_cast<PHINode>(Inst)) {
60 else if (PHINode *Phi = dyn_cast<PHINode>(Inst)) {
tools/bugpoint/Miscompilation.cpp 903 PHINode *FuncPtr =
904 PHINode::Create(NullPtr->getType(), 2, "fp", DoCallBB);
tools/clang/lib/CodeGen/Address.h 108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGAtomic.cpp 1777 llvm::PHINode *PHI = CGF.Builder.CreatePHI(OldVal->getType(),
1859 llvm::PHINode *PHI = CGF.Builder.CreatePHI(OldVal->getType(),
tools/clang/lib/CodeGen/CGBuiltin.cpp 930 PHINode *Result = Builder.CreatePHI(ResultType, 2, "bitscan_result");
2305 PHINode *Result =
2514 PHINode *DstPhi = Builder.CreatePHI(Dst->getType(), 2);
2516 PHINode *SrcPhi = Builder.CreatePHI(Src->getType(), 2);
2518 PHINode *SizePhi = Builder.CreatePHI(SizeTy, 2);
2543 PHINode *Ret = Builder.CreatePHI(IntTy, 4);
2955 PHINode *Result = Builder.CreatePHI(Int8Ty, 5, "was_set");
tools/clang/lib/CodeGen/CGCall.cpp 3319 llvm::PHINode *phiToUse = CGF.Builder.CreatePHI(valueToUse->getType(), 2,
tools/clang/lib/CodeGen/CGClass.cpp 366 llvm::PHINode *PHI = Builder.CreatePHI(BasePtrTy, 2, "cast.result");
426 llvm::PHINode *PHI = Builder.CreatePHI(Value->getType(), 2);
1949 llvm::PHINode *cur = Builder.CreatePHI(arrayBegin->getType(), 2,
tools/clang/lib/CodeGen/CGCoroutine.cpp 591 auto *Phi = Builder.CreatePHI(VoidPtrTy, 2);
tools/clang/lib/CodeGen/CGDecl.cpp 1725 llvm::PHINode *Cur = Builder.CreatePHI(Begin.getType(), 2, "vla.cur");
2163 llvm::PHINode *elementPast =
tools/clang/lib/CodeGen/CGExpr.cpp 4264 llvm::PHINode *phi = Builder.CreatePHI(lhs->getPointer()->getType(),
tools/clang/lib/CodeGen/CGExprAgg.cpp 594 llvm::PHINode *currentElement =
1671 llvm::PHINode *index =
tools/clang/lib/CodeGen/CGExprCXX.cpp 1227 llvm::PHINode *CurPtrPhi =
1740 llvm::PHINode *PHI = Builder.CreatePHI(resultPtr->getType(), 2);
2263 llvm::PHINode *PHI = Builder.CreatePHI(Value->getType(), 2);
tools/clang/lib/CodeGen/CGExprComplex.cpp 741 llvm::PHINode *RealPHI = Builder.CreatePHI(ResR->getType(), 3, "real_mul_phi");
745 llvm::PHINode *ImagPHI = Builder.CreatePHI(ResI->getType(), 3, "imag_mul_phi");
1044 llvm::PHINode *RealPN = Builder.CreatePHI(LHS.first->getType(), 2, "cond.r");
1049 llvm::PHINode *ImagPN = Builder.CreatePHI(LHS.first->getType(), 2, "cond.i");
tools/clang/lib/CodeGen/CGExprScalar.cpp 2354 llvm::PHINode *atomicPHI = nullptr;
2844 llvm::PHINode *atomicPHI = nullptr;
3149 llvm::PHINode *phi = Builder.CreatePHI(opTy, 2);
3645 llvm::PHINode *BaseCheck = Builder.CreatePHI(ValidBase->getType(), 2);
4012 llvm::PHINode *PN = llvm::PHINode::Create(llvm::Type::getInt1Ty(VMContext), 2,
4012 llvm::PHINode *PN = llvm::PHINode::Create(llvm::Type::getInt1Ty(VMContext), 2,
4097 llvm::PHINode *PN = llvm::PHINode::Create(llvm::Type::getInt1Ty(VMContext), 2,
4097 llvm::PHINode *PN = llvm::PHINode::Create(llvm::Type::getInt1Ty(VMContext), 2,
4282 llvm::PHINode *PN = Builder.CreatePHI(LHS->getType(), 2, "cond");
tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp 365 llvm::PHINode *PHIs[N];
tools/clang/lib/CodeGen/CGObjC.cpp 1747 llvm::PHINode *index = Builder.CreatePHI(NSUIntegerTy, 3, "forcoll.index");
1751 llvm::PHINode *count = Builder.CreatePHI(NSUIntegerTy, 3, "forcoll.count");
tools/clang/lib/CodeGen/CGObjCGNU.cpp 2734 llvm::PHINode *phi = Builder.CreatePHI(v->getType(), 2);
2740 llvm::PHINode *phi = Builder.CreatePHI(v.getType(), 2);
2749 llvm::PHINode *phi = Builder.CreatePHI(v.first->getType(), 2);
2753 llvm::PHINode *phi2 = Builder.CreatePHI(v.second->getType(), 2);
tools/clang/lib/CodeGen/CGObjCMac.cpp 1785 llvm::PHINode *phi = CGF.Builder.CreatePHI(null->getType(), 2);
1812 llvm::PHINode *real = CGF.Builder.CreatePHI(scalarTy, 2);
1815 llvm::PHINode *imag = CGF.Builder.CreatePHI(scalarTy, 2);
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp 895 llvm::PHINode *SrcElementPHI = nullptr;
905 llvm::PHINode *DestElementPHI = CGF.Builder.CreatePHI(
5499 llvm::PHINode *RHSElementPHI = CGF.Builder.CreatePHI(
5506 llvm::PHINode *LHSElementPHI = CGF.Builder.CreatePHI(
8917 llvm::PHINode *PtrPHI = MapperCGF.Builder.CreatePHI(
8977 llvm::PHINode *MemberMapType =
9037 llvm::PHINode *CurMapType =
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp 2193 auto *Phi = Bld.CreatePHI(GlobalRecPtrTy,
2902 llvm::PHINode *PhiSrc =
2905 llvm::PHINode *PhiDest =
tools/clang/lib/CodeGen/CGStmt.cpp 627 cast<llvm::PHINode>(IndGotoBB->begin())->addIncoming(V, CurBB);
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp 667 llvm::PHINode *SrcElementPHI =
674 llvm::PHINode *DestElementPHI =
tools/clang/lib/CodeGen/CGVTables.cpp 102 llvm::PHINode *PHI = CGF.Builder.CreatePHI(ReturnValue->getType(), 2);
tools/clang/lib/CodeGen/CodeGenFunction.cpp 392 llvm::PHINode *PN = cast<llvm::PHINode>(IndirectBranch->getAddress());
392 llvm::PHINode *PN = cast<llvm::PHINode>(IndirectBranch->getAddress());
1596 llvm::PHINode *cur = Builder.CreatePHI(begin.getType(), 2, "vla.cur");
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp 776 llvm::PHINode *CalleePtr = Builder.CreatePHI(FTy->getPointerTo(), 2);
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp 3025 llvm::PHINode *Phi = Builder.CreatePHI(CGM.Int8PtrTy, 2, "memptr.base");
3137 llvm::PHINode *Phi = Builder.CreatePHI(DstNull->getType(), 2, "memptr.converted");
tools/clang/lib/CodeGen/TargetInfo.cpp 378 llvm::PHINode *PHI = CGF.Builder.CreatePHI(Addr1.getType(), 2, Name);
tools/lldb/source/Expression/IRInterpreter.cpp 974 const PHINode *phi_inst = dyn_cast<PHINode>(inst);
974 const PHINode *phi_inst = dyn_cast<PHINode>(inst);
tools/llvm-diff/DifferenceEngine.cpp 262 } else if (isa<PHINode>(L)) {
tools/opt/Debugify.cpp 133 if (!isa<PHINode>(I) && !I->isEHPad())
tools/polly/include/polly/CodeGen/BlockGenerators.h 550 virtual void copyPHIInstruction(ScopStmt &, PHINode *, ValueMapT &,
818 using PHINodePairTy = std::pair<PHINode *, PHINode *>;
818 using PHINodePairTy = std::pair<PHINode *, PHINode *>;
905 void addOperandToPHI(ScopStmt &Stmt, PHINode *PHI, PHINode *PHICopy,
905 void addOperandToPHI(ScopStmt &Stmt, PHINode *PHI, PHINode *PHICopy,
926 PHINode *buildExitPHI(MemoryAccess *MA, LoopToScevMapT <S, ValueMapT &BBMap,
968 virtual void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst,
tools/polly/include/polly/ScopBuilder.h 484 void buildPHIAccesses(ScopStmt *PHIStmt, PHINode *PHI,
604 void ensurePHIWrite(PHINode *PHI, ScopStmt *IncomintStmt,
630 void addPHIReadAccess(ScopStmt *PHIStmt, PHINode *PHI);
tools/polly/include/polly/ScopInfo.h 1245 DenseMap<PHINode *, MemoryAccess *> PHIWrites;
1248 DenseMap<PHINode *, MemoryAccess *> PHIReads;
1472 MemoryAccess *lookupPHIReadOf(PHINode *PHI) const {
1479 MemoryAccess *lookupPHIWriteOf(PHINode *PHI) const {
1492 if (isa<PHINode>(Val))
1493 if (auto InputMA = lookupPHIReadOf(cast<PHINode>(Val))) {
1931 DenseMap<PHINode *, MemoryAccess *> PHIReadAccs;
2076 PHINode *PHI = cast<PHINode>(Access->getAccessInstruction());
2076 PHINode *PHI = cast<PHINode>(Access->getAccessInstruction());
tools/polly/include/polly/Support/SCEVValidator.h 105 llvm::Value *getUniqueNonErrorValue(llvm::PHINode *PHI, llvm::Region *R,
tools/polly/include/polly/ZoneAlgo.h 120 llvm::SmallPtrSet<llvm::PHINode *, 4> RecursivePHIs;
125 llvm::DenseSet<llvm::PHINode *> ComputedPHIs;
154 llvm::SmallDenseMap<llvm::PHINode *, isl::union_map> PerPHIMaps;
tools/polly/lib/Analysis/ScopBuilder.cpp 443 } else if (auto *PHI = dyn_cast<PHINode>(Condition)) {
443 } else if (auto *PHI = dyn_cast<PHINode>(Condition)) {
1075 void ScopBuilder::buildPHIAccesses(ScopStmt *PHIStmt, PHINode *PHI,
1998 if (isa<PHINode>(Inst))
2076 PHINode *PHI = dyn_cast<PHINode>(Inst);
2076 PHINode *PHI = dyn_cast<PHINode>(Inst);
2224 PHINode *PHI = dyn_cast<PHINode>(Inst);
2224 PHINode *PHI = dyn_cast<PHINode>(Inst);
2581 void ScopBuilder::ensurePHIWrite(PHINode *PHI, ScopStmt *IncomingStmt,
2618 void ScopBuilder::addPHIReadAccess(ScopStmt *PHIStmt, PHINode *PHI) {
3589 if (!isa<PHINode>(Inst))
3641 PHINode *PHI = dyn_cast<PHINode>(&Inst);
3641 PHINode *PHI = dyn_cast<PHINode>(&Inst);
tools/polly/lib/Analysis/ScopDetection.cpp 573 if (auto PHI = dyn_cast<PHINode>(Condition)) {
1201 auto *PHI = dyn_cast<PHINode>(OpInst);
1201 auto *PHI = dyn_cast<PHINode>(OpInst);
tools/polly/lib/Analysis/ScopInfo.cpp 1161 PHINode *PHI = cast<PHINode>(Access->getAccessValue());
1161 PHINode *PHI = cast<PHINode>(Access->getAccessValue());
1166 PHINode *PHI = cast<PHINode>(Access->getAccessValue());
1166 PHINode *PHI = cast<PHINode>(Access->getAccessValue());
1306 bool Found = PHIWrites.erase(cast<PHINode>(MA->getAccessInstruction()));
1311 bool Found = PHIReads.erase(cast<PHINode>(MA->getAccessInstruction()));
2429 auto *PHI = cast<PHINode>(U.getUser());
2429 auto *PHI = cast<PHINode>(U.getUser());
2502 PHINode *PHI = cast<PHINode>(Access->getAccessInstruction());
2502 PHINode *PHI = cast<PHINode>(Access->getAccessInstruction());
2535 PHINode *PHI = cast<PHINode>(SAI->getBasePtr());
2535 PHINode *PHI = cast<PHINode>(SAI->getBasePtr());
2559 if (hasSingleExitEdge() && isa<PHINode>(Use.getUser()) &&
2560 isExit(cast<PHINode>(Use.getUser())->getParent()))
tools/polly/lib/CodeGen/BlockGenerators.cpp 385 if (auto *PHI = dyn_cast<PHINode>(Inst)) {
385 if (auto *PHI = dyn_cast<PHINode>(Inst)) {
710 if (isa<PHINode>(Inst)) {
825 auto PHI = cast<PHINode>(Array->getBasePtr());
851 if (auto *PHI = dyn_cast_or_null<PHINode>(Inst))
851 if (auto *PHI = dyn_cast_or_null<PHINode>(Inst))
886 PHINode *MergePHI = PHINode::Create(EscapeInst->getType(), 2,
886 PHINode *MergePHI = PHINode::Create(EscapeInst->getType(), 2,
952 PHINode *PHI = dyn_cast<PHINode>(Val);
952 PHINode *PHI = dyn_cast<PHINode>(Val);
967 auto *MergePHI = PHINode::Create(PHI->getType(), 2, Name + ".ph.merge");
967 auto *MergePHI = PHINode::Create(PHI->getType(), 2, Name + ".ph.merge");
1587 PHINode *LoopPHI =
1588 PHINode::Create(Builder.getInt32Ty(), 2, "polly.subregion.iv");
1621 PHINode *RegionGenerator::buildExitPHI(MemoryAccess *MA, LoopToScevMapT <S,
1628 PHINode *OrigPHI = cast<PHINode>(MA->getAccessInstruction());
1628 PHINode *OrigPHI = cast<PHINode>(MA->getAccessInstruction());
1639 PHINode *NewPHI = PHINode::Create(OrigPHI->getType(), Incoming.size(),
1639 PHINode *NewPHI = PHINode::Create(OrigPHI->getType(), Incoming.size(),
1737 void RegionGenerator::addOperandToPHI(ScopStmt &Stmt, PHINode *PHI,
1738 PHINode *PHICopy, BasicBlock *IncomingBB,
1785 void RegionGenerator::copyPHIInstruction(ScopStmt &Stmt, PHINode *PHI,
1789 PHINode *PHICopy =
tools/polly/lib/CodeGen/IslNodeBuilder.cpp 1301 auto *MergePHI = Builder.CreatePHI(
tools/polly/lib/CodeGen/LoopGenerators.cpp 152 PHINode *IV = Builder.CreatePHI(LoopIVType, 2, "polly.indvar");
tools/polly/lib/Support/SCEVValidator.cpp 777 auto *PHI = dyn_cast<PHINode>(V);
777 auto *PHI = dyn_cast<PHINode>(V);
798 Value *getUniqueNonErrorValue(PHINode *PHI, Region *R, LoopInfo &LI,
tools/polly/lib/Support/ScopHelper.cpp 655 if (PHINode *PHI = dyn_cast<PHINode>(UI))
655 if (PHINode *PHI = dyn_cast<PHINode>(UI))
tools/polly/lib/Support/VirtualInstruction.cpp 28 if (PHINode *PHI = dyn_cast<PHINode>(UI)) {
28 if (PHINode *PHI = dyn_cast<PHINode>(UI)) {
385 PHINode *PHI = dyn_cast<PHINode>(Inst);
385 PHINode *PHI = dyn_cast<PHINode>(Inst);
tools/polly/lib/Transform/DeLICM.cpp 588 auto PHI = cast<PHINode>(MA->getAccessInstruction());
tools/polly/lib/Transform/ForwardOpTree.cpp 618 if (isa<PHINode>(UseInst))
tools/polly/lib/Transform/ZoneAlgo.cpp 509 static bool isRecursivePHI(const PHINode *PHI) {
510 SmallVector<const PHINode *, 8> Worklist;
511 SmallPtrSet<const PHINode *, 8> Visited;
515 const PHINode *Cur = Worklist.pop_back_val();
523 auto *IncomingPHI = dyn_cast<PHINode>(IncomingVal);
523 auto *IncomingPHI = dyn_cast<PHINode>(IncomingVal);
539 auto *PHI = cast<PHINode>(SAI->getBasePtr());
539 auto *PHI = cast<PHINode>(SAI->getBasePtr());
841 const DenseSet<PHINode *> &ComputedPHIs,
855 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(
855 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(
901 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
901 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
931 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(OutTupleId.get_user()));
931 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(OutTupleId.get_user()));
1003 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
1003 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
1015 DenseSet<PHINode *> AllPHIs;
1025 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
1025 auto *PHI = cast<PHINode>(MA->getAccessInstruction());
unittests/Analysis/DivergenceAnalysisTest.cpp 300 auto *Phi = dyn_cast<PHINode>(BB.begin());
300 auto *Phi = dyn_cast<PHINode>(BB.begin());
425 auto &DivDblPhi = *cast<PHINode>(ExitBlock.begin());
425 auto &DivDblPhi = *cast<PHINode>(ExitBlock.begin());
unittests/Analysis/IVDescriptorsTest.cpp 82 PHINode *Inst_i = dyn_cast<PHINode>(&Header->front());
82 PHINode *Inst_i = dyn_cast<PHINode>(&Header->front());
unittests/Analysis/LoopInfoTest.cpp 1257 PHINode &Instruction_i = cast<PHINode>(*(II));
1257 PHINode &Instruction_i = cast<PHINode>(*(II));
1259 PHINode &Instruction_aux = cast<PHINode>(*(++II));
1259 PHINode &Instruction_aux = cast<PHINode>(*(++II));
1261 PHINode &Instruction_loopvariant = cast<PHINode>(*(++II));
1261 PHINode &Instruction_loopvariant = cast<PHINode>(*(++II));
1264 PHINode &Instruction_usedoutside = cast<PHINode>(*(++II));
1264 PHINode &Instruction_usedoutside = cast<PHINode>(*(++II));
1267 PHINode &Instruction_mulopcode = cast<PHINode>(*(++II));
1267 PHINode &Instruction_mulopcode = cast<PHINode>(*(++II));
unittests/Analysis/MemorySSATest.cpp 882 SmallVector<PHINode *, 8> Inserted;
unittests/Analysis/PhiValuesTest.cpp 45 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then);
45 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then);
48 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then);
48 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then);
118 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then);
118 PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then);
121 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then);
121 PHINode *Phi2 = PHINode::Create(I32Ty, 2, "phi2", Then);
124 PHINode *Phi3 = PHINode::Create(I32Ty, 2, "phi3", End);
124 PHINode *Phi3 = PHINode::Create(I32Ty, 2, "phi3", End);
unittests/Analysis/ScalarEvolutionTest.cpp 129 auto *PN = PHINode::Create(Ty, 2, "", &*LoopBB->begin());
129 auto *PN = PHINode::Create(Ty, 2, "", &*LoopBB->begin());
345 Acc[0] = PHINode::Create(Ty, 2, "", LoopBB);
346 Acc[1] = PHINode::Create(Ty, 2, "", LoopBB);
347 Acc[2] = PHINode::Create(Ty, 2, "", LoopBB);
348 Acc[3] = PHINode::Create(Ty, 2, "", LoopBB);
349 Acc[4] = PHINode::Create(Ty, 2, "", LoopBB);
350 Acc[5] = PHINode::Create(Ty, 2, "", LoopBB);
351 Acc[6] = PHINode::Create(Ty, 2, "", LoopBB);
352 Acc[7] = PHINode::Create(Ty, 2, "", LoopBB);
377 PHINode *Phi = cast<PHINode>(&*II++);
377 PHINode *Phi = cast<PHINode>(&*II++);
694 auto *PN = PHINode::Create(I64Ty, 2, "", CondBB);
694 auto *PN = PHINode::Create(I64Ty, 2, "", CondBB);
774 PHINode *Phi = Builder.CreatePHI(T_int64, 2);
846 PHINode *Phi = Builder.CreatePHI(T_int64, 2);
947 PHINode *Phi = Builder.CreatePHI(T_int64, 2);
1018 auto *Phi = PHINode::Create(Type::getInt64Ty(Context), 2, "", Br);
1018 auto *Phi = PHINode::Create(Type::getInt64Ty(Context), 2, "", Br);
1075 auto *Phi = PHINode::Create(Int32Ty, 2, "", Br);
1075 auto *Phi = PHINode::Create(Int32Ty, 2, "", Br);
1172 PHINode *Phi = Builder.CreatePHI(T_int64, 2);
1488 PHINode *CanonicalIV = Loop->getCanonicalInductionVariable();
1525 PHINode *CanonicalIV = Loop->getCanonicalInductionVariable();
1540 PHINode *NewCanonicalIV = nullptr;
1541 for (BasicBlock::iterator i = LoopHeaderBB->begin(); isa<PHINode>(i);
1543 PHINode *PN = cast<PHINode>(i);
1543 PHINode *PN = cast<PHINode>(i);
1620 PHINode *NewCanonicalIV = nullptr;
1621 for (BasicBlock::iterator i = LoopHeaderBB->begin(); isa<PHINode>(i);
1623 PHINode *PN = cast<PHINode>(i);
1623 PHINode *PN = cast<PHINode>(i);
1822 PHINode *CanonicalIV = Loop->getCanonicalInductionVariable();
unittests/FuzzMutate/OperationsTest.cpp 261 auto *PHI1 = PHINode::Create(Int8Ty, /*NumReservedValues=*/2, "p1", BB3);
261 auto *PHI1 = PHINode::Create(Int8Ty, /*NumReservedValues=*/2, "p1", BB3);
264 auto *PHI2 = PHINode::Create(Int8Ty, /*NumReservedValues=*/2, "p2", BB3);
264 auto *PHI2 = PHINode::Create(Int8Ty, /*NumReservedValues=*/2, "p2", BB3);
unittests/IR/BasicBlockTest.cpp 36 for (auto &PN : BB->phis()) {
46 auto *P1 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.1", BI);
46 auto *P1 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.1", BI);
47 auto *P2 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.2", BI);
47 auto *P2 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.2", BI);
48 auto *P3 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.3", BI);
48 auto *P3 = PHINode::Create(Int32Ty, /*NumReservedValues*/ 3, "phi.3", BI);
60 for (auto &PN : BB->phis()) {
72 auto isPhi = [](Instruction &I) { return isa<PHINode>(&I); };
81 for (const auto &PN : const_cast<const BasicBlock *>(BB.get())->phis()) {
unittests/IR/UserTest.cpp 71 PHINode &P = cast<PHINode>(ExitBB.front());
71 PHINode &P = cast<PHINode>(ExitBB.front());
87 const PHINode *IP = &P;
unittests/Transforms/Utils/LocalTest.cpp 35 PHINode *phi = builder.CreatePHI(Type::getInt32Ty(C), 2);
81 AssertingVH<PHINode> P1 = B.CreatePHI(Type::getInt32Ty(C), 2);
84 PHINode *P2 = B.CreatePHI(Type::getInt32Ty(C), 2);
87 AssertingVH<PHINode> P3 = B.CreatePHI(Type::getInt32Ty(C), 2);
91 PHINode *P4 = B.CreatePHI(Type::getInt32Ty(C), 2);
unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp 91 PHINode *UpdatePhiA = dyn_cast_or_null<PHINode>(I1->getOperand(0));
91 PHINode *UpdatePhiA = dyn_cast_or_null<PHINode>(I1->getOperand(0));
98 PHINode *UpdatePhiB = dyn_cast_or_null<PHINode>(I3->getOperand(0));
98 PHINode *UpdatePhiB = dyn_cast_or_null<PHINode>(I3->getOperand(0));
178 SmallVector<PHINode *, 8> Inserted;
190 PHINode *UpdatePhi = dyn_cast_or_null<PHINode>(I2->getOperand(0));
190 PHINode *UpdatePhi = dyn_cast_or_null<PHINode>(I2->getOperand(0));
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h 123 typedef _Tp value_type;
usr/include/c++/7.4.0/type_traits 1983 { typedef _Up type; };
utils/unittest/googletest/include/gtest/gtest-printers.h 407 T* p, ::std::ostream* os) {
416 if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {