Home
last modified time | relevance | path

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

12

/external/llvm/include/llvm/Support/
DTargetFolder.h168 Type *DestTy) const { in CreateCast() argument
169 if (C->getType() == DestTy) in CreateCast()
171 return Fold(ConstantExpr::getCast(Op, C, DestTy)); in CreateCast()
173 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
175 if (C->getType() == DestTy) in CreateIntCast()
177 return Fold(ConstantExpr::getIntegerCast(C, DestTy, isSigned)); in CreateIntCast()
179 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
180 if (C->getType() == DestTy) in CreatePointerCast()
182 return Fold(ConstantExpr::getPointerCast(C, DestTy)); in CreatePointerCast()
184 Constant *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
[all …]
DConstantFolder.h156 Type *DestTy) const { in CreateCast() argument
157 return ConstantExpr::getCast(Op, C, DestTy); in CreateCast()
159 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
160 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast()
162 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
164 return ConstantExpr::getIntegerCast(C, DestTy, isSigned); in CreateIntCast()
166 Constant *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
167 return ConstantExpr::getFPCast(C, DestTy); in CreateFPCast()
170 Constant *CreateBitCast(Constant *C, Type *DestTy) const { in CreateBitCast() argument
171 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast()
[all …]
DNoFolder.h215 Type *DestTy) const { in CreateCast() argument
216 return CastInst::Create(Op, C, DestTy); in CreateCast()
218 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const { in CreatePointerCast() argument
219 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
221 Instruction *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
223 return CastInst::CreateIntegerCast(C, DestTy, isSigned); in CreateIntCast()
225 Instruction *CreateFPCast(Constant *C, Type *DestTy) const { in CreateFPCast() argument
226 return CastInst::CreateFPCast(C, DestTy); in CreateFPCast()
229 Instruction *CreateBitCast(Constant *C, Type *DestTy) const { in CreateBitCast() argument
230 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast()
[all …]
/external/llvm/lib/IR/
DConstantFold.cpp100 static Constant *FoldBitCast(Constant *V, Type *DestTy) { in FoldBitCast() argument
102 if (SrcTy == DestTy) in FoldBitCast()
108 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) in FoldBitCast()
138 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { in FoldBitCast()
145 return Constant::getNullValue(DestTy); in FoldBitCast()
161 return ConstantPointerNull::get(cast<PointerType>(DestTy)); in FoldBitCast()
165 if (DestTy->isIntegerTy()) in FoldBitCast()
170 if (DestTy->isFloatingPointTy()) in FoldBitCast()
171 return ConstantFP::get(DestTy->getContext(), in FoldBitCast()
172 APFloat(DestTy->getFltSemantics(), in FoldBitCast()
[all …]
DVerifier.cpp328 void VerifyBitcastType(const Value *V, Type *DestTy, Type *SrcTy);
902 void Verifier::VerifyBitcastType(const Value *V, Type *DestTy, Type *SrcTy) { in VerifyBitcastType() argument
905 unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); in VerifyBitcastType()
909 Assert1(SrcTy->isPointerTy() == DestTy->isPointerTy(), in VerifyBitcastType()
917 Assert1(!DestTy->isAggregateType(), in VerifyBitcastType()
925 !DestTy->isPtrOrPtrVectorTy() || in VerifyBitcastType()
926 SrcTy->isVectorTy() != DestTy->isVectorTy()) { in VerifyBitcastType()
931 unsigned DstAS = DestTy->getPointerAddressSpace(); in VerifyBitcastType()
1211 Type *DestTy = I.getType(); in visitTruncInst() local
1215 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitTruncInst()
[all …]
DCore.cpp2211 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument
2212 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
2216 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument
2217 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
2221 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument
2222 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
2226 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument
2227 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
2231 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument
2232 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
[all …]
DInstructions.cpp2085 Type *DestTy, in isNoopCast() argument
2103 DestTy->getScalarSizeInBits(); in isNoopCast()
2504 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) { in isCastable() argument
2505 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) in isCastable()
2508 if (SrcTy == DestTy) in isCastable()
2512 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) in isCastable()
2516 DestTy = DestVecTy->getElementType(); in isCastable()
2521 unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr in isCastable()
2524 if (DestTy->isIntegerTy()) { // Casting to integral in isCastable()
2534 } else if (DestTy->isFloatingPointTy()) { // Casting to floating pt in isCastable()
[all …]
DConstantsContext.h171 Type *DestTy) in ExtractValueConstantExpr() argument
172 : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1), in ExtractValueConstantExpr()
197 Type *DestTy) in InsertValueConstantExpr() argument
198 : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), in InsertValueConstantExpr()
217 Type *DestTy);
221 Type *DestTy, in Create() argument
224 new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); in Create()
DConstantFold.h33 Type *DestTy ///< The destination type
/external/llvm/lib/Transforms/InstCombine/
DInstCombineCasts.cpp446 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local
452 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc()
453 CanEvaluateTruncated(Src, DestTy)) { in visitTrunc()
459 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitTrunc()
460 assert(Res->getType() == DestTy); in visitTrunc()
465 if (DestTy->getScalarSizeInBits() == 1) { in visitTrunc()
773 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local
780 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt()
781 CanEvaluateZExtd(Src, DestTy, BitsToClear)) { in visitZExt()
788 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitZExt()
[all …]
DInstCombineLoadStoreAlloca.cpp287 PointerType *DestTy = cast<PointerType>(CI->getType()); in InstCombineLoadCast() local
288 Type *DestPTy = DestTy->getElementType(); in InstCombineLoadCast()
292 if (DestTy->getAddressSpace() != SrcTy->getAddressSpace()) in InstCombineLoadCast()
/external/llvm/include/llvm/IR/
DIRBuilder.h1026 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") {
1027 return CreateCast(Instruction::Trunc, V, DestTy, Name);
1029 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") {
1030 return CreateCast(Instruction::ZExt, V, DestTy, Name);
1032 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
1033 return CreateCast(Instruction::SExt, V, DestTy, Name);
1037 Value *CreateZExtOrTrunc(Value *V, Type *DestTy,
1040 DestTy->isIntOrIntVectorTy() &&
1043 if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits())
1044 return CreateZExt(V, DestTy, Name);
[all …]
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp479 Type *DestTy = pickScalarType(); in Act() local
484 DestTy = pickVectorType(VecTy->getNumElements()); in Act()
488 if (VTy == DestTy) return; in Act()
492 if (!DestTy->isPointerTy()) in Act()
493 DestTy = PointerType::get(DestTy, 0); in Act()
495 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act()
499 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); in Act()
504 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act()
509 DestTy->getScalarType()->isIntegerTy()) { in Act()
512 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act()
[all …]
/external/llvm/utils/TableGen/
DCallingConvEmitter.cpp195 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
196 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
204 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
205 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
208 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
209 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
/external/llvm/lib/Analysis/
DConstantFolding.cpp48 static Constant *FoldBitCast(Constant *C, Type *DestTy, in FoldBitCast() argument
51 if (C->isNullValue() && !DestTy->isX86_MMXTy()) in FoldBitCast()
52 return Constant::getNullValue(DestTy); in FoldBitCast()
53 if (C->isAllOnesValue() && !DestTy->isX86_MMXTy()) in FoldBitCast()
54 return Constant::getAllOnesValue(DestTy); in FoldBitCast()
57 if (IntegerType *IT = dyn_cast<IntegerType>(DestTy)) { in FoldBitCast()
60 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
77 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
95 VectorType *DestVTy = dyn_cast<VectorType>(DestTy); in FoldBitCast()
97 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
[all …]
/external/llvm/include/llvm-c/
DCore.h2500 LLVMTypeRef DestTy, const char *Name);
2502 LLVMTypeRef DestTy, const char *Name);
2504 LLVMTypeRef DestTy, const char *Name);
2506 LLVMTypeRef DestTy, const char *Name);
2508 LLVMTypeRef DestTy, const char *Name);
2510 LLVMTypeRef DestTy, const char *Name);
2512 LLVMTypeRef DestTy, const char *Name);
2514 LLVMTypeRef DestTy, const char *Name);
2516 LLVMTypeRef DestTy, const char *Name);
2518 LLVMTypeRef DestTy, const char *Name);
[all …]
/external/llvm/lib/Target/NVPTX/
DNVPTXGenericToNVVM.cpp177 Type *DestTy = PointerType::get(Type::getInt8Ty(Context), AddrSpace); in getOrInsertCVTA() local
178 CVTA = Builder.CreateBitCast(GV, DestTy, "cvta"); in getOrInsertCVTA()
184 ParamTypes.push_back(DestTy); in getOrInsertCVTA()
190 DestTy = in getOrInsertCVTA()
192 CVTA = Builder.CreateBitCast(CVTA, DestTy, "cvta"); in getOrInsertCVTA()
/external/llvm/include/llvm/Target/
DTargetCallingConv.td110 ValueType DestTy = destTy;
116 ValueType DestTy = destTy;
122 ValueType DestTy = destTy;
/external/llvm/include/llvm/Analysis/
DConstantFolding.h55 Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
/external/clang/lib/CodeGen/
DCGExprCXX.cpp1791 QualType SrcTy, QualType DestTy, in EmitDynamicCastCall() argument
1795 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastCall()
1797 if (const PointerType *PTy = DestTy->getAs<PointerType>()) { in EmitDynamicCastCall()
1822 if (const PointerType *DestPTy = DestTy->getAs<PointerType>()) { in EmitDynamicCastCall()
1827 DestRecordTy = DestTy->castAs<ReferenceType>()->getPointeeType(); in EmitDynamicCastCall()
1855 if (DestTy->isReferenceType()) { in EmitDynamicCastCall()
1870 QualType DestTy) { in EmitDynamicCastToNull() argument
1871 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastToNull()
1872 if (DestTy->isPointerType()) in EmitDynamicCastToNull()
1885 QualType DestTy = DCE->getTypeAsWritten(); in EmitDynamicCast() local
[all …]
DCGExprConstant.cpp1067 llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); in EmitConstantValue() local
1074 if (isa<llvm::ArrayType>(DestTy)) { in EmitConstantValue()
1091 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1092 return llvm::ConstantExpr::getBitCast(C, DestTy); in EmitConstantValue()
1094 return llvm::ConstantExpr::getPtrToInt(C, DestTy); in EmitConstantValue()
1100 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1101 return llvm::ConstantExpr::getIntToPtr(C, DestTy); in EmitConstantValue()
1104 if (C->getType() != DestTy) in EmitConstantValue()
1105 return llvm::ConstantExpr::getTrunc(C, DestTy); in EmitConstantValue()
DCGExprComplex.cpp144 ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy);
411 QualType DestTy) { in EmitCast() argument
428 CGF.ConvertType(CGF.getContext().getPointerType(DestTy))); in EmitCast()
429 return EmitLoadOfLValue(CGF.MakeAddrLValue(V, DestTy, in EmitCast()
479 Op->getType(), DestTy); in EmitCast()
485 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy); in EmitCast()
DCGExprScalar.cpp1196 QualType DestTy = CE->getType(); in VisitCastExpr() local
1199 if (!DestTy->isVoidType()) in VisitCastExpr()
1214 ConvertType(CGF.getContext().getPointerType(DestTy))); in VisitCastExpr()
1215 return EmitLoadOfLValue(CGF.MakeNaturalAlignAddrLValue(V, DestTy)); in VisitCastExpr()
1223 return Builder.CreateBitCast(Src, ConvertType(DestTy)); in VisitCastExpr()
1232 const CXXRecordDecl *DerivedClassDecl = DestTy->getPointeeCXXRecordDecl(); in VisitCastExpr()
1241 V, DestTy->getPointeeType()); in VisitCastExpr()
1291 cast<llvm::PointerType>(ConvertType(DestTy))); in VisitCastExpr()
1341 assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy)); in VisitCastExpr()
1355 return Builder.CreateIntToPtr(IntResult, ConvertType(DestTy)); in VisitCastExpr()
[all …]
/external/llvm/lib/ExecutionEngine/
DExecutionEngine.cpp686 Type* DestTy = CE->getType(); in getConstantValue() local
690 assert(DestTy->isFloatingPointTy() && "invalid bitcast"); in getConstantValue()
691 if (DestTy->isFloatTy()) in getConstantValue()
693 else if (DestTy->isDoubleTy()) in getConstantValue()
697 assert(DestTy->isIntegerTy(32) && "Invalid bitcast"); in getConstantValue()
701 assert(DestTy->isIntegerTy(64) && "Invalid bitcast"); in getConstantValue()
705 assert(DestTy->isPointerTy() && "Invalid bitcast"); in getConstantValue()
/external/clang/lib/Sema/
DSemaCast.cpp1600 QualType SrcTy, DestTy; in CheckCompatibleReinterpretCast() local
1606 DestTy = DestType->getPointeeType(); in CheckCompatibleReinterpretCast()
1612 DestTy = DestType->getPointeeType(); in CheckCompatibleReinterpretCast()
1616 if (Context.hasSameUnqualifiedType(DestTy, SrcTy)) { in CheckCompatibleReinterpretCast()
1620 if (DestTy->isAnyCharacterType() || DestTy->isVoidType() || in CheckCompatibleReinterpretCast()
1625 if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) { in CheckCompatibleReinterpretCast()
1630 if ((SrcTy->isUnsignedIntegerType() && DestTy->isSignedIntegerType()) || in CheckCompatibleReinterpretCast()
1631 (SrcTy->isSignedIntegerType() && DestTy->isUnsignedIntegerType())) { in CheckCompatibleReinterpretCast()
1632 if (Context.getTypeSize(DestTy) == Context.getTypeSize(SrcTy)) { in CheckCompatibleReinterpretCast()

12