• Home
  • Raw
  • Download

Lines Matching refs:NarrowUse

852   Instruction *NarrowUse = nullptr;  member
862 : NarrowDef(ND), NarrowUse(NU), WideDef(WD), in NarrowIVDefUse()
921 const SCEVAddRecExpr *getWideRecurrence(Instruction *NarrowUse);
966 unsigned Opcode = DU.NarrowUse->getOpcode(); in cloneIVUser()
987 Instruction *NarrowUse = DU.NarrowUse; in cloneBitwiseIVUser() local
991 DEBUG(dbgs() << "Cloning bitwise IVUser: " << *NarrowUse << "\n"); in cloneBitwiseIVUser()
997 Value *LHS = (NarrowUse->getOperand(0) == NarrowDef) in cloneBitwiseIVUser()
999 : createExtendInst(NarrowUse->getOperand(0), WideType, in cloneBitwiseIVUser()
1000 IsSigned, NarrowUse); in cloneBitwiseIVUser()
1001 Value *RHS = (NarrowUse->getOperand(1) == NarrowDef) in cloneBitwiseIVUser()
1003 : createExtendInst(NarrowUse->getOperand(1), WideType, in cloneBitwiseIVUser()
1004 IsSigned, NarrowUse); in cloneBitwiseIVUser()
1006 auto *NarrowBO = cast<BinaryOperator>(NarrowUse); in cloneBitwiseIVUser()
1009 IRBuilder<> Builder(NarrowUse); in cloneBitwiseIVUser()
1017 Instruction *NarrowUse = DU.NarrowUse; in cloneArithmeticIVUser() local
1021 DEBUG(dbgs() << "Cloning arithmetic IVUser: " << *NarrowUse << "\n"); in cloneArithmeticIVUser()
1023 unsigned IVOpIdx = (NarrowUse->getOperand(0) == NarrowDef) ? 0 : 1; in cloneArithmeticIVUser()
1046 const SCEV *NarrowRHS = SE->getSCEV(NarrowUse->getOperand(1)); in cloneArithmeticIVUser()
1049 const SCEV *NarrowLHS = SE->getSCEV(NarrowUse->getOperand(0)); in cloneArithmeticIVUser()
1057 switch (NarrowUse->getOpcode()) { in cloneArithmeticIVUser()
1088 Value *LHS = (NarrowUse->getOperand(0) == NarrowDef) in cloneArithmeticIVUser()
1090 : createExtendInst(NarrowUse->getOperand(0), WideType, in cloneArithmeticIVUser()
1091 SignExtend, NarrowUse); in cloneArithmeticIVUser()
1092 Value *RHS = (NarrowUse->getOperand(1) == NarrowDef) in cloneArithmeticIVUser()
1094 : createExtendInst(NarrowUse->getOperand(1), WideType, in cloneArithmeticIVUser()
1095 SignExtend, NarrowUse); in cloneArithmeticIVUser()
1097 auto *NarrowBO = cast<BinaryOperator>(NarrowUse); in cloneArithmeticIVUser()
1101 IRBuilder<> Builder(NarrowUse); in cloneArithmeticIVUser()
1126 const unsigned OpCode = DU.NarrowUse->getOpcode(); in getExtendedOperandRecurrence()
1135 DU.NarrowUse->getOperand(0) == DU.NarrowDef ? 1 : 0; in getExtendedOperandRecurrence()
1136 assert(DU.NarrowUse->getOperand(1-ExtendOperIdx) == DU.NarrowDef && "bad DU"); in getExtendedOperandRecurrence()
1140 cast<OverflowingBinaryOperator>(DU.NarrowUse); in getExtendedOperandRecurrence()
1143 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in getExtendedOperandRecurrence()
1146 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in getExtendedOperandRecurrence()
1174 const SCEVAddRecExpr *WidenIV::getWideRecurrence(Instruction *NarrowUse) { in getWideRecurrence() argument
1175 if (!SE->isSCEVable(NarrowUse->getType())) in getWideRecurrence()
1178 const SCEV *NarrowExpr = SE->getSCEV(NarrowUse); in getWideRecurrence()
1199 << " for user " << *DU.NarrowUse << "\n"); in truncateIVUse()
1201 getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT, LI)); in truncateIVUse()
1203 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, Trunc); in truncateIVUse()
1210 ICmpInst *Cmp = dyn_cast<ICmpInst>(DU.NarrowUse); in widenLoopCompare()
1239 getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT, LI)); in widenLoopCompare()
1240 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in widenLoopCompare()
1245 DU.NarrowUse->replaceUsesOfWith(Op, ExtOp); in widenLoopCompare()
1255 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) { in widenIVUse()
1284 if (IsSigned ? isa<SExtInst>(DU.NarrowUse) : isa<ZExtInst>(DU.NarrowUse)) { in widenIVUse()
1286 if (DU.NarrowUse->getType() != WideType) { in widenIVUse()
1287 unsigned CastWidth = SE->getTypeSizeInBits(DU.NarrowUse->getType()); in widenIVUse()
1291 IRBuilder<> Builder(DU.NarrowUse); in widenIVUse()
1292 NewDef = Builder.CreateTrunc(DU.WideDef, DU.NarrowUse->getType()); in widenIVUse()
1299 << " not wide enough to subsume " << *DU.NarrowUse << "\n"); in widenIVUse()
1300 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in widenIVUse()
1301 NewDef = DU.NarrowUse; in widenIVUse()
1304 if (NewDef != DU.NarrowUse) { in widenIVUse()
1305 DEBUG(dbgs() << "INDVARS: eliminating " << *DU.NarrowUse in widenIVUse()
1308 DU.NarrowUse->replaceAllUsesWith(NewDef); in widenIVUse()
1309 DeadInsts.emplace_back(DU.NarrowUse); in widenIVUse()
1322 const SCEVAddRecExpr *WideAddRec = getWideRecurrence(DU.NarrowUse); in widenIVUse()
1340 assert(DU.NarrowUse != DU.NarrowUse->getParent()->getTerminator() && in widenIVUse()
1346 if (WideAddRec == WideIncExpr && Rewriter.hoistIVInc(WideInc, DU.NarrowUse)) in widenIVUse()
1458 pushNarrowIVUsers(DU.NarrowUse, WideUse); in createWideIV()