/external/llvm/include/llvm/Support/ |
D | TargetFolder.h | 168 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 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast() 182 Constant *CreateBitCast(Constant *C, Type *DestTy) const { in CreateBitCast() argument 183 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast() [all …]
|
D | ConstantFolder.h | 156 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 …]
|
D | NoFolder.h | 215 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/VMCore/ |
D | ConstantFold.cpp | 95 static Constant *FoldBitCast(Constant *V, Type *DestTy) { in FoldBitCast() argument 97 if (SrcTy == DestTy) in FoldBitCast() 103 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) in FoldBitCast() 133 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { in FoldBitCast() 140 return Constant::getNullValue(DestTy); in FoldBitCast() 156 return ConstantPointerNull::get(cast<PointerType>(DestTy)); in FoldBitCast() 160 if (DestTy->isIntegerTy()) in FoldBitCast() 165 if (DestTy->isFloatingPointTy()) in FoldBitCast() 166 return ConstantFP::get(DestTy->getContext(), in FoldBitCast() 168 !DestTy->isPPC_FP128Ty())); in FoldBitCast() [all …]
|
D | Verifier.cpp | 865 Type *DestTy = I.getType(); in visitTruncInst() local 869 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitTruncInst() 872 Assert1(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I); in visitTruncInst() 873 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst() 883 Type *DestTy = I.getType(); in visitZExtInst() local 887 Assert1(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I); in visitZExtInst() 888 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst() 891 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitZExtInst() 901 Type *DestTy = I.getType(); in visitSExtInst() local 905 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitSExtInst() [all …]
|
D | Core.cpp | 2105 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument 2106 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc() 2110 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument 2111 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt() 2115 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument 2116 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt() 2120 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument 2121 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI() 2125 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument 2126 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI() [all …]
|
D | ConstantsContext.h | 171 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()
|
D | Instructions.cpp | 2075 Type *DestTy, in isNoopCast() argument 2093 DestTy->getScalarSizeInBits(); in isNoopCast() 2448 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) { in isCastable() argument 2449 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) in isCastable() 2452 if (SrcTy == DestTy) in isCastable() 2456 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) in isCastable() 2460 DestTy = DestVecTy->getElementType(); in isCastable() 2465 unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr in isCastable() 2468 if (DestTy->isIntegerTy()) { // Casting to integral in isCastable() 2478 } else if (DestTy->isFloatingPointTy()) { // Casting to floating pt in isCastable() [all …]
|
D | ConstantFold.h | 33 Type *DestTy ///< The destination type
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 437 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local 443 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc() 444 CanEvaluateTruncated(Src, DestTy)) { in visitTrunc() 450 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitTrunc() 451 assert(Res->getType() == DestTy); in visitTrunc() 456 if (DestTy->getScalarSizeInBits() == 1) { in visitTrunc() 754 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local 761 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt() 762 CanEvaluateZExtd(Src, DestTy, BitsToClear)) { in visitZExt() 769 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitZExt() [all …]
|
D | InstCombineLoadStoreAlloca.cpp | 298 PointerType *DestTy = cast<PointerType>(CI->getType()); in InstCombineLoadCast() local 299 Type *DestPTy = DestTy->getElementType(); in InstCombineLoadCast() 303 if (DestTy->getAddressSpace() != SrcTy->getAddressSpace()) in InstCombineLoadCast()
|
/external/llvm/include/llvm/ |
D | IRBuilder.h | 964 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") { 965 return CreateCast(Instruction::Trunc, V, DestTy, Name); 967 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") { 968 return CreateCast(Instruction::ZExt, V, DestTy, Name); 970 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") { 971 return CreateCast(Instruction::SExt, V, DestTy, Name); 973 Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = ""){ 974 return CreateCast(Instruction::FPToUI, V, DestTy, Name); 976 Value *CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = ""){ 977 return CreateCast(Instruction::FPToSI, V, DestTy, Name); [all …]
|
/external/llvm/tools/llvm-stress/ |
D | llvm-stress.cpp | 477 Type *DestTy = pickScalarType(); in Act() local 482 DestTy = pickVectorType(VecTy->getNumElements()); in Act() 486 if (VTy == DestTy) return; in Act() 490 if (!DestTy->isPointerTy()) in Act() 491 DestTy = PointerType::get(DestTy, 0); in Act() 493 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act() 497 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); in Act() 502 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act() 507 DestTy->getScalarType()->isIntegerTy()) { in Act() 510 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act() [all …]
|
/external/llvm/utils/TableGen/ |
D | CallingConvEmitter.cpp | 194 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local 195 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction() 203 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local 204 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction() 207 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local 208 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 47 static Constant *FoldBitCast(Constant *C, Type *DestTy, in FoldBitCast() argument 50 if (C->isNullValue() && !DestTy->isX86_MMXTy()) in FoldBitCast() 51 return Constant::getNullValue(DestTy); in FoldBitCast() 52 if (C->isAllOnesValue() && !DestTy->isX86_MMXTy()) in FoldBitCast() 53 return Constant::getAllOnesValue(DestTy); in FoldBitCast() 56 if (IntegerType *IT = dyn_cast<IntegerType>(DestTy)) { in FoldBitCast() 59 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 92 VectorType *DestVTy = dyn_cast<VectorType>(DestTy); in FoldBitCast() 94 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 100 return FoldBitCast(ConstantVector::get(Ops), DestTy, TD); in FoldBitCast() [all …]
|
/external/llvm/include/llvm-c/ |
D | Core.h | 2415 LLVMTypeRef DestTy, const char *Name); 2417 LLVMTypeRef DestTy, const char *Name); 2419 LLVMTypeRef DestTy, const char *Name); 2421 LLVMTypeRef DestTy, const char *Name); 2423 LLVMTypeRef DestTy, const char *Name); 2425 LLVMTypeRef DestTy, const char *Name); 2427 LLVMTypeRef DestTy, const char *Name); 2429 LLVMTypeRef DestTy, const char *Name); 2431 LLVMTypeRef DestTy, const char *Name); 2433 LLVMTypeRef DestTy, const char *Name); [all …]
|
/external/clang/lib/CodeGen/ |
D | CGExprComplex.cpp | 145 ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy); 370 QualType DestTy) { in EmitCast() argument 386 CGF.ConvertType(CGF.getContext().getPointerType(DestTy))); in EmitCast() 388 return EmitLoadOfComplex(V, DestTy.isVolatileQualified()); in EmitCast() 438 DestTy = DestTy->getAs<ComplexType>()->getElementType(); in EmitCast() 439 Elt = CGF.EmitScalarConversion(Elt, Op->getType(), DestTy); in EmitCast() 449 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy); in EmitCast()
|
D | CGExprCXX.cpp | 1699 QualType SrcTy, QualType DestTy, in EmitDynamicCastCall() argument 1703 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastCall() 1705 if (const PointerType *PTy = DestTy->getAs<PointerType>()) { in EmitDynamicCastCall() 1730 if (const PointerType *DestPTy = DestTy->getAs<PointerType>()) { in EmitDynamicCastCall() 1735 DestRecordTy = DestTy->castAs<ReferenceType>()->getPointeeType(); in EmitDynamicCastCall() 1757 if (DestTy->isReferenceType()) { in EmitDynamicCastCall() 1772 QualType DestTy) { in EmitDynamicCastToNull() argument 1773 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastToNull() 1774 if (DestTy->isPointerType()) in EmitDynamicCastToNull() 1787 QualType DestTy = DCE->getTypeAsWritten(); in EmitDynamicCast() local [all …]
|
D | CGExprConstant.cpp | 1070 llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); in EmitConstantValue() local 1077 if (isa<llvm::ArrayType>(DestTy)) { in EmitConstantValue() 1094 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue() 1095 return llvm::ConstantExpr::getBitCast(C, DestTy); in EmitConstantValue() 1097 return llvm::ConstantExpr::getPtrToInt(C, DestTy); in EmitConstantValue() 1103 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue() 1104 return llvm::ConstantExpr::getIntToPtr(C, DestTy); in EmitConstantValue() 1107 if (C->getType() != DestTy) in EmitConstantValue() 1108 return llvm::ConstantExpr::getTrunc(C, DestTy); in EmitConstantValue()
|
D | CGExprScalar.cpp | 1022 QualType DestTy = CE->getType(); in VisitCastExpr() local 1025 if (!DestTy->isVoidType()) in VisitCastExpr() 1040 ConvertType(CGF.getContext().getPointerType(DestTy))); in VisitCastExpr() 1041 return EmitLoadOfLValue(CGF.MakeNaturalAlignAddrLValue(V, DestTy)); in VisitCastExpr() 1049 return Builder.CreateBitCast(Src, ConvertType(DestTy)); in VisitCastExpr() 1059 DestTy->getCXXRecordDeclForPointerType(); in VisitCastExpr() 1110 cast<llvm::PointerType>(ConvertType(DestTy))); in VisitCastExpr() 1160 assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy)); in VisitCastExpr() 1174 return Builder.CreateIntToPtr(IntResult, ConvertType(DestTy)); in VisitCastExpr() 1177 assert(!DestTy->isBooleanType() && "bool should use PointerToBool"); in VisitCastExpr() [all …]
|
/external/llvm/include/llvm/Target/ |
D | TargetCallingConv.td | 110 ValueType DestTy = destTy; 116 ValueType DestTy = destTy; 122 ValueType DestTy = destTy;
|
/external/llvm/include/llvm/Analysis/ |
D | ConstantFolding.h | 55 Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
|
/external/clang/lib/Sema/ |
D | SemaCast.cpp | 1439 QualType SrcTy, DestTy; in CheckCompatibleReinterpretCast() local 1445 DestTy = DestType->getPointeeType(); in CheckCompatibleReinterpretCast() 1451 DestTy = DestType->getPointeeType(); in CheckCompatibleReinterpretCast() 1455 if (Context.hasSameUnqualifiedType(DestTy, SrcTy)) { in CheckCompatibleReinterpretCast() 1459 if (DestTy->isAnyCharacterType() || DestTy->isVoidType() || in CheckCompatibleReinterpretCast() 1464 if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) { in CheckCompatibleReinterpretCast() 1469 if ((SrcTy->isUnsignedIntegerType() && DestTy->isSignedIntegerType()) || in CheckCompatibleReinterpretCast() 1470 (SrcTy->isSignedIntegerType() && DestTy->isUnsignedIntegerType())) { in CheckCompatibleReinterpretCast() 1471 if (Context.getTypeSize(DestTy) == Context.getTypeSize(SrcTy)) { in CheckCompatibleReinterpretCast()
|
/external/llvm/lib/ExecutionEngine/ |
D | ExecutionEngine.cpp | 662 Type* DestTy = CE->getType(); in getConstantValue() local 666 assert(DestTy->isFloatingPointTy() && "invalid bitcast"); in getConstantValue() 667 if (DestTy->isFloatTy()) in getConstantValue() 669 else if (DestTy->isDoubleTy()) in getConstantValue() 673 assert(DestTy->isIntegerTy(32) && "Invalid bitcast"); in getConstantValue() 677 assert(DestTy->isIntegerTy(64) && "Invalid bitcast"); in getConstantValue() 681 assert(DestTy->isPointerTy() && "Invalid bitcast"); in getConstantValue()
|
/external/llvm/lib/AsmParser/ |
D | LLParser.cpp | 2130 Type *DestTy = 0; in ParseValID() local 2136 ParseType(DestTy) || in ParseValID() 2139 if (!CastInst::castIsValid((Instruction::CastOps)Opc, SrcVal, DestTy)) in ParseValID() 2142 getTypeString(DestTy) + "'"); in ParseValID() 2144 SrcVal, DestTy); in ParseValID() 3402 Type *DestTy = 0; in ParseCast() local 3405 ParseType(DestTy)) in ParseCast() 3408 if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy)) { in ParseCast() 3409 CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy); in ParseCast() 3412 getTypeString(DestTy) + "'"); in ParseCast() [all …]
|