Lines Matching refs:PHINode
24 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) {
81 PHINode *NewLHS = 0, *NewRHS = 0;
83 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(),
91 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(),
130 Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) {
201 SmallVector<PHINode*, 16> OperandPhis(FixedOperands.size());
207 PHINode *NewPN = PHINode::Create(FirstOp->getType(), e,
225 if (PHINode *OpPhi = OperandPhis[op])
287 Instruction *InstCombiner::FoldPHIArgLoadIntoPHI(PHINode &PN) {
348 PHINode *NewPN = PHINode::Create(FirstLI->getOperand(0)->getType(),
391 Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) {
456 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(),
508 static bool DeadPHICycle(PHINode *PN,
509 SmallPtrSet<PHINode*, 16> &PotentiallyDeadPHIs) {
521 if (PHINode *PU = dyn_cast<PHINode>(PN->use_back()))
530 static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal,
531 SmallPtrSet<PHINode*, 16> &ValueEqualPHIs) {
544 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) {
575 PHINode *PN; // The PHI that was lowered.
579 LoweredPHIRecord(PHINode *pn, unsigned Sh, Type *Ty)
583 LoweredPHIRecord(PHINode *pn, unsigned Sh)
598 return DenseMapInfo<PHINode*>::getHashValue(Val.PN) ^ (Val.Shift>>3) ^
620 Instruction *InstCombiner::SliceUpIllegalIntegerPHI(PHINode &FirstPhi) {
629 SmallVector<PHINode*, 8> PHIsToSlice;
630 SmallPtrSet<PHINode*, 8> PHIsInspected;
636 PHINode *PN = PHIsToSlice[PHIId];
660 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
702 DenseMap<LoweredPHIRecord, PHINode*> ExtractedVals;
706 PHINode *PN = PHIsToSlice[PHIId];
710 PHINode *EltPHI;
717 EltPHI = PHINode::Create(Ty, PN->getNumIncomingValues(),
740 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) {
764 if (PHINode *OldInVal = dyn_cast<PHINode>(PN->getIncomingValue(i)))
792 // PHINode simplification
794 Instruction *InstCombiner::visitPHINode(PHINode &PN) {
815 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) {
816 SmallPtrSet<PHINode*, 16> PotentiallyDeadPHIs;
845 isa<PHINode>(PN.getIncomingValue(InValNo)))
855 if (OpVal != NonPhiInVal && !isa<PHINode>(OpVal))
863 SmallPtrSet<PHINode*, 16> ValueEqualPHIs;
874 PHINode *FirstPN = cast<PHINode>(PN.getParent()->begin());