• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/

Lines Matching defs:IncV

907 bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV,
909 if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) ||
910 (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV)))
916 for (User::op_iterator OI = IncV->op_begin()+1,
917 OE = IncV->op_end(); OI != OE; ++OI)
923 IncV = dyn_cast<Instruction>(IncV->getOperand(0));
924 if (!IncV)
927 if (IncV->mayHaveSideEffects())
930 if (IncV == PN)
933 return isNormalAddRecExprPHI(PN, IncV, L);
945 Instruction *SCEVExpander::getIVIncOperand(Instruction *IncV,
948 if (IncV == InsertPos)
951 switch (IncV->getOpcode()) {
957 Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1));
959 return dyn_cast<Instruction>(IncV->getOperand(0));
963 return dyn_cast<Instruction>(IncV->getOperand(0));
965 for (auto I = IncV->op_begin() + 1, E = IncV->op_end(); I != E; ++I) {
980 if (IncV->getNumOperands() != 2)
982 unsigned AS = cast<PointerType>(IncV->getType())->getAddressSpace();
983 if (IncV->getType() != Type::getInt1PtrTy(SE.getContext(), AS)
984 && IncV->getType() != Type::getInt8PtrTy(SE.getContext(), AS))
988 return dyn_cast<Instruction>(IncV->getOperand(0));
1012 bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) {
1013 if (SE.DT.dominates(IncV, InsertPos))
1016 // InsertPos must itself dominate IncV so that IncV's new position satisfies
1019 !SE.DT.dominates(InsertPos->getParent(), IncV->getParent()))
1022 if (!SE.LI.movementPreservesLCSSAForm(IncV, InsertPos))
1028 Instruction *Oper = getIVIncOperand(IncV, InsertPos, /*allowScale*/true);
1031 // IncV is safe to hoist.
1032 IVIncs.push_back(IncV);
1033 IncV = Oper;
1034 if (SE.DT.dominates(IncV, InsertPos))
1049 bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV,
1051 for(Instruction *IVOper = IncV;
1066 Value *IncV;
1075 IncV = expandAddToGEP(SE.getSCEV(StepV), GEPPtrTy, IntTy, PN);
1076 if (IncV->getType() != PN->getType()) {
1077 IncV = Builder.CreateBitCast(IncV, PN->getType());
1078 rememberInstruction(IncV);
1081 IncV = useSubtract ?
1084 rememberInstruction(IncV);
1086 return IncV;
1182 Instruction *IncV = nullptr;
1226 IncV = TempIncV;
1240 IncV = TempIncV;
1249 hoistBeforePos(&SE.DT, IncV, IVIncInsertPos, AddRecPhiMatch);
1255 rememberInstruction(IncV);
1327 Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract);
1329 if (isa<OverflowingBinaryOperator>(IncV)) {
1331 cast<BinaryOperator>(IncV)->setHasNoUnsignedWrap();
1333 cast<BinaryOperator>(IncV)->setHasNoSignedWrap();
1335 PN->addIncoming(IncV, Pred);