Home
last modified time | relevance | path

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

123

/external/llvm/include/llvm/Analysis/
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 …]
DConstantFolding.h56 Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
/external/llvm/include/llvm/IR/
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 …]
DIRBuilder.h1094 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") {
1095 return CreateCast(Instruction::Trunc, V, DestTy, Name);
1097 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") {
1098 return CreateCast(Instruction::ZExt, V, DestTy, Name);
1100 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
1101 return CreateCast(Instruction::SExt, V, DestTy, Name);
1105 Value *CreateZExtOrTrunc(Value *V, Type *DestTy,
1108 DestTy->isIntOrIntVectorTy() &&
1111 if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits())
1112 return CreateZExt(V, DestTy, Name);
[all …]
DAutoUpgrade.h55 Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
61 Value *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
/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.cpp338 void VerifyBitcastType(const Value *V, Type *DestTy, Type *SrcTy);
961 void Verifier::VerifyBitcastType(const Value *V, Type *DestTy, Type *SrcTy) { in VerifyBitcastType() argument
964 unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); in VerifyBitcastType()
968 Assert1(SrcTy->isPointerTy() == DestTy->isPointerTy(), in VerifyBitcastType()
976 Assert1(!DestTy->isAggregateType(), in VerifyBitcastType()
984 !DestTy->isPtrOrPtrVectorTy() || in VerifyBitcastType()
985 SrcTy->isVectorTy() != DestTy->isVectorTy()) { in VerifyBitcastType()
990 unsigned DstAS = DestTy->getPointerAddressSpace(); in VerifyBitcastType()
1257 Type *DestTy = I.getType(); in visitTruncInst() local
1261 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitTruncInst()
[all …]
DAutoUpgrade.cpp524 Instruction *llvm::UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy, in UpgradeBitCastInst() argument
531 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastInst()
532 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastInst()
540 return CastInst::Create(Instruction::IntToPtr, Temp, DestTy); in UpgradeBitCastInst()
546 Value *llvm::UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy) { in UpgradeBitCastExpr() argument
551 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastExpr()
552 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastExpr()
560 DestTy); in UpgradeBitCastExpr()
DCore.cpp2374 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument
2375 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
2379 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument
2380 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
2384 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument
2385 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
2389 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument
2390 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
2394 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument
2395 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
[all …]
DInstructions.cpp2097 Type *DestTy, in isNoopCast() argument
2117 DestTy->getScalarSizeInBits(); in isNoopCast()
2566 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) { in isCastable() argument
2567 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) in isCastable()
2570 if (SrcTy == DestTy) in isCastable()
2574 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) in isCastable()
2578 DestTy = DestVecTy->getElementType(); in isCastable()
2583 unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr in isCastable()
2586 if (DestTy->isIntegerTy()) { // Casting to integral in isCastable()
2596 } else if (DestTy->isFloatingPointTy()) { // Casting to floating pt in isCastable()
[all …]
DConstantsContext.h174 Type *DestTy) in ExtractValueConstantExpr() argument
175 : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1), in ExtractValueConstantExpr()
200 Type *DestTy) in InsertValueConstantExpr() argument
201 : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), in InsertValueConstantExpr()
220 Type *DestTy);
224 Type *DestTy, in Create() argument
227 new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); in Create()
DConstantFold.h33 Type *DestTy ///< The destination type
/external/llvm/lib/Transforms/InstCombine/
DInstCombineCasts.cpp449 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local
455 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc()
456 CanEvaluateTruncated(Src, DestTy)) { in visitTrunc()
462 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitTrunc()
463 assert(Res->getType() == DestTy); in visitTrunc()
468 if (DestTy->getScalarSizeInBits() == 1) { in visitTrunc()
776 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local
783 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt()
784 CanEvaluateZExtd(Src, DestTy, BitsToClear)) { in visitZExt()
791 Value *Res = EvaluateInDifferentType(Src, DestTy, false); in visitZExt()
[all …]
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp481 Type *DestTy = pickScalarType(); in Act() local
486 DestTy = pickVectorType(VecTy->getNumElements()); in Act()
490 if (VTy == DestTy) return; in Act()
494 if (!DestTy->isPointerTy()) in Act()
495 DestTy = PointerType::get(DestTy, 0); in Act()
497 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act()
501 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); in Act()
506 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act()
511 DestTy->getScalarType()->isIntegerTy()) { in Act()
514 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act()
[all …]
/external/llvm/lib/Analysis/
DConstantFolding.cpp53 static Constant *FoldBitCast(Constant *C, Type *DestTy, in FoldBitCast() argument
56 if (C->isNullValue() && !DestTy->isX86_MMXTy()) in FoldBitCast()
57 return Constant::getNullValue(DestTy); in FoldBitCast()
58 if (C->isAllOnesValue() && !DestTy->isX86_MMXTy()) 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()
102 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
[all …]
/external/llvm/utils/TableGen/
DCallingConvEmitter.cpp217 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
218 MVT::SimpleValueType DestVT = getValueType(DestTy); in EmitAction()
231 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
232 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
235 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
236 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
/external/llvm/lib/Target/NVPTX/
DNVPTXFavorNonGenericAddrSpaces.cpp97 PointerType *DestTy = cast<PointerType>(Cast->getType()); in IsEliminableAddrSpaceCast() local
102 if (SrcTy->getElementType() != DestTy->getElementType()) in IsEliminableAddrSpaceCast()
108 DestTy->getAddressSpace() == AddressSpace::ADDRESS_SPACE_GENERIC); in IsEliminableAddrSpaceCast()
DNVPTXGenericToNVVM.cpp174 Type *DestTy = PointerType::get(Type::getInt8Ty(Context), AddrSpace); in getOrInsertCVTA() local
175 CVTA = Builder.CreateBitCast(GV, DestTy, "cvta"); in getOrInsertCVTA()
181 ParamTypes.push_back(DestTy); in getOrInsertCVTA()
187 DestTy = in getOrInsertCVTA()
189 CVTA = Builder.CreateBitCast(CVTA, DestTy, "cvta"); in getOrInsertCVTA()
/external/llvm/include/llvm-c/
DCore.h2641 LLVMTypeRef DestTy, const char *Name);
2643 LLVMTypeRef DestTy, const char *Name);
2645 LLVMTypeRef DestTy, const char *Name);
2647 LLVMTypeRef DestTy, const char *Name);
2649 LLVMTypeRef DestTy, const char *Name);
2651 LLVMTypeRef DestTy, const char *Name);
2653 LLVMTypeRef DestTy, const char *Name);
2655 LLVMTypeRef DestTy, const char *Name);
2657 LLVMTypeRef DestTy, const char *Name);
2659 LLVMTypeRef DestTy, const char *Name);
[all …]
/external/llvm/lib/Transforms/IPO/
DMergeFunctions.cpp1286 static Value *createCast(IRBuilder<false> &Builder, Value *V, Type *DestTy) { in createCast() argument
1289 assert(DestTy->isStructTy()); in createCast()
1290 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements()); in createCast()
1291 Value *Result = UndefValue::get(DestTy); in createCast()
1295 DestTy->getStructElementType(I)); in createCast()
1302 assert(!DestTy->isStructTy()); in createCast()
1303 if (SrcTy->isIntegerTy() && DestTy->isPointerTy()) in createCast()
1304 return Builder.CreateIntToPtr(V, DestTy); in createCast()
1305 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy()) in createCast()
1306 return Builder.CreatePtrToInt(V, DestTy); in createCast()
[all …]
/external/llvm/include/llvm/Target/
DTargetCallingConv.td119 ValueType DestTy = destTy;
125 ValueType DestTy = destTy;
131 ValueType DestTy = destTy;
/external/clang/lib/CodeGen/
DCGExprConstant.cpp1052 llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); in EmitConstantValue() local
1059 if (isa<llvm::ArrayType>(DestTy)) { in EmitConstantValue()
1078 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1079 return llvm::ConstantExpr::getPointerCast(C, DestTy); in EmitConstantValue()
1081 return llvm::ConstantExpr::getPtrToInt(C, DestTy); in EmitConstantValue()
1087 if (isa<llvm::PointerType>(DestTy)) in EmitConstantValue()
1088 return llvm::ConstantExpr::getIntToPtr(C, DestTy); in EmitConstantValue()
1091 if (C->getType() != DestTy) in EmitConstantValue()
1092 return llvm::ConstantExpr::getTrunc(C, DestTy); in EmitConstantValue()
DCGExprComplex.cpp145 ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy);
414 QualType DestTy) { in EmitCast() argument
431 CGF.ConvertType(CGF.getContext().getPointerType(DestTy))); in EmitCast()
432 return EmitLoadOfLValue(CGF.MakeAddrLValue(V, DestTy, in EmitCast()
484 Op->getType(), DestTy); in EmitCast()
490 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy); in EmitCast()
DCGExprCXX.cpp1675 QualType DestTy) { in EmitDynamicCastToNull() argument
1676 llvm::Type *DestLTy = CGF.ConvertType(DestTy); in EmitDynamicCastToNull()
1677 if (DestTy->isPointerType()) in EmitDynamicCastToNull()
1691 QualType DestTy = DCE->getTypeAsWritten(); in EmitDynamicCast() local
1694 if (llvm::Value *T = EmitDynamicCastToNull(*this, DestTy)) in EmitDynamicCast()
1702 const PointerType *DestPTy = DestTy->getAs<PointerType>(); in EmitDynamicCast()
1714 DestRecordTy = DestTy->castAs<ReferenceType>()->getPointeeType(); in EmitDynamicCast()
1741 DestTy); in EmitDynamicCast()
1746 DestTy, DestRecordTy, CastEnd); in EmitDynamicCast()

123