Home
last modified time | relevance | path

Searched refs:DestTy (Results 1 – 25 of 54) sorted by relevance

123

/NextBSD/contrib/llvm/include/llvm/Analysis/
HDTargetFolder.h169 Type *DestTy) const { in CreateCast() argument
170 if (C->getType() == DestTy) in CreateCast()
172 return Fold(ConstantExpr::getCast(Op, C, DestTy)); in CreateCast()
174 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
176 if (C->getType() == DestTy) in CreateIntCast()
178 return Fold(ConstantExpr::getIntegerCast(C, DestTy, isSigned)); in CreateIntCast()
180 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
181 if (C->getType() == DestTy) in CreatePointerCast()
183 return Fold(ConstantExpr::getPointerCast(C, DestTy)); in CreatePointerCast()
185 Constant *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
[all …]
HDConstantFolding.h55 Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
/NextBSD/contrib/llvm/include/llvm/IR/
HDConstantFolder.h157 Type *DestTy) const { in CreateCast() argument
158 return ConstantExpr::getCast(Op, C, DestTy); in CreateCast()
160 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
161 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast()
165 Type *DestTy) const { in CreatePointerBitCastOrAddrSpaceCast() argument
166 return ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy); in CreatePointerBitCastOrAddrSpaceCast()
169 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
171 return ConstantExpr::getIntegerCast(C, DestTy, isSigned); in CreateIntCast()
173 Constant *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
174 return ConstantExpr::getFPCast(C, DestTy); in CreateFPCast()
[all …]
HDNoFolder.h216 Type *DestTy) const { in CreateCast() argument
217 return CastInst::Create(Op, C, DestTy); in CreateCast()
219 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
220 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
222 Instruction *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
224 return CastInst::CreateIntegerCast(C, DestTy, isSigned); in CreateIntCast()
226 Instruction *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
227 return CastInst::CreateFPCast(C, DestTy); in CreateFPCast()
230 Instruction *CreateBitCast(Constant *C, Type *DestTy) const { in CreateBitCast() argument
231 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast()
[all …]
HDIRBuilder.h1189 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") {
1190 return CreateCast(Instruction::Trunc, V, DestTy, Name);
1192 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") {
1193 return CreateCast(Instruction::ZExt, V, DestTy, Name);
1195 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
1196 return CreateCast(Instruction::SExt, V, DestTy, Name);
1200 Value *CreateZExtOrTrunc(Value *V, Type *DestTy,
1203 DestTy->isIntOrIntVectorTy() &&
1206 if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits())
1207 return CreateZExt(V, DestTy, Name);
[all …]
HDAutoUpgrade.h55 Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
61 Value *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
/NextBSD/contrib/llvm/lib/Transforms/InstCombine/
HDInstCombineCasts.cpp453 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local
459 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc()
460 CanEvaluateTruncated(Src, DestTy, *this, &CI)) { in visitTrunc()
466 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitTrunc()
467 assert(Res->getType() == DestTy); in visitTrunc()
472 if (DestTy->getScalarSizeInBits() == 1) { in visitTrunc()
782 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local
789 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt()
790 CanEvaluateZExtd(Src, DestTy, BitsToClear, *this, &CI)) { in visitZExt()
797 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitZExt()
[all …]
/NextBSD/contrib/llvm/lib/IR/
HDConstantFold.cpp102 static Constant *FoldBitCast(Constant *V, Type *DestTy) { in FoldBitCast() argument
104 if (SrcTy == DestTy) in FoldBitCast()
110 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) in FoldBitCast()
141 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { in FoldBitCast()
148 return Constant::getNullValue(DestTy); in FoldBitCast()
164 return ConstantPointerNull::get(cast<PointerType>(DestTy)); in FoldBitCast()
168 if (DestTy->isIntegerTy()) in FoldBitCast()
174 if (DestTy->isFloatingPointTy() && !DestTy->isPPC_FP128Ty()) in FoldBitCast()
175 return ConstantFP::get(DestTy->getContext(), in FoldBitCast()
176 APFloat(DestTy->getFltSemantics(), in FoldBitCast()
[all …]
HDVerifier.cpp1943 Type *DestTy = I.getType(); in visitTruncInst() local
1947 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitTruncInst()
1950 Assert(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I); in visitTruncInst()
1951 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst()
1961 Type *DestTy = I.getType(); in visitZExtInst() local
1965 Assert(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I); in visitZExtInst()
1966 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst()
1969 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitZExtInst()
1979 Type *DestTy = I.getType(); in visitSExtInst() local
1983 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitSExtInst()
[all …]
HDCore.cpp2573 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument
2574 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
2578 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument
2579 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
2583 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument
2584 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
2588 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument
2589 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
2593 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument
2594 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
[all …]
HDConstantsContext.h171 Type *DestTy) in ExtractValueConstantExpr() argument
172 : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1), in ExtractValueConstantExpr()
196 ArrayRef<unsigned> IdxList, Type *DestTy) in InsertValueConstantExpr() argument
197 : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), in InsertValueConstantExpr()
216 ArrayRef<Constant *> IdxList, Type *DestTy);
221 Type *DestTy, in Create() argument
225 IdxList, DestTy, Flags); in Create()
229 Type *DestTy, unsigned Flags) { in Create() argument
231 GetElementPtrConstantExpr(SrcElementTy, C, IdxList, DestTy); in Create()
HDInstructions.cpp1980 Type *DestTy, in isNoopCast() argument
2000 DestTy->getScalarSizeInBits(); in isNoopCast()
2475 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) { in isCastable() argument
2476 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) in isCastable()
2479 if (SrcTy == DestTy) in isCastable()
2483 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) in isCastable()
2487 DestTy = DestVecTy->getElementType(); in isCastable()
2492 unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr in isCastable()
2495 if (DestTy->isIntegerTy()) { // Casting to integral in isCastable()
2505 if (DestTy->isFloatingPointTy()) { // Casting to floating pt in isCastable()
[all …]
HDAutoUpgrade.cpp749 Instruction *llvm::UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy, in UpgradeBitCastInst() argument
756 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastInst()
757 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastInst()
765 return CastInst::Create(Instruction::IntToPtr, Temp, DestTy); in UpgradeBitCastInst()
771 Value *llvm::UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy) { in UpgradeBitCastExpr() argument
776 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastExpr()
777 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastExpr()
785 DestTy); in UpgradeBitCastExpr()
HDConstantFold.h33 Type *DestTy ///< The destination type
/NextBSD/contrib/llvm/tools/llvm-stress/
HDllvm-stress.cpp489 Type *DestTy = pickScalarType(); in Act() local
494 DestTy = pickVectorType(VecTy->getNumElements()); in Act()
498 if (VTy == DestTy) return; in Act()
502 if (!DestTy->isPointerTy()) in Act()
503 DestTy = PointerType::get(DestTy, 0); in Act()
505 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act()
509 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); in Act()
514 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act()
519 DestTy->getScalarType()->isIntegerTy()) { in Act()
522 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act()
[all …]
/NextBSD/contrib/llvm/utils/TableGen/
HDCallingConvEmitter.cpp222 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
223 MVT::SimpleValueType DestVT = getValueType(DestTy); in EmitAction()
236 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
237 MVT::SimpleValueType DestVT = getValueType(DestTy); in EmitAction()
251 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
252 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
255 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
256 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
/NextBSD/contrib/llvm/lib/Analysis/
HDConstantFolding.cpp53 static Constant *FoldBitCast(Constant *C, Type *DestTy, const DataLayout &DL) { in FoldBitCast() argument
55 if (C->isNullValue() && !DestTy->isX86_MMXTy()) in FoldBitCast()
56 return Constant::getNullValue(DestTy); in FoldBitCast()
57 if (C->isAllOnesValue() && !DestTy->isX86_MMXTy() && in FoldBitCast()
58 !DestTy->isPtrOrPtrVectorTy()) // Don't get ones for ptr types! in FoldBitCast()
59 return Constant::getAllOnesValue(DestTy); in FoldBitCast()
62 if (IntegerType *IT = dyn_cast<IntegerType>(DestTy)) { in FoldBitCast()
65 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
82 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
100 VectorType *DestVTy = dyn_cast<VectorType>(DestTy); in FoldBitCast()
[all …]
/NextBSD/contrib/llvm/include/llvm-c/
HDCore.h2786 LLVMTypeRef DestTy, const char *Name);
2788 LLVMTypeRef DestTy, const char *Name);
2790 LLVMTypeRef DestTy, const char *Name);
2792 LLVMTypeRef DestTy, const char *Name);
2794 LLVMTypeRef DestTy, const char *Name);
2796 LLVMTypeRef DestTy, const char *Name);
2798 LLVMTypeRef DestTy, const char *Name);
2800 LLVMTypeRef DestTy, const char *Name);
2802 LLVMTypeRef DestTy, const char *Name);
2804 LLVMTypeRef DestTy, const char *Name);
[all …]
/NextBSD/contrib/llvm/lib/Target/NVPTX/
HDNVPTXGenericToNVVM.cpp182 Type *DestTy = PointerType::get(Type::getInt8Ty(Context), AddrSpace); in getOrInsertCVTA() local
183 CVTA = Builder.CreateBitCast(GV, DestTy, "cvta"); in getOrInsertCVTA()
189 ParamTypes.push_back(DestTy); in getOrInsertCVTA()
195 DestTy = in getOrInsertCVTA()
197 CVTA = Builder.CreateBitCast(CVTA, DestTy, "cvta"); in getOrInsertCVTA()
HDNVPTXFavorNonGenericAddrSpaces.cpp131 PointerType *DestTy = cast<PointerType>(Cast->getType()); in isEliminableAddrSpaceCast() local
136 if (SrcTy->getElementType() != DestTy->getElementType()) in isEliminableAddrSpaceCast()
142 DestTy->getAddressSpace() == AddressSpace::ADDRESS_SPACE_GENERIC); in isEliminableAddrSpaceCast()
/NextBSD/contrib/llvm/lib/Transforms/IPO/
HDMergeFunctions.cpp1307 static Value *createCast(IRBuilder<false> &Builder, Value *V, Type *DestTy) { in createCast() argument
1310 assert(DestTy->isStructTy()); in createCast()
1311 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements()); in createCast()
1312 Value *Result = UndefValue::get(DestTy); in createCast()
1316 DestTy->getStructElementType(I)); in createCast()
1323 assert(!DestTy->isStructTy()); in createCast()
1324 if (SrcTy->isIntegerTy() && DestTy->isPointerTy()) in createCast()
1325 return Builder.CreateIntToPtr(V, DestTy); in createCast()
1326 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy()) in createCast()
1327 return Builder.CreatePtrToInt(V, DestTy); in createCast()
[all …]
/NextBSD/contrib/llvm/include/llvm/Target/
HDTargetCallingConv.td122 ValueType DestTy = destTy;
128 ValueType DestTy = destTy;
134 ValueType DestTy = destTy;
140 ValueType DestTy = destTy;
/NextBSD/contrib/llvm/tools/clang/lib/CodeGen/
HDCGExprConstant.cpp1254 llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); in EmitConstantValue() local
1261 if (isa<llvm::ArrayType>(DestTy)) { in EmitConstantValue()
1280 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1281 return llvm::ConstantExpr::getPointerCast(C, DestTy); in EmitConstantValue()
1283 return llvm::ConstantExpr::getPtrToInt(C, DestTy); in EmitConstantValue()
1289 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1290 return llvm::ConstantExpr::getIntToPtr(C, DestTy); in EmitConstantValue()
1293 if (C->getType() != DestTy) in EmitConstantValue()
1294 return llvm::ConstantExpr::getTrunc(C, DestTy); in EmitConstantValue()
HDCGExprScalar.cpp1362 QualType DestTy = CE->getType(); in VisitCastExpr() local
1365 if (!DestTy->isVoidType()) in VisitCastExpr()
1380 ConvertType(CGF.getContext().getPointerType(DestTy))); in VisitCastExpr()
1381 return EmitLoadOfLValue(CGF.MakeNaturalAlignAddrLValue(V, DestTy), in VisitCastExpr()
1391 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr()
1399 if (auto PT = DestTy->getAs<PointerType>()) in VisitCastExpr()
1410 return Builder.CreateAddrSpaceCast(Src, ConvertType(DestTy)); in VisitCastExpr()
1419 const CXXRecordDecl *DerivedClassDecl = DestTy->getPointeeCXXRecordDecl(); in VisitCastExpr()
1433 Derived, DestTy->getPointeeType()); in VisitCastExpr()
1436 CGF.EmitVTablePtrCheckForCast(DestTy->getPointeeType(), Derived, in VisitCastExpr()
[all …]
HDCGExprCXX.cpp1747 QualType DestTy) { in EmitDynamicCastToNull() argument
1748 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastToNull()
1749 if (DestTy->isPointerType()) in EmitDynamicCastToNull()
1763 QualType DestTy = DCE->getTypeAsWritten(); in EmitDynamicCast() local
1766 if (llvm::Value *T = EmitDynamicCastToNull(*this, DestTy)) in EmitDynamicCast()
1774 const PointerType *DestPTy = DestTy->getAs<PointerType>(); in EmitDynamicCast()
1786 DestRecordTy = DestTy->castAs<ReferenceType>()->getPointeeType(); in EmitDynamicCast()
1813 DestTy); in EmitDynamicCast()
1818 DestTy, DestRecordTy, CastEnd); in EmitDynamicCast()

123