Lines Matching refs:Ty
196 Constant *Constant::getNullValue(Type *Ty) { in getNullValue() argument
197 switch (Ty->getTypeID()) { in getNullValue()
199 return ConstantInt::get(Ty, 0); in getNullValue()
201 return ConstantFP::get(Ty->getContext(), in getNullValue()
204 return ConstantFP::get(Ty->getContext(), in getNullValue()
207 return ConstantFP::get(Ty->getContext(), in getNullValue()
210 return ConstantFP::get(Ty->getContext(), in getNullValue()
213 return ConstantFP::get(Ty->getContext(), in getNullValue()
216 return ConstantFP::get(Ty->getContext(), in getNullValue()
220 return ConstantPointerNull::get(cast<PointerType>(Ty)); in getNullValue()
224 return ConstantAggregateZero::get(Ty); in getNullValue()
226 return ConstantTokenNone::get(Ty->getContext()); in getNullValue()
233 Constant *Constant::getIntegerValue(Type *Ty, const APInt &V) { in getIntegerValue() argument
234 Type *ScalarTy = Ty->getScalarType(); in getIntegerValue()
237 Constant *C = ConstantInt::get(Ty->getContext(), V); in getIntegerValue()
244 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in getIntegerValue()
250 Constant *Constant::getAllOnesValue(Type *Ty) { in getAllOnesValue() argument
251 if (IntegerType *ITy = dyn_cast<IntegerType>(Ty)) in getAllOnesValue()
252 return ConstantInt::get(Ty->getContext(), in getAllOnesValue()
255 if (Ty->isFloatingPointTy()) { in getAllOnesValue()
256 APFloat FL = APFloat::getAllOnesValue(Ty->getPrimitiveSizeInBits(), in getAllOnesValue()
257 !Ty->isPPC_FP128Ty()); in getAllOnesValue()
258 return ConstantFP::get(Ty->getContext(), FL); in getAllOnesValue()
261 VectorType *VTy = cast<VectorType>(Ty); in getAllOnesValue()
524 ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V) in ConstantInt() argument
525 : Constant(Ty, ConstantIntVal, nullptr, 0), Val(V) { in ConstantInt()
526 assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type"); in ConstantInt()
543 Constant *ConstantInt::getTrue(Type *Ty) { in getTrue() argument
544 VectorType *VTy = dyn_cast<VectorType>(Ty); in getTrue()
546 assert(Ty->isIntegerTy(1) && "True must be i1 or vector of i1."); in getTrue()
547 return ConstantInt::getTrue(Ty->getContext()); in getTrue()
552 ConstantInt::getTrue(Ty->getContext())); in getTrue()
555 Constant *ConstantInt::getFalse(Type *Ty) { in getFalse() argument
556 VectorType *VTy = dyn_cast<VectorType>(Ty); in getFalse()
558 assert(Ty->isIntegerTy(1) && "False must be i1 or vector of i1."); in getFalse()
559 return ConstantInt::getFalse(Ty->getContext()); in getFalse()
564 ConstantInt::getFalse(Ty->getContext())); in getFalse()
581 Constant *ConstantInt::get(Type *Ty, uint64_t V, bool isSigned) { in get() argument
582 Constant *C = get(cast<IntegerType>(Ty->getScalarType()), V, isSigned); in get()
585 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in get()
591 ConstantInt *ConstantInt::get(IntegerType *Ty, uint64_t V, in get() argument
593 return get(Ty->getContext(), APInt(Ty->getBitWidth(), V, isSigned)); in get()
596 ConstantInt *ConstantInt::getSigned(IntegerType *Ty, int64_t V) { in getSigned() argument
597 return get(Ty, V, true); in getSigned()
600 Constant *ConstantInt::getSigned(Type *Ty, int64_t V) { in getSigned() argument
601 return get(Ty, V, true); in getSigned()
604 Constant *ConstantInt::get(Type *Ty, const APInt& V) { in get() argument
605 ConstantInt *C = get(Ty->getContext(), V); in get()
606 assert(C->getType() == Ty->getScalarType() && in get()
610 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in get()
616 ConstantInt *ConstantInt::get(IntegerType* Ty, StringRef Str, in get() argument
618 return get(Ty->getContext(), APInt(Ty->getBitWidth(), Str, radix)); in get()
630 static const fltSemantics *TypeToFloatSemantics(Type *Ty) { in TypeToFloatSemantics() argument
631 if (Ty->isHalfTy()) in TypeToFloatSemantics()
633 if (Ty->isFloatTy()) in TypeToFloatSemantics()
635 if (Ty->isDoubleTy()) in TypeToFloatSemantics()
637 if (Ty->isX86_FP80Ty()) in TypeToFloatSemantics()
639 else if (Ty->isFP128Ty()) in TypeToFloatSemantics()
642 assert(Ty->isPPC_FP128Ty() && "Unknown FP format"); in TypeToFloatSemantics()
651 Constant *ConstantFP::get(Type *Ty, double V) { in get() argument
652 LLVMContext &Context = Ty->getContext(); in get()
656 FV.convert(*TypeToFloatSemantics(Ty->getScalarType()), in get()
661 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in get()
668 Constant *ConstantFP::get(Type *Ty, StringRef Str) { in get() argument
669 LLVMContext &Context = Ty->getContext(); in get()
671 APFloat FV(*TypeToFloatSemantics(Ty->getScalarType()), Str); in get()
675 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in get()
681 Constant *ConstantFP::getNaN(Type *Ty, bool Negative, unsigned Type) { in getNaN() argument
682 const fltSemantics &Semantics = *TypeToFloatSemantics(Ty->getScalarType()); in getNaN()
684 Constant *C = get(Ty->getContext(), NaN); in getNaN()
686 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in getNaN()
692 Constant *ConstantFP::getNegativeZero(Type *Ty) { in getNegativeZero() argument
693 const fltSemantics &Semantics = *TypeToFloatSemantics(Ty->getScalarType()); in getNegativeZero()
695 Constant *C = get(Ty->getContext(), NegZero); in getNegativeZero()
697 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in getNegativeZero()
704 Constant *ConstantFP::getZeroValueForNegation(Type *Ty) { in getZeroValueForNegation() argument
705 if (Ty->isFPOrFPVectorTy()) in getZeroValueForNegation()
706 return getNegativeZero(Ty); in getZeroValueForNegation()
708 return Constant::getNullValue(Ty); in getZeroValueForNegation()
719 Type *Ty; in get() local
721 Ty = Type::getHalfTy(Context); in get()
723 Ty = Type::getFloatTy(Context); in get()
725 Ty = Type::getDoubleTy(Context); in get()
727 Ty = Type::getX86_FP80Ty(Context); in get()
729 Ty = Type::getFP128Ty(Context); in get()
733 Ty = Type::getPPC_FP128Ty(Context); in get()
735 Slot = new ConstantFP(Ty, V); in get()
741 Constant *ConstantFP::getInfinity(Type *Ty, bool Negative) { in getInfinity() argument
742 const fltSemantics &Semantics = *TypeToFloatSemantics(Ty->getScalarType()); in getInfinity()
743 Constant *C = get(Ty->getContext(), APFloat::getInf(Semantics, Negative)); in getInfinity()
745 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) in getInfinity()
751 ConstantFP::ConstantFP(Type *Ty, const APFloat& V) in ConstantFP() argument
752 : Constant(Ty, ConstantFPVal, nullptr, 0), Val(V) { in ConstantFP()
753 assert(&V.getSemantics() == TypeToFloatSemantics(Ty) && in ConstantFP()
799 Type *Ty = getType(); in getNumElements() local
800 if (auto *AT = dyn_cast<ArrayType>(Ty)) in getNumElements()
802 if (auto *VT = dyn_cast<VectorType>(Ty)) in getNumElements()
804 return Ty->getStructNumElements(); in getNumElements()
840 Type *Ty = getType(); in getNumElements() local
841 if (auto *AT = dyn_cast<ArrayType>(Ty)) in getNumElements()
843 if (auto *VT = dyn_cast<VectorType>(Ty)) in getNumElements()
845 return Ty->getStructNumElements(); in getNumElements()
925 Constant *ConstantArray::get(ArrayType *Ty, ArrayRef<Constant*> V) { in get() argument
926 if (Constant *C = getImpl(Ty, V)) in get()
928 return Ty->getContext().pImpl->ArrayConstants.getOrCreate(Ty, V); in get()
931 Constant *ConstantArray::getImpl(ArrayType *Ty, ArrayRef<Constant*> V) { in getImpl() argument
934 return ConstantAggregateZero::get(Ty); in getImpl()
937 assert(V[i]->getType() == Ty->getElementType() && in getImpl()
946 return UndefValue::get(Ty); in getImpl()
949 return ConstantAggregateZero::get(Ty); in getImpl()
1047 VectorType *Ty = VectorType::get(V.front()->getType(), V.size()); in get() local
1048 return Ty->getContext().pImpl->VectorConstants.getOrCreate(Ty, V); in get()
1179 Constant *ConstantExpr::getWithOperands(ArrayRef<Constant *> Ops, Type *Ty, in getWithOperands() argument
1184 if (Ty == getType() && std::equal(Ops.begin(), Ops.end(), op_begin())) in getWithOperands()
1187 Type *OnlyIfReducedTy = OnlyIfReduced ? Ty : nullptr; in getWithOperands()
1202 return ConstantExpr::getCast(getOpcode(), Ops[0], Ty, OnlyIfReduced); in getWithOperands()
1240 bool ConstantInt::isValueValidForType(Type *Ty, uint64_t Val) { in isValueValidForType() argument
1241 unsigned NumBits = Ty->getIntegerBitWidth(); // assert okay in isValueValidForType()
1242 if (Ty->isIntegerTy(1)) in isValueValidForType()
1250 bool ConstantInt::isValueValidForType(Type *Ty, int64_t Val) { in isValueValidForType() argument
1251 unsigned NumBits = Ty->getIntegerBitWidth(); in isValueValidForType()
1252 if (Ty->isIntegerTy(1)) in isValueValidForType()
1261 bool ConstantFP::isValueValidForType(Type *Ty, const APFloat& Val) { in isValueValidForType() argument
1265 switch (Ty->getTypeID()) { in isValueValidForType()
1312 ConstantAggregateZero *ConstantAggregateZero::get(Type *Ty) { in get() argument
1313 assert((Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) && in get()
1316 ConstantAggregateZero *&Entry = Ty->getContext().pImpl->CAZConstants[Ty]; in get()
1318 Entry = new ConstantAggregateZero(Ty); in get()
1390 ConstantPointerNull *ConstantPointerNull::get(PointerType *Ty) { in get() argument
1391 ConstantPointerNull *&Entry = Ty->getContext().pImpl->CPNConstants[Ty]; in get()
1393 Entry = new ConstantPointerNull(Ty); in get()
1408 UndefValue *UndefValue::get(Type *Ty) { in get() argument
1409 UndefValue *&Entry = Ty->getContext().pImpl->UVConstants[Ty]; in get()
1411 Entry = new UndefValue(Ty); in get()
1508 static Constant *getFoldedCast(Instruction::CastOps opc, Constant *C, Type *Ty, in getFoldedCast() argument
1510 assert(Ty->isFirstClassType() && "Cannot cast to an aggregate type!"); in getFoldedCast()
1512 if (Constant *FC = ConstantFoldCastInstruction(opc, C, Ty)) in getFoldedCast()
1518 LLVMContextImpl *pImpl = Ty->getContext().pImpl; in getFoldedCast()
1523 return pImpl->ExprConstants.getOrCreate(Ty, Key); in getFoldedCast()
1526 Constant *ConstantExpr::getCast(unsigned oc, Constant *C, Type *Ty, in getCast() argument
1530 assert(C && Ty && "Null arguments to getCast"); in getCast()
1531 assert(CastInst::castIsValid(opc, C, Ty) && "Invalid constantexpr cast!"); in getCast()
1537 return getTrunc(C, Ty, OnlyIfReduced); in getCast()
1539 return getZExt(C, Ty, OnlyIfReduced); in getCast()
1541 return getSExt(C, Ty, OnlyIfReduced); in getCast()
1543 return getFPTrunc(C, Ty, OnlyIfReduced); in getCast()
1545 return getFPExtend(C, Ty, OnlyIfReduced); in getCast()
1547 return getUIToFP(C, Ty, OnlyIfReduced); in getCast()
1549 return getSIToFP(C, Ty, OnlyIfReduced); in getCast()
1551 return getFPToUI(C, Ty, OnlyIfReduced); in getCast()
1553 return getFPToSI(C, Ty, OnlyIfReduced); in getCast()
1555 return getPtrToInt(C, Ty, OnlyIfReduced); in getCast()
1557 return getIntToPtr(C, Ty, OnlyIfReduced); in getCast()
1559 return getBitCast(C, Ty, OnlyIfReduced); in getCast()
1561 return getAddrSpaceCast(C, Ty, OnlyIfReduced); in getCast()
1565 Constant *ConstantExpr::getZExtOrBitCast(Constant *C, Type *Ty) { in getZExtOrBitCast() argument
1566 if (C->getType()->getScalarSizeInBits() == Ty->getScalarSizeInBits()) in getZExtOrBitCast()
1567 return getBitCast(C, Ty); in getZExtOrBitCast()
1568 return getZExt(C, Ty); in getZExtOrBitCast()
1571 Constant *ConstantExpr::getSExtOrBitCast(Constant *C, Type *Ty) { in getSExtOrBitCast() argument
1572 if (C->getType()->getScalarSizeInBits() == Ty->getScalarSizeInBits()) in getSExtOrBitCast()
1573 return getBitCast(C, Ty); in getSExtOrBitCast()
1574 return getSExt(C, Ty); in getSExtOrBitCast()
1577 Constant *ConstantExpr::getTruncOrBitCast(Constant *C, Type *Ty) { in getTruncOrBitCast() argument
1578 if (C->getType()->getScalarSizeInBits() == Ty->getScalarSizeInBits()) in getTruncOrBitCast()
1579 return getBitCast(C, Ty); in getTruncOrBitCast()
1580 return getTrunc(C, Ty); in getTruncOrBitCast()
1583 Constant *ConstantExpr::getPointerCast(Constant *S, Type *Ty) { in getPointerCast() argument
1585 assert((Ty->isIntOrIntVectorTy() || Ty->isPtrOrPtrVectorTy()) && in getPointerCast()
1588 if (Ty->isIntOrIntVectorTy()) in getPointerCast()
1589 return getPtrToInt(S, Ty); in getPointerCast()
1592 if (Ty->isPtrOrPtrVectorTy() && SrcAS != Ty->getPointerAddressSpace()) in getPointerCast()
1593 return getAddrSpaceCast(S, Ty); in getPointerCast()
1595 return getBitCast(S, Ty); in getPointerCast()
1599 Type *Ty) { in getPointerBitCastOrAddrSpaceCast() argument
1601 assert(Ty->isPtrOrPtrVectorTy() && "Invalid cast"); in getPointerBitCastOrAddrSpaceCast()
1603 if (S->getType()->getPointerAddressSpace() != Ty->getPointerAddressSpace()) in getPointerBitCastOrAddrSpaceCast()
1604 return getAddrSpaceCast(S, Ty); in getPointerBitCastOrAddrSpaceCast()
1606 return getBitCast(S, Ty); in getPointerBitCastOrAddrSpaceCast()
1609 Constant *ConstantExpr::getIntegerCast(Constant *C, Type *Ty, in getIntegerCast() argument
1612 Ty->isIntOrIntVectorTy() && "Invalid cast"); in getIntegerCast()
1614 unsigned DstBits = Ty->getScalarSizeInBits(); in getIntegerCast()
1619 return getCast(opcode, C, Ty); in getIntegerCast()
1622 Constant *ConstantExpr::getFPCast(Constant *C, Type *Ty) { in getFPCast() argument
1623 assert(C->getType()->isFPOrFPVectorTy() && Ty->isFPOrFPVectorTy() && in getFPCast()
1626 unsigned DstBits = Ty->getScalarSizeInBits(); in getFPCast()
1631 return getCast(opcode, C, Ty); in getFPCast()
1634 Constant *ConstantExpr::getTrunc(Constant *C, Type *Ty, bool OnlyIfReduced) { in getTrunc() argument
1637 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getTrunc()
1641 assert(Ty->isIntOrIntVectorTy() && "Trunc produces only integral"); in getTrunc()
1642 assert(C->getType()->getScalarSizeInBits() > Ty->getScalarSizeInBits()&& in getTrunc()
1645 return getFoldedCast(Instruction::Trunc, C, Ty, OnlyIfReduced); in getTrunc()
1648 Constant *ConstantExpr::getSExt(Constant *C, Type *Ty, bool OnlyIfReduced) { in getSExt() argument
1651 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getSExt()
1655 assert(Ty->isIntOrIntVectorTy() && "SExt produces only integer"); in getSExt()
1656 assert(C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& in getSExt()
1659 return getFoldedCast(Instruction::SExt, C, Ty, OnlyIfReduced); in getSExt()
1662 Constant *ConstantExpr::getZExt(Constant *C, Type *Ty, bool OnlyIfReduced) { in getZExt() argument
1665 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getZExt()
1669 assert(Ty->isIntOrIntVectorTy() && "ZExt produces only integer"); in getZExt()
1670 assert(C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& in getZExt()
1673 return getFoldedCast(Instruction::ZExt, C, Ty, OnlyIfReduced); in getZExt()
1676 Constant *ConstantExpr::getFPTrunc(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPTrunc() argument
1679 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getFPTrunc()
1682 assert(C->getType()->isFPOrFPVectorTy() && Ty->isFPOrFPVectorTy() && in getFPTrunc()
1683 C->getType()->getScalarSizeInBits() > Ty->getScalarSizeInBits()&& in getFPTrunc()
1685 return getFoldedCast(Instruction::FPTrunc, C, Ty, OnlyIfReduced); in getFPTrunc()
1688 Constant *ConstantExpr::getFPExtend(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPExtend() argument
1691 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getFPExtend()
1694 assert(C->getType()->isFPOrFPVectorTy() && Ty->isFPOrFPVectorTy() && in getFPExtend()
1695 C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& in getFPExtend()
1697 return getFoldedCast(Instruction::FPExt, C, Ty, OnlyIfReduced); in getFPExtend()
1700 Constant *ConstantExpr::getUIToFP(Constant *C, Type *Ty, bool OnlyIfReduced) { in getUIToFP() argument
1703 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getUIToFP()
1706 assert(C->getType()->isIntOrIntVectorTy() && Ty->isFPOrFPVectorTy() && in getUIToFP()
1708 return getFoldedCast(Instruction::UIToFP, C, Ty, OnlyIfReduced); in getUIToFP()
1711 Constant *ConstantExpr::getSIToFP(Constant *C, Type *Ty, bool OnlyIfReduced) { in getSIToFP() argument
1714 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getSIToFP()
1717 assert(C->getType()->isIntOrIntVectorTy() && Ty->isFPOrFPVectorTy() && in getSIToFP()
1719 return getFoldedCast(Instruction::SIToFP, C, Ty, OnlyIfReduced); in getSIToFP()
1722 Constant *ConstantExpr::getFPToUI(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPToUI() argument
1725 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getFPToUI()
1728 assert(C->getType()->isFPOrFPVectorTy() && Ty->isIntOrIntVectorTy() && in getFPToUI()
1730 return getFoldedCast(Instruction::FPToUI, C, Ty, OnlyIfReduced); in getFPToUI()
1733 Constant *ConstantExpr::getFPToSI(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPToSI() argument
1736 bool toVec = Ty->getTypeID() == Type::VectorTyID; in getFPToSI()
1739 assert(C->getType()->isFPOrFPVectorTy() && Ty->isIntOrIntVectorTy() && in getFPToSI()
1741 return getFoldedCast(Instruction::FPToSI, C, Ty, OnlyIfReduced); in getFPToSI()
1883 Constant *ConstantExpr::getSizeOf(Type* Ty) { in getSizeOf() argument
1886 Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1); in getSizeOf()
1888 Ty, Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx); in getSizeOf()
1890 Type::getInt64Ty(Ty->getContext())); in getSizeOf()
1893 Constant *ConstantExpr::getAlignOf(Type* Ty) { in getAlignOf() argument
1897 StructType::get(Type::getInt1Ty(Ty->getContext()), Ty, nullptr); in getAlignOf()
1899 Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0); in getAlignOf()
1900 Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1); in getAlignOf()
1904 Type::getInt64Ty(Ty->getContext())); in getAlignOf()
1912 Constant *ConstantExpr::getOffsetOf(Type* Ty, Constant *FieldNo) { in getOffsetOf() argument
1916 ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0), in getOffsetOf()
1920 Ty, Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx); in getOffsetOf()
1922 Type::getInt64Ty(Ty->getContext())); in getOffsetOf()
1964 Constant *ConstantExpr::getGetElementPtr(Type *Ty, Constant *C, in getGetElementPtr() argument
1967 if (!Ty) in getGetElementPtr()
1968 Ty = cast<PointerType>(C->getType()->getScalarType())->getElementType(); in getGetElementPtr()
1971 Ty == in getGetElementPtr()
1974 if (Constant *FC = ConstantFoldGetElementPtr(Ty, C, InBounds, Idxs)) in getGetElementPtr()
1978 Type *DestTy = GetElementPtrInst::getIndexedType(Ty, Idxs); in getGetElementPtr()
2003 Ty); in getGetElementPtr()
2284 Constant *ConstantExpr::getBinOpIdentity(unsigned Opcode, Type *Ty) { in getBinOpIdentity() argument
2293 return Constant::getNullValue(Ty); in getBinOpIdentity()
2296 return ConstantInt::get(Ty, 1); in getBinOpIdentity()
2299 return Constant::getAllOnesValue(Ty); in getBinOpIdentity()
2307 Constant *ConstantExpr::getBinOpAbsorber(unsigned Opcode, Type *Ty) { in getBinOpAbsorber() argument
2314 return Constant::getAllOnesValue(Ty); in getBinOpAbsorber()
2318 return Constant::getNullValue(Ty); in getBinOpAbsorber()
2368 bool ConstantDataSequential::isElementTypeCompatible(Type *Ty) { in isElementTypeCompatible() argument
2369 if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy()) return true; in isElementTypeCompatible()
2370 if (auto *IT = dyn_cast<IntegerType>(Ty)) { in isElementTypeCompatible()
2415 Constant *ConstantDataSequential::getImpl(StringRef Elements, Type *Ty) { in getImpl() argument
2416 assert(isElementTypeCompatible(Ty->getSequentialElementType())); in getImpl()
2420 return ConstantAggregateZero::get(Ty); in getImpl()
2424 *Ty->getContext() in getImpl()
2435 if (Node->getType() == Ty) in getImpl()
2440 if (isa<ArrayType>(Ty)) in getImpl()
2441 return *Entry = new ConstantDataArray(Ty, Slot.first().data()); in getImpl()
2443 assert(isa<VectorType>(Ty)); in getImpl()
2444 return *Entry = new ConstantDataVector(Ty, Slot.first().data()); in getImpl()
2488 Type *Ty = ArrayType::get(Type::getInt8Ty(Context), Elts.size()); in get() local
2490 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*1), Ty); in get()
2493 Type *Ty = ArrayType::get(Type::getInt16Ty(Context), Elts.size()); in get() local
2495 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*2), Ty); in get()
2498 Type *Ty = ArrayType::get(Type::getInt32Ty(Context), Elts.size()); in get() local
2500 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*4), Ty); in get()
2503 Type *Ty = ArrayType::get(Type::getInt64Ty(Context), Elts.size()); in get() local
2505 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*8), Ty); in get()
2508 Type *Ty = ArrayType::get(Type::getFloatTy(Context), Elts.size()); in get() local
2510 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*4), Ty); in get()
2513 Type *Ty = ArrayType::get(Type::getDoubleTy(Context), Elts.size()); in get() local
2515 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 8), Ty); in get()
2525 Type *Ty = ArrayType::get(Type::getHalfTy(Context), Elts.size()); in getFP() local
2527 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 2), Ty); in getFP()
2531 Type *Ty = ArrayType::get(Type::getFloatTy(Context), Elts.size()); in getFP() local
2533 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 4), Ty); in getFP()
2537 Type *Ty = ArrayType::get(Type::getDoubleTy(Context), Elts.size()); in getFP() local
2539 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 8), Ty); in getFP()
2565 Type *Ty = VectorType::get(Type::getInt8Ty(Context), Elts.size()); in get() local
2567 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*1), Ty); in get()
2570 Type *Ty = VectorType::get(Type::getInt16Ty(Context), Elts.size()); in get() local
2572 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*2), Ty); in get()
2575 Type *Ty = VectorType::get(Type::getInt32Ty(Context), Elts.size()); in get() local
2577 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*4), Ty); in get()
2580 Type *Ty = VectorType::get(Type::getInt64Ty(Context), Elts.size()); in get() local
2582 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*8), Ty); in get()
2585 Type *Ty = VectorType::get(Type::getFloatTy(Context), Elts.size()); in get() local
2587 return getImpl(StringRef(const_cast<char *>(Data), Elts.size()*4), Ty); in get()
2590 Type *Ty = VectorType::get(Type::getDoubleTy(Context), Elts.size()); in get() local
2592 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 8), Ty); in get()
2602 Type *Ty = VectorType::get(Type::getHalfTy(Context), Elts.size()); in getFP() local
2604 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 2), Ty); in getFP()
2608 Type *Ty = VectorType::get(Type::getFloatTy(Context), Elts.size()); in getFP() local
2610 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 4), Ty); in getFP()
2614 Type *Ty = VectorType::get(Type::getDoubleTy(Context), Elts.size()); in getFP() local
2616 return getImpl(StringRef(const_cast<char *>(Data), Elts.size() * 8), Ty); in getFP()