• Home
  • Raw
  • Download

Lines Matching refs:FirstInst

43   auto *FirstInst = cast<Instruction>(PN.getIncomingValue(0));  in PHIArgMergedDebugLoc()  local
44 Inst->setDebugLoc(FirstInst->getDebugLoc()); in PHIArgMergedDebugLoc()
382 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); in foldPHIArgBinOpIntoPHI() local
383 assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)); in foldPHIArgBinOpIntoPHI()
384 unsigned Opc = FirstInst->getOpcode(); in foldPHIArgBinOpIntoPHI()
385 Value *LHSVal = FirstInst->getOperand(0); in foldPHIArgBinOpIntoPHI()
386 Value *RHSVal = FirstInst->getOperand(1); in foldPHIArgBinOpIntoPHI()
403 if (CI->getPredicate() != cast<CmpInst>(FirstInst)->getPredicate()) in foldPHIArgBinOpIntoPHI()
420 Value *InLHS = FirstInst->getOperand(0); in foldPHIArgBinOpIntoPHI()
421 Value *InRHS = FirstInst->getOperand(1); in foldPHIArgBinOpIntoPHI()
425 FirstInst->getOperand(0)->getName() + ".pn"); in foldPHIArgBinOpIntoPHI()
433 FirstInst->getOperand(1)->getName() + ".pn"); in foldPHIArgBinOpIntoPHI()
454 if (CmpInst *CIOp = dyn_cast<CmpInst>(FirstInst)) { in foldPHIArgBinOpIntoPHI()
461 BinaryOperator *BinOp = cast<BinaryOperator>(FirstInst); in foldPHIArgBinOpIntoPHI()
475 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in foldPHIArgGEPIntoPHI() local
477 SmallVector<Value*, 16> FixedOperands(FirstInst->op_begin(), in foldPHIArgGEPIntoPHI()
478 FirstInst->op_end()); in foldPHIArgGEPIntoPHI()
494 if (!GEP || !GEP->hasOneUser() || GEP->getType() != FirstInst->getType() || in foldPHIArgGEPIntoPHI()
495 GEP->getNumOperands() != FirstInst->getNumOperands()) in foldPHIArgGEPIntoPHI()
507 for (unsigned op = 0, e = FirstInst->getNumOperands(); op != e; ++op) { in foldPHIArgGEPIntoPHI()
508 if (FirstInst->getOperand(op) == GEP->getOperand(op)) in foldPHIArgGEPIntoPHI()
516 if (isa<ConstantInt>(FirstInst->getOperand(op)) || in foldPHIArgGEPIntoPHI()
520 if (FirstInst->getOperand(op)->getType() !=GEP->getOperand(op)->getType()) in foldPHIArgGEPIntoPHI()
551 Value *FirstOp = FirstInst->getOperand(i); in foldPHIArgGEPIntoPHI()
577 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in foldPHIArgGEPIntoPHI()
824 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); in foldPHIArgOpIntoPHI() local
826 if (isa<GetElementPtrInst>(FirstInst)) in foldPHIArgOpIntoPHI()
828 if (isa<LoadInst>(FirstInst)) in foldPHIArgOpIntoPHI()
830 if (isa<InsertValueInst>(FirstInst)) in foldPHIArgOpIntoPHI()
832 if (isa<ExtractValueInst>(FirstInst)) in foldPHIArgOpIntoPHI()
842 if (isa<CastInst>(FirstInst)) { in foldPHIArgOpIntoPHI()
843 CastSrcTy = FirstInst->getOperand(0)->getType(); in foldPHIArgOpIntoPHI()
851 } else if (isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)) { in foldPHIArgOpIntoPHI()
854 ConstantOp = dyn_cast<Constant>(FirstInst->getOperand(1)); in foldPHIArgOpIntoPHI()
864 if (!I || !I->hasOneUser() || !I->isSameOperationAs(FirstInst)) in foldPHIArgOpIntoPHI()
876 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(), in foldPHIArgOpIntoPHI()
880 Value *InVal = FirstInst->getOperand(0); in foldPHIArgOpIntoPHI()
903 if (CastInst *FirstCI = dyn_cast<CastInst>(FirstInst)) { in foldPHIArgOpIntoPHI()
910 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(FirstInst)) { in foldPHIArgOpIntoPHI()
921 CmpInst *CIOp = cast<CmpInst>(FirstInst); in foldPHIArgOpIntoPHI()