/external/llvm/include/llvm/Support/ |
H A D | TargetFolder.h | 168 Type *DestTy) const { 169 if (C->getType() == DestTy) 171 return Fold(ConstantExpr::getCast(Op, C, DestTy)); 173 Constant *CreateIntCast(Constant *C, Type *DestTy, argument 175 if (C->getType() == DestTy) 177 return Fold(ConstantExpr::getIntegerCast(C, DestTy, isSigned)); 179 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { 180 return ConstantExpr::getPointerCast(C, DestTy); 182 Constant *CreateBitCast(Constant *C, Type *DestTy) const { 183 return CreateCast(Instruction::BitCast, C, DestTy); [all...] |
H A D | ConstantFolder.h | 156 Type *DestTy) const { 157 return ConstantExpr::getCast(Op, C, DestTy); 159 Constant *CreatePointerCast(Constant *C, Type *DestTy) const { 160 return ConstantExpr::getPointerCast(C, DestTy); 162 Constant *CreateIntCast(Constant *C, Type *DestTy, argument 164 return ConstantExpr::getIntegerCast(C, DestTy, isSigned); 166 Constant *CreateFPCast(Constant *C, Type *DestTy) const { 167 return ConstantExpr::getFPCast(C, DestTy); 170 Constant *CreateBitCast(Constant *C, Type *DestTy) const { 171 return CreateCast(Instruction::BitCast, C, DestTy); [all...] |
H A D | NoFolder.h | 215 Type *DestTy) const { 216 return CastInst::Create(Op, C, DestTy); 218 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const { 219 return CastInst::CreatePointerCast(C, DestTy); 221 Instruction *CreateIntCast(Constant *C, Type *DestTy, argument 223 return CastInst::CreateIntegerCast(C, DestTy, isSigned); 225 Instruction *CreateFPCast(Constant *C, Type *DestTy) const { 226 return CastInst::CreateFPCast(C, DestTy); 229 Instruction *CreateBitCast(Constant *C, Type *DestTy) const { 230 return CreateCast(Instruction::BitCast, C, DestTy); [all...] |
/external/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineCasts.cpp | 437 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); local 443 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && 444 CanEvaluateTruncated(Src, DestTy)) { 450 Value *Res = EvaluateInDifferentType(Src, DestTy, false); 451 assert(Res->getType() == DestTy); 456 if (DestTy->getScalarSizeInBits() == 1) { 754 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); local 761 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) 1055 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); local 1392 OptimizeVectorResize(Value *InVal, VectorType *DestTy, InstCombiner &IC) argument 1590 Type *DestTy = CI.getType(); local 1643 Type *DestTy = CI.getType(); local [all...] |
H A D | InstCombineLoadStoreAlloca.cpp | 298 PointerType *DestTy = cast<PointerType>(CI->getType()); local 299 Type *DestPTy = DestTy->getElementType(); 303 if (DestTy->getAddressSpace() != SrcTy->getAddressSpace())
|
/external/llvm/lib/VMCore/ |
H A D | ConstantFold.cpp | 95 static Constant *FoldBitCast(Constant *V, Type *DestTy) { argument 97 if (SrcTy == DestTy) 103 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) 133 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { 140 return Constant::getNullValue(DestTy); 156 return ConstantPointerNull::get(cast<PointerType>(DestTy)); 160 if (DestTy->isIntegerTy()) 165 if (DestTy->isFloatingPointTy()) 166 return ConstantFP::get(DestTy->getContext(), 168 !DestTy 332 getFoldedSizeOf(Type *Ty, Type *DestTy, bool Folded) argument 389 getFoldedAlignOf(Type *Ty, Type *DestTy, bool Folded) argument 455 getFoldedOffsetOf(Type *Ty, Constant *FieldNo, Type *DestTy, bool Folded) argument 505 ConstantFoldCastInstruction(unsigned opc, Constant *V, Type *DestTy) argument [all...] |
H A D | Verifier.cpp | 865 Type *DestTy = I.getType(); local 869 unsigned DestBitSize = DestTy->getScalarSizeInBits(); 872 Assert1(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I); 873 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), 875 Assert1(SrcBitSize > DestBitSize,"DestTy too big for Trunc", &I); 883 Type *DestTy = I.getType(); local 887 Assert1(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I); 888 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), 891 unsigned DestBitSize = DestTy->getScalarSizeInBits(); 901 Type *DestTy local 919 Type *DestTy = I.getType(); local 936 Type *DestTy = I.getType(); local 954 Type *DestTy = I.getType(); local 977 Type *DestTy = I.getType(); local 1000 Type *DestTy = I.getType(); local 1023 Type *DestTy = I.getType(); local 1046 Type *DestTy = I.getType(); local 1068 Type *DestTy = I.getType(); local 1088 Type *DestTy = I.getType(); local [all...] |
H A D | ConstantFold.h | 33 Type *DestTy ///< The destination type
|
H A D | Core.cpp | 2105 LLVMTypeRef DestTy, const char *Name) { 2106 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); 2110 LLVMTypeRef DestTy, const char *Name) { 2111 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); 2115 LLVMTypeRef DestTy, const char *Name) { 2116 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); 2120 LLVMTypeRef DestTy, const char *Name) { 2121 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); 2125 LLVMTypeRef DestTy, const char *Name) { 2126 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Nam 2104 LLVMBuildTrunc(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2109 LLVMBuildZExt(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2114 LLVMBuildSExt(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2119 LLVMBuildFPToUI(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2124 LLVMBuildFPToSI(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2129 LLVMBuildUIToFP(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2134 LLVMBuildSIToFP(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2139 LLVMBuildFPTrunc(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2144 LLVMBuildFPExt(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2149 LLVMBuildPtrToInt(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2154 LLVMBuildIntToPtr(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2159 LLVMBuildBitCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2164 LLVMBuildZExtOrBitCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2170 LLVMBuildSExtOrBitCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2176 LLVMBuildTruncOrBitCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2182 LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2188 LLVMBuildPointerCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2193 LLVMBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument 2199 LLVMBuildFPCast(LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name) argument [all...] |
H A D | ConstantsContext.h | 171 Type *DestTy) 172 : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1), 197 Type *DestTy) 198 : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), 217 Type *DestTy); 221 Type *DestTy, 224 new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); 169 ExtractValueConstantExpr(Constant *Agg, const SmallVector<unsigned, 4> &IdxList, Type *DestTy) argument 195 InsertValueConstantExpr(Constant *Agg, Constant *Val, const SmallVector<unsigned, 4> &IdxList, Type *DestTy) argument 219 Create(Constant *C, ArrayRef<Constant*> IdxList, Type *DestTy, unsigned Flags) argument
|
H A D | Instructions.cpp | 2075 Type *DestTy, 2093 DestTy->getScalarSizeInBits(); 2192 // no-op cast in second op implies firstOp as long as the DestTy 2199 // no-op cast in second op implies firstOp as long as the DestTy 2448 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) { argument 2449 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) 2452 if (SrcTy == DestTy) 2456 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) 2460 DestTy = DestVecTy->getElementType(); 2465 unsigned DestBits = DestTy 2073 isNoopCast(Instruction::CastOps Opcode, Type *SrcTy, Type *DestTy, Type *IntPtrTy) argument 2517 getCastOpcode( const Value *Src, bool SrcIsSigned, Type *DestTy, bool DestIsSigned) argument [all...] |
/external/llvm/utils/TableGen/ |
H A D | CallingConvEmitter.cpp | 194 Record *DestTy = Action->getValueAsDef("DestTy"); local 195 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; 203 Record *DestTy = Action->getValueAsDef("DestTy"); local 204 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; 207 Record *DestTy = Action->getValueAsDef("DestTy"); local 208 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n";
|
/external/llvm/tools/llvm-stress/ |
H A D | llvm-stress.cpp | 477 Type *DestTy = pickScalarType(); local 482 DestTy = pickVectorType(VecTy->getNumElements()); 486 if (VTy == DestTy) return; 490 if (!DestTy->isPointerTy()) 491 DestTy = PointerType::get(DestTy, 0); 493 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); 497 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); 502 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); 507 DestTy [all...] |
/external/llvm/include/llvm/ |
H A D | IRBuilder.h | 964 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") { argument 965 return CreateCast(Instruction::Trunc, V, DestTy, Name); 967 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") { argument 968 return CreateCast(Instruction::ZExt, V, DestTy, Name); 970 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") { argument 971 return CreateCast(Instruction::SExt, V, DestTy, Name); 973 Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = ""){ argument 974 return CreateCast(Instruction::FPToUI, V, DestTy, Name); 976 Value *CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = ""){ argument 977 return CreateCast(Instruction::FPToSI, V, DestTy, Nam 979 CreateUIToFP(Value *V, Type *DestTy, const Twine &Name = Ó) argument 982 CreateSIToFP(Value *V, Type *DestTy, const Twine &Name = Ó) argument 985 CreateFPTrunc(Value *V, Type *DestTy, const Twine &Name = Ó) argument 989 CreateFPExt(Value *V, Type *DestTy, const Twine &Name = Ó) argument 992 CreatePtrToInt(Value *V, Type *DestTy, const Twine &Name = Ó) argument 996 CreateIntToPtr(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1000 CreateBitCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1004 CreateZExtOrBitCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1012 CreateSExtOrBitCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1020 CreateTruncOrBitCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1028 CreateCast(Instruction::CastOps Op, Value *V, Type *DestTy, const Twine &Name = Ó) argument 1036 CreatePointerCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument 1044 CreateIntCast(Value *V, Type *DestTy, bool isSigned, const Twine &Name = Ó) argument 1057 CreateFPCast(Value *V, Type *DestTy, const Twine &Name = Ó) argument [all...] |
/external/llvm/include/llvm/Analysis/ |
H A D | ConstantFolding.h | 55 Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
|
/external/llvm/include/llvm-c/ |
H A 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, cons [all...] |
/external/llvm/lib/Analysis/ |
H A D | ConstantFolding.cpp | 47 static Constant *FoldBitCast(Constant *C, Type *DestTy, argument 50 if (C->isNullValue() && !DestTy->isX86_MMXTy()) 51 return Constant::getNullValue(DestTy); 52 if (C->isAllOnesValue() && !DestTy->isX86_MMXTy()) 53 return Constant::getAllOnesValue(DestTy); 56 if (IntegerType *IT = dyn_cast<IntegerType>(DestTy)) { 59 return ConstantExpr::getBitCast(C, DestTy); 92 VectorType *DestVTy = dyn_cast<VectorType>(DestTy); 94 return ConstantExpr::getBitCast(C, DestTy); 100 return FoldBitCast(ConstantVector::get(Ops), DestTy, T 890 ConstantFoldInstOperands(unsigned Opcode, Type *DestTy, ArrayRef<Constant *> Ops, const TargetData *TD, const TargetLibraryInfo *TLI) argument [all...] |
/external/clang/lib/CodeGen/ |
H A D | CGExprComplex.cpp | 145 ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy); 370 QualType DestTy) { 386 CGF.ConvertType(CGF.getContext().getPointerType(DestTy))); 388 return EmitLoadOfComplex(V, DestTy.isVolatileQualified()); 438 DestTy = DestTy->getAs<ComplexType>()->getElementType(); 439 Elt = CGF.EmitScalarConversion(Elt, Op->getType(), DestTy); 449 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy); 369 EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy) argument
|
H A D | CGExprCXX.cpp | 1699 QualType SrcTy, QualType DestTy, 1703 llvm::Type *DestLTy = CGF.ConvertType(DestTy); 1705 if (const PointerType *PTy = DestTy->getAs<PointerType>()) { 1730 if (const PointerType *DestPTy = DestTy->getAs<PointerType>()) { 1735 DestRecordTy = DestTy->castAs<ReferenceType>()->getPointeeType(); 1757 if (DestTy->isReferenceType()) { 1772 QualType DestTy) { 1773 llvm::Type *DestLTy = CGF.ConvertType(DestTy); 1774 if (DestTy->isPointerType()) 1787 QualType DestTy local 1698 EmitDynamicCastCall(CodeGenFunction &CGF, llvm::Value *Value, QualType SrcTy, QualType DestTy, llvm::BasicBlock *CastEnd) argument 1771 EmitDynamicCastToNull(CodeGenFunction &CGF, QualType DestTy) argument [all...] |
H A D | CGExprConstant.cpp | 1070 llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); local 1077 if (isa<llvm::ArrayType>(DestTy)) { 1094 if (isa<llvm::PointerType>(DestTy)) 1095 return llvm::ConstantExpr::getBitCast(C, DestTy); 1097 return llvm::ConstantExpr::getPtrToInt(C, DestTy); 1103 if (isa<llvm::PointerType>(DestTy)) 1104 return llvm::ConstantExpr::getIntToPtr(C, DestTy); 1107 if (C->getType() != DestTy) 1108 return llvm::ConstantExpr::getTrunc(C, DestTy);
|
H A D | CGExprScalar.cpp | 1022 QualType DestTy = CE->getType(); local 1025 if (!DestTy->isVoidType()) 1040 ConvertType(CGF.getContext().getPointerType(DestTy))); 1041 return EmitLoadOfLValue(CGF.MakeNaturalAlignAddrLValue(V, DestTy)); 1049 return Builder.CreateBitCast(Src, ConvertType(DestTy)); 1059 DestTy->getCXXRecordDeclForPointerType(); 1110 cast<llvm::PointerType>(ConvertType(DestTy))); 1160 assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy)); 1174 return Builder.CreateIntToPtr(IntResult, ConvertType(DestTy)); 1177 assert(!DestTy [all...] |
H A D | CGObjC.cpp | 2815 QualType DestTy = C.getPointerType(Ty); local 2821 ImplicitParamDecl dstDecl(FD, SourceLocation(), 0, DestTy); 2844 DeclRefExpr DstExpr(&dstDecl, false, DestTy, 2846 UnaryOperator DST(&DstExpr, UO_Deref, DestTy->getPointeeType(), 2857 Args, DestTy->getPointeeType(), 2902 QualType DestTy = C.getPointerType(Ty); local 2908 ImplicitParamDecl dstDecl(FD, SourceLocation(), 0, DestTy); 2959 DeclRefExpr DstExpr(&dstDecl, false, DestTy,
|
/external/clang/lib/Sema/ |
H A D | SemaCast.cpp | 1439 QualType SrcTy, DestTy; local 1445 DestTy = DestType->getPointeeType(); 1451 DestTy = DestType->getPointeeType(); 1455 if (Context.hasSameUnqualifiedType(DestTy, SrcTy)) { 1459 if (DestTy->isAnyCharacterType() || DestTy->isVoidType() || 1464 if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) { 1469 if ((SrcTy->isUnsignedIntegerType() && DestTy->isSignedIntegerType()) || 1470 (SrcTy->isSignedIntegerType() && DestTy->isUnsignedIntegerType())) { 1471 if (Context.getTypeSize(DestTy) [all...] |
/external/llvm/lib/ExecutionEngine/ |
H A D | ExecutionEngine.cpp | 662 Type* DestTy = CE->getType(); local 666 assert(DestTy->isFloatingPointTy() && "invalid bitcast"); 667 if (DestTy->isFloatTy()) 669 else if (DestTy->isDoubleTy()) 673 assert(DestTy->isIntegerTy(32) && "Invalid bitcast"); 677 assert(DestTy->isIntegerTy(64) && "Invalid bitcast"); 681 assert(DestTy->isPointerTy() && "Invalid bitcast");
|
/external/llvm/lib/AsmParser/ |
H A D | LLParser.cpp | 2130 Type *DestTy = 0; 2136 ParseType(DestTy) || 2139 if (!CastInst::castIsValid((Instruction::CastOps)Opc, SrcVal, DestTy)) 2142 getTypeString(DestTy) + "'"); 2144 SrcVal, DestTy); 3402 Type *DestTy = 0; 3405 ParseType(DestTy)) 3408 if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy)) { 3409 CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy); 3412 getTypeString(DestTy) [all...] |