Lines Matching refs:PHINode
43 void InstCombinerImpl::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { in PHIArgMergedDebugLoc()
106 bool InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) { in foldIntegerTypedPHI()
170 if (isa<PHINode>(Arg)) { in foldIntegerTypedPHI()
193 PHINode *MatchingPtrPHI = nullptr; in foldIntegerTypedPHI()
195 for (PHINode &PtrPHI : BB->phis()) { in foldIntegerTypedPHI()
242 if (isa<PHINode>(Inst) && BB->getFirstInsertionPt() == BB->end()) in foldIntegerTypedPHI()
248 PHINode *NewPtrPHI = PHINode::Create( in foldIntegerTypedPHI()
264 assert((isa<PHINode>(IncomingVal) || in foldIntegerTypedPHI()
285 if (isa<PHINode>(IncomingI)) in foldIntegerTypedPHI()
307 Instruction *InstCombinerImpl::foldPHIArgIntToPtrToPHI(PHINode &PN) { in foldPHIArgIntToPtrToPHI()
331 InstCombinerImpl::foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN) { in foldPHIArgInsertValueInstructionIntoPHI()
343 std::array<PHINode *, 2> NewOperands; in foldPHIArgInsertValueInstructionIntoPHI()
348 NewOperand = PHINode::Create( in foldPHIArgInsertValueInstructionIntoPHI()
371 InstCombinerImpl::foldPHIArgExtractValueInstructionIntoPHI(PHINode &PN) { in foldPHIArgExtractValueInstructionIntoPHI()
386 auto *NewAggregateOperand = PHINode::Create( in foldPHIArgExtractValueInstructionIntoPHI()
407 Instruction *InstCombinerImpl::foldPHIArgBinOpIntoPHI(PHINode &PN) { in foldPHIArgBinOpIntoPHI()
448 PHINode *NewLHS = nullptr, *NewRHS = nullptr; in foldPHIArgBinOpIntoPHI()
450 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(), in foldPHIArgBinOpIntoPHI()
458 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(), in foldPHIArgBinOpIntoPHI()
502 Instruction *InstCombinerImpl::foldPHIArgGEPIntoPHI(PHINode &PN) { in foldPHIArgGEPIntoPHI()
576 SmallVector<PHINode*, 16> OperandPhis(FixedOperands.size()); in foldPHIArgGEPIntoPHI()
583 PHINode *NewPN = in foldPHIArgGEPIntoPHI()
584 PHINode::Create(FirstOp->getType(), E, FirstOp->getName() + ".pn"); in foldPHIArgGEPIntoPHI()
601 if (PHINode *OpPhi = OperandPhis[Op]) in foldPHIArgGEPIntoPHI()
665 Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) { in foldPHIArgLoadIntoPHI()
728 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(), in foldPHIArgLoadIntoPHI()
789 Instruction *InstCombinerImpl::foldPHIArgZextsIntoPHI(PHINode &Phi) { in foldPHIArgZextsIntoPHI()
851 PHINode *NewPhi = PHINode::Create(NarrowType, NumIncomingValues, in foldPHIArgZextsIntoPHI()
863 Instruction *InstCombinerImpl::foldPHIArgOpIntoPHI(PHINode &PN) { in foldPHIArgOpIntoPHI()
922 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(), in foldPHIArgOpIntoPHI()
977 static bool isDeadPHICycle(PHINode *PN, in isDeadPHICycle()
978 SmallPtrSetImpl<PHINode *> &PotentiallyDeadPHIs) { in isDeadPHICycle()
990 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back())) in isDeadPHICycle()
999 static bool PHIsEqualValue(PHINode *PN, Value *&NonPhiInVal, in PHIsEqualValue()
1000 SmallPtrSetImpl<PHINode *> &ValueEqualPHIs) { in PHIsEqualValue()
1012 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) { in PHIsEqualValue()
1027 static ConstantInt *getAnyNonZeroConstInt(PHINode &PN) { in getAnyNonZeroConstInt()
1056 PHINode *PN; // The PHI that was lowered.
1060 LoweredPHIRecord(PHINode *Phi, unsigned Sh, Type *Ty) in LoweredPHIRecord()
1064 LoweredPHIRecord(PHINode *Phi, unsigned Sh) : PN(Phi), Shift(Sh), Width(0) {} in LoweredPHIRecord()
1078 return DenseMapInfo<PHINode*>::getHashValue(Val.PN) ^ (Val.Shift>>3) ^ in getHashValue()
1098 Instruction *InstCombinerImpl::SliceUpIllegalIntegerPHI(PHINode &FirstPhi) { in SliceUpIllegalIntegerPHI()
1107 SmallVector<PHINode*, 8> PHIsToSlice; in SliceUpIllegalIntegerPHI()
1108 SmallPtrSet<PHINode*, 8> PHIsInspected; in SliceUpIllegalIntegerPHI()
1114 PHINode *PN = PHIsToSlice[PHIId]; in SliceUpIllegalIntegerPHI()
1146 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) { in SliceUpIllegalIntegerPHI()
1192 DenseMap<LoweredPHIRecord, PHINode*> ExtractedVals; in SliceUpIllegalIntegerPHI()
1196 PHINode *PN = PHIsToSlice[PHIId]; in SliceUpIllegalIntegerPHI()
1200 PHINode *EltPHI; in SliceUpIllegalIntegerPHI()
1207 EltPHI = PHINode::Create(Ty, PN->getNumIncomingValues(), in SliceUpIllegalIntegerPHI()
1231 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) { in SliceUpIllegalIntegerPHI()
1255 if (PHINode *OldInVal = dyn_cast<PHINode>(InVal)) in SliceUpIllegalIntegerPHI()
1278 for (PHINode *PHI : drop_begin(PHIsToSlice)) in SliceUpIllegalIntegerPHI()
1283 static Value *simplifyUsingControlFlow(InstCombiner &Self, PHINode &PN, in simplifyUsingControlFlow()
1386 static Value *foldDependentIVs(PHINode &PN, IRBuilderBase &Builder) { in foldDependentIVs()
1408 PHINode *Iv2; in foldDependentIVs()
1436 Instruction *InstCombinerImpl::visitPHINode(PHINode &PN) { in visitPHINode()
1482 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) { in visitPHINode()
1483 SmallPtrSet<PHINode*, 16> PotentiallyDeadPHIs; in visitPHINode()
1569 isa<PHINode>(PN.getIncomingValue(InValNo))) in visitPHINode()
1580 if (OpVal != NonPhiInVal && !isa<PHINode>(OpVal)) in visitPHINode()
1588 SmallPtrSet<PHINode *, 16> ValueEqualPHIs; in visitPHINode()
1624 for (PHINode &IdenticalPN : PN.getParent()->phis()) { in visitPHINode()