Lines Matching defs:Ty

330 ScalarEvolution::getConstant(Type *Ty, uint64_t V, bool isSigned) {
331 IntegerType *ITy = cast<IntegerType>(getEffectiveSCEVType(Ty));
337 : SCEV(ID, SCEVTy), Op(op), Ty(ty) {}
343 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
351 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
359 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
410 Type *Ty =
412 if (StructType *STy = dyn_cast<StructType>(Ty))
437 Type *Ty =
441 if (Ty->isStructTy() || Ty->isArrayTy()) {
442 CTy = Ty;
823 Type *Ty) {
824 assert(getTypeSizeInBits(Op->getType()) > getTypeSizeInBits(Ty) &&
826 assert(isSCEVable(Ty) &&
828 Ty = getEffectiveSCEVType(Ty);
833 ID.AddPointer(Ty);
840 cast<ConstantInt>(ConstantExpr::getTrunc(SC->getValue(), Ty)));
844 return getTruncateExpr(ST->getOperand(), Ty);
848 return getTruncateOrSignExtend(SS->getOperand(), Ty);
852 return getTruncateOrZeroExtend(SZ->getOperand(), Ty);
860 const SCEV *S = getTruncateExpr(SA->getOperand(i), Ty);
875 const SCEV *S = getTruncateExpr(SM->getOperand(i), Ty);
888 Operands.push_back(getTruncateExpr(AddRec->getOperand(i), Ty));
896 Op, Ty);
902 Type *Ty) {
903 assert(getTypeSizeInBits(Op->getType()) < getTypeSizeInBits(Ty) &&
905 assert(isSCEVable(Ty) &&
907 Ty = getEffectiveSCEVType(Ty);
912 cast<ConstantInt>(ConstantExpr::getZExt(SC->getValue(), Ty)));
916 return getZeroExtendExpr(SZ->getOperand(), Ty);
919 // computed a SCEV for this Op and Ty.
923 ID.AddPointer(Ty);
934 unsigned NewBits = getTypeSizeInBits(Ty);
937 return getTruncateOrZeroExtend(X, Ty);
954 return getAddRecExpr(getZeroExtendExpr(Start, Ty),
955 getZeroExtendExpr(Step, Ty),
993 return getAddRecExpr(getZeroExtendExpr(Start, Ty),
994 getZeroExtendExpr(Step, Ty),
1008 return getAddRecExpr(getZeroExtendExpr(Start, Ty),
1009 getSignExtendExpr(Step, Ty),
1028 return getAddRecExpr(getZeroExtendExpr(Start, Ty),
1029 getZeroExtendExpr(Step, Ty),
1043 return getAddRecExpr(getZeroExtendExpr(Start, Ty),
1044 getSignExtendExpr(Step, Ty),
1055 Op, Ty);
1087 Type *Ty,
1149 Type *Ty,
1151 const SCEV *PreStart = getPreStartForSignExtend(AR, Ty, SE);
1153 return SE->getSignExtendExpr(AR->getStart(), Ty);
1155 return SE->getAddExpr(SE->getSignExtendExpr(AR->getStepRecurrence(*SE), Ty),
1156 SE->getSignExtendExpr(PreStart, Ty));
1160 Type *Ty) {
1161 assert(getTypeSizeInBits(Op->getType()) < getTypeSizeInBits(Ty) &&
1163 assert(isSCEVable(Ty) &&
1165 Ty = getEffectiveSCEVType(Ty);
1170 cast<ConstantInt>(ConstantExpr::getSExt(SC->getValue(), Ty)));
1174 return getSignExtendExpr(SS->getOperand(), Ty);
1178 return getZeroExtendExpr(SZ->getOperand(), Ty);
1181 // computed a SCEV for this Op and Ty.
1185 ID.AddPointer(Ty);
1191 return getZeroExtendExpr(Op, Ty);
1200 unsigned NewBits = getTypeSizeInBits(Ty);
1203 return getTruncateOrSignExtend(X, Ty);
1220 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
1221 getSignExtendExpr(Step, Ty),
1259 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
1260 getSignExtendExpr(Step, Ty),
1273 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
1274 getZeroExtendExpr(Step, Ty),
1292 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
1293 getSignExtendExpr(Step, Ty),
1303 Op, Ty);
1312 Type *Ty) {
1313 assert(getTypeSizeInBits(Op->getType()) < getTypeSizeInBits(Ty) &&
1315 assert(isSCEVable(Ty) &&
1317 Ty = getEffectiveSCEVType(Ty);
1322 return getSignExtendExpr(Op, Ty);
1327 if (getTypeSizeInBits(NewOp->getType()) < getTypeSizeInBits(Ty))
1328 return getAnyExtendExpr(NewOp, Ty);
1329 return getTruncateOrNoop(NewOp, Ty);
1333 const SCEV *ZExt = getZeroExtendExpr(Op, Ty);
1338 const SCEV *SExt = getSignExtendExpr(Op, Ty);
1347 Ops.push_back(getAnyExtendExpr(*I, Ty));
1518 Type *Ty = Ops[0]->getType();
1527 const SCEV *Scale = getConstant(Ty, Count);
1623 uint64_t BitWidth = getTypeSizeInBits(Ty);
1647 return getConstant(Ty, 0);
1675 const SCEV *One = getConstant(Ty, 1);
2059 Type *Ty = AddRec->getType();
2060 bool LargerThan64Bits = getTypeSizeInBits(Ty) > 64;
2064 const SCEV *Term = getConstant(Ty, 0);
2076 const SCEV *CoeffTerm = getConstant(Ty, Coeff);
2142 Type *Ty = LHS->getType();
2144 unsigned MaxShiftAmt = getTypeSizeInBits(Ty) - LZ - 1;
2150 IntegerType::get(getContext(), getTypeSizeInBits(Ty) + MaxShiftAmt);
2605 Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy));
2606 return getTruncateOrZeroExtend(getSCEV(C), Ty);
2614 Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy));
2615 return getTruncateOrZeroExtend(getSCEV(C), Ty);
2631 Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(STy));
2632 return getTruncateOrZeroExtend(getSCEV(C), Ty);
2641 Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(CTy));
2642 return getTruncateOrZeroExtend(getSCEV(C), Ty);
2675 bool ScalarEvolution::isSCEVable(Type *Ty) const {
2677 return Ty->isIntegerTy() || Ty->isPointerTy();
2682 uint64_t ScalarEvolution::getTypeSizeInBits(Type *Ty) const {
2683 assert(isSCEVable(Ty) && "Type is not SCEVable!");
2687 return TD->getTypeSizeInBits(Ty);
2690 if (Ty->isIntegerTy())
2691 return Ty->getPrimitiveSizeInBits();
2695 assert(Ty->isPointerTy() && "isSCEVable permitted a non-SCEVable type!");
2703 Type *ScalarEvolution::getEffectiveSCEVType(Type *Ty) const {
2704 assert(isSCEVable(Ty) && "Type is not SCEVable!");
2706 if (Ty->isIntegerTy())
2707 return Ty;
2710 assert(Ty->isPointerTy() && "Unexpected non-pointer non-integer type!");
2783 Type *Ty = V->getType();
2784 Ty = getEffectiveSCEVType(Ty);
2786 getConstant(cast<ConstantInt>(Constant::getAllOnesValue(Ty))));
2795 Type *Ty = V->getType();
2796 Ty = getEffectiveSCEVType(Ty);
2798 getConstant(cast<ConstantInt>(Constant::getAllOnesValue(Ty)));
2819 ScalarEvolution::getTruncateOrZeroExtend(const SCEV *V, Type *Ty) {
2822 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2824 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2826 if (getTypeSizeInBits(SrcTy) > getTypeSizeInBits(Ty))
2827 return getTruncateExpr(V, Ty);
2828 return getZeroExtendExpr(V, Ty);
2836 Type *Ty) {
2839 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2841 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2843 if (getTypeSizeInBits(SrcTy) > getTypeSizeInBits(Ty))
2844 return getTruncateExpr(V, Ty);
2845 return getSignExtendExpr(V, Ty);
2852 ScalarEvolution::getNoopOrZeroExtend(const SCEV *V, Type *Ty) {
2855 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2857 assert(getTypeSizeInBits(SrcTy) <= getTypeSizeInBits(Ty) &&
2859 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2861 return getZeroExtendExpr(V, Ty);
2868 ScalarEvolution::getNoopOrSignExtend(const SCEV *V, Type *Ty) {
2871 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2873 assert(getTypeSizeInBits(SrcTy) <= getTypeSizeInBits(Ty) &&
2875 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2877 return getSignExtendExpr(V, Ty);
2885 ScalarEvolution::getNoopOrAnyExtend(const SCEV *V, Type *Ty) {
2888 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2890 assert(getTypeSizeInBits(SrcTy) <= getTypeSizeInBits(Ty) &&
2892 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2894 return getAnyExtendExpr(V, Ty);
2900 ScalarEvolution::getTruncateOrNoop(const SCEV *V, Type *Ty) {
2903 (Ty->isIntegerTy() || Ty->isPointerTy()) &&
2905 assert(getTypeSizeInBits(SrcTy) >= getTypeSizeInBits(Ty) &&
2907 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty))
2909 return getTruncateExpr(V, Ty);
3398 Type *Ty = AddRec->getType();
3402 MaxBECount = getNoopOrZeroExtend(MaxBECount, Ty);
3549 Type *Ty = AddRec->getType();
3553 MaxBECount = getNoopOrZeroExtend(MaxBECount, Ty);
6349 Type *Ty = Start->getType();
6355 return getConstant(Ty, 0);
6357 const SCEV *NegOne = getConstant(Ty, (uint64_t)-1);
6369 getTypeSizeInBits(Ty) + 1);