• Home
  • Raw
  • Download

Lines Matching refs:FirstInst

29   Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0));  in FoldPHIArgBinOpIntoPHI()  local
30 assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)); in FoldPHIArgBinOpIntoPHI()
31 unsigned Opc = FirstInst->getOpcode(); in FoldPHIArgBinOpIntoPHI()
32 Value *LHSVal = FirstInst->getOperand(0); in FoldPHIArgBinOpIntoPHI()
33 Value *RHSVal = FirstInst->getOperand(1); in FoldPHIArgBinOpIntoPHI()
50 if (CI->getPredicate() != cast<CmpInst>(FirstInst)->getPredicate()) in FoldPHIArgBinOpIntoPHI()
67 Value *InLHS = FirstInst->getOperand(0); in FoldPHIArgBinOpIntoPHI()
68 Value *InRHS = FirstInst->getOperand(1); in FoldPHIArgBinOpIntoPHI()
72 FirstInst->getOperand(0)->getName() + ".pn"); in FoldPHIArgBinOpIntoPHI()
80 FirstInst->getOperand(1)->getName() + ".pn"); in FoldPHIArgBinOpIntoPHI()
101 if (CmpInst *CIOp = dyn_cast<CmpInst>(FirstInst)) { in FoldPHIArgBinOpIntoPHI()
104 NewCI->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgBinOpIntoPHI()
108 BinaryOperator *BinOp = cast<BinaryOperator>(FirstInst); in FoldPHIArgBinOpIntoPHI()
117 NewBinOp->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgBinOpIntoPHI()
122 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI() local
124 SmallVector<Value*, 16> FixedOperands(FirstInst->op_begin(), in FoldPHIArgGEPIntoPHI()
125 FirstInst->op_end()); in FoldPHIArgGEPIntoPHI()
140 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() || in FoldPHIArgGEPIntoPHI()
141 GEP->getNumOperands() != FirstInst->getNumOperands()) in FoldPHIArgGEPIntoPHI()
153 for (unsigned op = 0, e = FirstInst->getNumOperands(); op != e; ++op) { in FoldPHIArgGEPIntoPHI()
154 if (FirstInst->getOperand(op) == GEP->getOperand(op)) in FoldPHIArgGEPIntoPHI()
162 if (isa<ConstantInt>(FirstInst->getOperand(op)) || in FoldPHIArgGEPIntoPHI()
166 if (FirstInst->getOperand(op)->getType() !=GEP->getOperand(op)->getType()) in FoldPHIArgGEPIntoPHI()
197 Value *FirstOp = FirstInst->getOperand(i); in FoldPHIArgGEPIntoPHI()
223 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in FoldPHIArgGEPIntoPHI()
226 NewGEP->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgGEPIntoPHI()
474 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); in FoldPHIArgOpIntoPHI() local
476 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI()
478 if (isa<LoadInst>(FirstInst)) in FoldPHIArgOpIntoPHI()
488 if (isa<CastInst>(FirstInst)) { in FoldPHIArgOpIntoPHI()
489 CastSrcTy = FirstInst->getOperand(0)->getType(); in FoldPHIArgOpIntoPHI()
497 } else if (isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)) { in FoldPHIArgOpIntoPHI()
500 ConstantOp = dyn_cast<Constant>(FirstInst->getOperand(1)); in FoldPHIArgOpIntoPHI()
510 if (!I || !I->hasOneUse() || !I->isSameOperationAs(FirstInst)) in FoldPHIArgOpIntoPHI()
522 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(), in FoldPHIArgOpIntoPHI()
526 Value *InVal = FirstInst->getOperand(0); in FoldPHIArgOpIntoPHI()
549 if (CastInst *FirstCI = dyn_cast<CastInst>(FirstInst)) { in FoldPHIArgOpIntoPHI()
552 NewCI->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgOpIntoPHI()
556 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(FirstInst)) { in FoldPHIArgOpIntoPHI()
563 BinOp->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgOpIntoPHI()
567 CmpInst *CIOp = cast<CmpInst>(FirstInst); in FoldPHIArgOpIntoPHI()
570 NewCI->setDebugLoc(FirstInst->getDebugLoc()); in FoldPHIArgOpIntoPHI()