Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
ValueTypes.cpp
Go to the documentation of this file.
1//===----------- ValueTypes.cpp - Implementation of EVT methods -----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "llvm/CodeGen/ValueTypes.h"
10#include "llvm/ADT/APFloat.h"
11#include "llvm/ADT/StringExtras.h"
12#include "llvm/IR/DerivedTypes.h"
13#include "llvm/IR/Type.h"
14#include "llvm/Support/Debug.h"
15#include "llvm/Support/ErrorHandling.h"
16#include "llvm/Support/TypeSize.h"
17#include "llvm/Support/WithColor.h"
18using namespacellvm;
19
20EVT EVT::changeExtendedTypeToInteger() const{
21assert(isExtended() &&"Type is not extended!");
22LLVMContext &Context = LLVMTy->getContext();
23returngetIntegerVT(Context,getSizeInBits());
24}
25
26EVT EVT::changeExtendedVectorElementTypeToInteger() const{
27assert(isExtended() &&"Type is not extended!");
28LLVMContext &Context = LLVMTy->getContext();
29EVT IntTy =getIntegerVT(Context,getScalarSizeInBits());
30returngetVectorVT(Context, IntTy,getVectorElementCount());
31}
32
33EVT EVT::changeExtendedVectorElementType(EVT EltVT) const{
34assert(isExtended() &&"Type is not extended!");
35LLVMContext &Context = LLVMTy->getContext();
36returngetVectorVT(Context, EltVT,getVectorElementCount());
37}
38
39EVT EVT::getExtendedIntegerVT(LLVMContext &Context,unsignedBitWidth) {
40EVT VT;
41 VT.LLVMTy =IntegerType::get(Context,BitWidth);
42assert(VT.isExtended() &&"Type is not extended!");
43return VT;
44}
45
46EVT EVT::getExtendedVectorVT(LLVMContext &Context,EVT VT,unsigned NumElements,
47bool IsScalable) {
48EVT ResultVT;
49 ResultVT.LLVMTy =
50VectorType::get(VT.getTypeForEVT(Context), NumElements, IsScalable);
51assert(ResultVT.isExtended() &&"Type is not extended!");
52return ResultVT;
53}
54
55EVT EVT::getExtendedVectorVT(LLVMContext &Context,EVT VT,ElementCount EC) {
56EVT ResultVT;
57 ResultVT.LLVMTy =VectorType::get(VT.getTypeForEVT(Context), EC);
58assert(ResultVT.isExtended() &&"Type is not extended!");
59return ResultVT;
60}
61
62bool EVT::isExtendedFloatingPoint() const{
63assert(isExtended() &&"Type is not extended!");
64return LLVMTy->isFPOrFPVectorTy();
65}
66
67bool EVT::isExtendedInteger() const{
68assert(isExtended() &&"Type is not extended!");
69return LLVMTy->isIntOrIntVectorTy();
70}
71
72bool EVT::isExtendedScalarInteger() const{
73assert(isExtended() &&"Type is not extended!");
74return LLVMTy->isIntegerTy();
75}
76
77bool EVT::isExtendedVector() const{
78assert(isExtended() &&"Type is not extended!");
79return LLVMTy->isVectorTy();
80}
81
82bool EVT::isExtended16BitVector() const{
83return isExtendedVector() &&
84 getExtendedSizeInBits() ==TypeSize::getFixed(16);
85}
86
87bool EVT::isExtended32BitVector() const{
88return isExtendedVector() &&
89 getExtendedSizeInBits() ==TypeSize::getFixed(32);
90}
91
92bool EVT::isExtended64BitVector() const{
93return isExtendedVector() &&
94 getExtendedSizeInBits() ==TypeSize::getFixed(64);
95}
96
97bool EVT::isExtended128BitVector() const{
98return isExtendedVector() &&
99 getExtendedSizeInBits() ==TypeSize::getFixed(128);
100}
101
102bool EVT::isExtended256BitVector() const{
103return isExtendedVector() &&
104 getExtendedSizeInBits() ==TypeSize::getFixed(256);
105}
106
107bool EVT::isExtended512BitVector() const{
108return isExtendedVector() &&
109 getExtendedSizeInBits() ==TypeSize::getFixed(512);
110}
111
112bool EVT::isExtended1024BitVector() const{
113return isExtendedVector() &&
114 getExtendedSizeInBits() ==TypeSize::getFixed(1024);
115}
116
117bool EVT::isExtended2048BitVector() const{
118return isExtendedVector() &&
119 getExtendedSizeInBits() ==TypeSize::getFixed(2048);
120}
121
122bool EVT::isExtendedFixedLengthVector() const{
123return isExtendedVector() && isa<FixedVectorType>(LLVMTy);
124}
125
126bool EVT::isExtendedScalableVector() const{
127return isExtendedVector() && isa<ScalableVectorType>(LLVMTy);
128}
129
130EVT EVT::getExtendedVectorElementType() const{
131assert(isExtended() &&"Type is not extended!");
132returnEVT::getEVT(cast<VectorType>(LLVMTy)->getElementType());
133}
134
135unsigned EVT::getExtendedVectorNumElements() const{
136assert(isExtended() &&"Type is not extended!");
137ElementCountEC = cast<VectorType>(LLVMTy)->getElementCount();
138if (EC.isScalable()) {
139WithColor::warning()
140 <<"The code that requested the fixed number of elements has made the "
141"assumption that this vector is not scalable. This assumption was "
142"not correct, and this may lead to broken code\n";
143 }
144returnEC.getKnownMinValue();
145}
146
147ElementCount EVT::getExtendedVectorElementCount() const{
148assert(isExtended() &&"Type is not extended!");
149return cast<VectorType>(LLVMTy)->getElementCount();
150}
151
152TypeSize EVT::getExtendedSizeInBits() const{
153assert(isExtended() &&"Type is not extended!");
154if (IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
155returnTypeSize::getFixed(ITy->getBitWidth());
156if (VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
157return VTy->getPrimitiveSizeInBits();
158llvm_unreachable("Unrecognized extended type!");
159}
160
161/// getEVTString - This function returns value type as a string, e.g. "i32".
162std::stringEVT::getEVTString() const{
163switch (V.SimpleTy) {
164default:
165if (isRISCVVectorTuple()) {
166unsigned Sz =getSizeInBits().getKnownMinValue();
167unsigned NF =getRISCVVectorTupleNumFields();
168unsigned MinNumElts = Sz / (NF * 8);
169return"riscv_nxv" + utostr(MinNumElts) +"i8x" + utostr(NF);
170 }
171if (isVector())
172return (isScalableVector() ?"nxv" :"v") +
173 utostr(getVectorElementCount().getKnownMinValue()) +
174getVectorElementType().getEVTString();
175if (isInteger())
176return"i" + utostr(getSizeInBits());
177if (isFloatingPoint())
178return"f" + utostr(getSizeInBits());
179llvm_unreachable("Invalid EVT!");
180case MVT::bf16:return"bf16";
181case MVT::ppcf128:return"ppcf128";
182case MVT::isVoid:return"isVoid";
183case MVT::Other:return"ch";
184case MVT::Glue:return"glue";
185case MVT::x86mmx:return"x86mmx";
186case MVT::x86amx:return"x86amx";
187case MVT::i64x8:return"i64x8";
188case MVT::Metadata:return"Metadata";
189case MVT::Untyped:return"Untyped";
190case MVT::funcref:return"funcref";
191case MVT::exnref:return"exnref";
192case MVT::externref:return"externref";
193case MVT::aarch64svcount:
194return"aarch64svcount";
195case MVT::spirvbuiltin:
196return"spirvbuiltin";
197 }
198}
199
200#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
201voidEVT::dump() const{
202print(dbgs());
203dbgs() <<"\n";
204}
205#endif
206
207/// getTypeForEVT - This method returns an LLVM type corresponding to the
208/// specified EVT. For integer types, this returns an unsigned type. Note
209/// that this will abort for types that cannot be represented.
210Type *EVT::getTypeForEVT(LLVMContext &Context) const{
211// clang-format off
212switch (V.SimpleTy) {
213default:
214assert(isExtended() &&"Type is not extended!");
215return LLVMTy;
216case MVT::isVoid:returnType::getVoidTy(Context);
217case MVT::x86mmx:returnllvm::FixedVectorType::get(llvm::IntegerType::get(Context, 64), 1);
218case MVT::aarch64svcount:
219returnTargetExtType::get(Context,"aarch64.svcount");
220case MVT::x86amx:returnType::getX86_AMXTy(Context);
221case MVT::i64x8:returnIntegerType::get(Context, 512);
222case MVT::externref:returnType::getWasm_ExternrefTy(Context);
223case MVT::funcref:returnType::getWasm_FuncrefTy(Context);
224case MVT::Metadata:returnType::getMetadataTy(Context);
225#define GET_VT_EVT(Ty, EVT) case MVT::Ty: return EVT;
226#include "llvm/CodeGen/GenVT.inc"
227#undef GET_VT_EVT
228 }
229// clang-format on
230}
231
232/// Return the value type corresponding to the specified type.
233/// If HandleUnknown is true, unknown types are returned as Other, otherwise
234/// they are invalid.
235/// NB: This includes pointer types, which require a DataLayout to convert
236/// to a concrete value type.
237MVTMVT::getVT(Type *Ty,bool HandleUnknown){
238assert(Ty !=nullptr &&"Invalid type");
239switch (Ty->getTypeID()) {
240default:
241if (HandleUnknown)returnMVT(MVT::Other);
242llvm_unreachable("Unknown type!");
243caseType::VoidTyID:
244return MVT::isVoid;
245caseType::IntegerTyID:
246returngetIntegerVT(cast<IntegerType>(Ty)->getBitWidth());
247caseType::HalfTyID:returnMVT(MVT::f16);
248caseType::BFloatTyID:returnMVT(MVT::bf16);
249caseType::FloatTyID:returnMVT(MVT::f32);
250caseType::DoubleTyID:returnMVT(MVT::f64);
251caseType::X86_FP80TyID:
252returnMVT(MVT::f80);
253caseType::TargetExtTyID: {
254TargetExtType *TargetExtTy = cast<TargetExtType>(Ty);
255if (TargetExtTy->getName() =="aarch64.svcount")
256returnMVT(MVT::aarch64svcount);
257elseif (TargetExtTy->getName().starts_with("spirv."))
258returnMVT(MVT::spirvbuiltin);
259if (TargetExtTy->getName() =="riscv.vector.tuple") {
260unsigned Sz = cast<ScalableVectorType>(TargetExtTy->getTypeParameter(0))
261 ->getMinNumElements() *
262 8;
263unsigned NF = TargetExtTy->getIntParameter(0);
264
265returnMVT::getRISCVVectorTupleVT(Sz * NF, NF);
266 }
267if (HandleUnknown)
268returnMVT(MVT::Other);
269llvm_unreachable("Unknown target ext type!");
270 }
271caseType::X86_AMXTyID:returnMVT(MVT::x86amx);
272caseType::FP128TyID:returnMVT(MVT::f128);
273caseType::PPC_FP128TyID:returnMVT(MVT::ppcf128);
274caseType::FixedVectorTyID:
275caseType::ScalableVectorTyID: {
276VectorType *VTy = cast<VectorType>(Ty);
277returngetVectorVT(
278getVT(VTy->getElementType(),/*HandleUnknown=*/false),
279 VTy->getElementCount());
280 }
281 }
282}
283
284/// getEVT - Return the value type corresponding to the specified type.
285/// If HandleUnknown is true, unknown types are returned as Other, otherwise
286/// they are invalid.
287/// NB: This includes pointer types, which require a DataLayout to convert
288/// to a concrete value type.
289EVTEVT::getEVT(Type *Ty,bool HandleUnknown){
290switch (Ty->getTypeID()) {
291default:
292returnMVT::getVT(Ty, HandleUnknown);
293caseType::TokenTyID:
294return MVT::Untyped;
295caseType::IntegerTyID:
296returngetIntegerVT(Ty->getContext(), cast<IntegerType>(Ty)->getBitWidth());
297caseType::FixedVectorTyID:
298caseType::ScalableVectorTyID: {
299VectorType *VTy = cast<VectorType>(Ty);
300returngetVectorVT(Ty->getContext(),
301getEVT(VTy->getElementType(),/*HandleUnknown=*/false),
302 VTy->getElementCount());
303 }
304 }
305}
306
307constfltSemantics &MVT::getFltSemantics() const{
308switch (getScalarType().SimpleTy) {
309default:llvm_unreachable("Unknown FP format");
310case MVT::f16:returnAPFloat::IEEEhalf();
311case MVT::bf16:returnAPFloat::BFloat();
312case MVT::f32:returnAPFloat::IEEEsingle();
313case MVT::f64:returnAPFloat::IEEEdouble();
314case MVT::f80:returnAPFloat::x87DoubleExtended();
315case MVT::f128:returnAPFloat::IEEEquad();
316case MVT::ppcf128:returnAPFloat::PPCDoubleDouble();
317 }
318}
319
320constfltSemantics &EVT::getFltSemantics() const{
321returngetScalarType().getSimpleVT().getFltSemantics();
322}
323
324#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
325voidMVT::dump() const{
326print(dbgs());
327dbgs() <<"\n";
328}
329#endif
330
331voidMVT::print(raw_ostream &OS) const{
332if (SimpleTy ==INVALID_SIMPLE_VALUE_TYPE)
333OS <<"invalid";
334else
335OS <<EVT(*this).getEVTString();
336}
APFloat.h
This file declares a class to represent arbitrary precision floating point values and provide a varie...
Debug.h
DerivedTypes.h
Type.h
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
OS
raw_pwrite_stream & OS
Definition:SampleProfWriter.cpp:51
StringExtras.h
This file contains some functions that are useful when dealing with strings.
TypeSize.h
getBitWidth
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type.
Definition:ValueTracking.cpp:93
ValueTypes.h
WithColor.h
VectorType
Definition:ItaniumDemangle.h:1173
llvm::ElementCount
Definition:TypeSize.h:300
llvm::FixedVectorType::get
static FixedVectorType * get(Type *ElementType, unsigned NumElts)
Definition:Type.cpp:791
llvm::IntegerType
Class to represent integer types.
Definition:DerivedTypes.h:42
llvm::IntegerType::get
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
Definition:Type.cpp:311
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition:LLVMContext.h:67
llvm::MVT
Machine Value Type.
Definition:MachineValueType.h:35
llvm::MVT::dump
void dump() const
Support for debugging, callable in GDB: VT.dump()
Definition:ValueTypes.cpp:325
llvm::MVT::INVALID_SIMPLE_VALUE_TYPE
@ INVALID_SIMPLE_VALUE_TYPE
Definition:MachineValueType.h:40
llvm::MVT::SimpleTy
SimpleValueType SimpleTy
Definition:MachineValueType.h:55
llvm::MVT::MVT
constexpr MVT()=default
llvm::MVT::getRISCVVectorTupleVT
static MVT getRISCVVectorTupleVT(unsigned Sz, unsigned NFields)
Definition:MachineValueType.h:471
llvm::MVT::getVT
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
Definition:ValueTypes.cpp:237
llvm::MVT::getFltSemantics
const fltSemantics & getFltSemantics() const
Returns an APFloat semantics tag appropriate for the value type.
Definition:ValueTypes.cpp:307
llvm::MVT::getVectorVT
static MVT getVectorVT(MVT VT, unsigned NumElements)
Definition:MachineValueType.h:451
llvm::MVT::getIntegerVT
static MVT getIntegerVT(unsigned BitWidth)
Definition:MachineValueType.h:441
llvm::MVT::getScalarType
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
Definition:MachineValueType.h:259
llvm::MVT::print
void print(raw_ostream &OS) const
Implement operator<<.
Definition:ValueTypes.cpp:331
llvm::StringRef::starts_with
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
Definition:StringRef.h:265
llvm::TargetExtType
Class to represent target extensions types, which are generally unintrospectable from target-independ...
Definition:DerivedTypes.h:744
llvm::TargetExtType::get
static TargetExtType * get(LLVMContext &Context, StringRef Name, ArrayRef< Type * > Types={}, ArrayRef< unsigned > Ints={})
Return a target extension type having the specified name and optional type and integer parameters.
Definition:Type.cpp:895
llvm::TargetExtType::getTypeParameter
Type * getTypeParameter(unsigned i) const
Definition:DerivedTypes.h:792
llvm::TargetExtType::getIntParameter
unsigned getIntParameter(unsigned i) const
Definition:DerivedTypes.h:801
llvm::TargetExtType::getName
StringRef getName() const
Return the name for this target extension type.
Definition:DerivedTypes.h:778
llvm::TypeSize
Definition:TypeSize.h:334
llvm::TypeSize::getFixed
static constexpr TypeSize getFixed(ScalarTy ExactSize)
Definition:TypeSize.h:345
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition:Type.h:45
llvm::Type::isVectorTy
bool isVectorTy() const
True if this is an instance of VectorType.
Definition:Type.h:270
llvm::Type::isIntOrIntVectorTy
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
Definition:Type.h:243
llvm::Type::getX86_AMXTy
static Type * getX86_AMXTy(LLVMContext &C)
llvm::Type::getMetadataTy
static Type * getMetadataTy(LLVMContext &C)
llvm::Type::X86_AMXTyID
@ X86_AMXTyID
AMX vectors (8192 bits, X86 specific)
Definition:Type.h:66
llvm::Type::HalfTyID
@ HalfTyID
16-bit floating point type
Definition:Type.h:56
llvm::Type::TargetExtTyID
@ TargetExtTyID
Target extension type.
Definition:Type.h:78
llvm::Type::VoidTyID
@ VoidTyID
type with no size
Definition:Type.h:63
llvm::Type::ScalableVectorTyID
@ ScalableVectorTyID
Scalable SIMD vector type.
Definition:Type.h:76
llvm::Type::FloatTyID
@ FloatTyID
32-bit floating point type
Definition:Type.h:58
llvm::Type::IntegerTyID
@ IntegerTyID
Arbitrary bit width integers.
Definition:Type.h:70
llvm::Type::FixedVectorTyID
@ FixedVectorTyID
Fixed width SIMD vector type.
Definition:Type.h:75
llvm::Type::BFloatTyID
@ BFloatTyID
16-bit floating point type (7-bit significand)
Definition:Type.h:57
llvm::Type::DoubleTyID
@ DoubleTyID
64-bit floating point type
Definition:Type.h:59
llvm::Type::X86_FP80TyID
@ X86_FP80TyID
80-bit floating point type (X87)
Definition:Type.h:60
llvm::Type::PPC_FP128TyID
@ PPC_FP128TyID
128-bit floating point type (two 64-bits, PowerPC)
Definition:Type.h:62
llvm::Type::TokenTyID
@ TokenTyID
Tokens.
Definition:Type.h:67
llvm::Type::FP128TyID
@ FP128TyID
128-bit floating point type (112-bit significand)
Definition:Type.h:61
llvm::Type::getVoidTy
static Type * getVoidTy(LLVMContext &C)
llvm::Type::getContext
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
Definition:Type.h:128
llvm::Type::isIntegerTy
bool isIntegerTy() const
True if this is an instance of IntegerType.
Definition:Type.h:237
llvm::Type::getTypeID
TypeID getTypeID() const
Return the type id for the type.
Definition:Type.h:136
llvm::Type::getWasm_FuncrefTy
static Type * getWasm_FuncrefTy(LLVMContext &C)
llvm::Type::isFPOrFPVectorTy
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
Definition:Type.h:225
llvm::Type::getWasm_ExternrefTy
static Type * getWasm_ExternrefTy(LLVMContext &C)
llvm::VectorType
Base class of all SIMD vector types.
Definition:DerivedTypes.h:427
llvm::VectorType::getElementCount
ElementCount getElementCount() const
Return an ElementCount instance to represent the (possibly scalable) number of elements in the vector...
Definition:DerivedTypes.h:665
llvm::VectorType::get
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
llvm::VectorType::getElementType
Type * getElementType() const
Definition:DerivedTypes.h:460
llvm::WithColor::warning
static raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
Definition:WithColor.cpp:85
llvm::details::FixedOrScalableQuantity::getKnownMinValue
constexpr ScalarTy getKnownMinValue() const
Returns the minimum value this quantity can represent.
Definition:TypeSize.h:168
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:raw_ostream.h:52
ErrorHandling.h
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:ErrorHandling.h:143
llvm::codeview::CompileSym2Flags::EC
@ EC
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition:Debug.cpp:163
llvm::BitWidth
constexpr unsigned BitWidth
Definition:BitmaskEnum.h:217
llvm::APFloatBase::IEEEsingle
static const fltSemantics & IEEEsingle() LLVM_READNONE
Definition:APFloat.cpp:257
llvm::APFloatBase::PPCDoubleDouble
static const fltSemantics & PPCDoubleDouble() LLVM_READNONE
Definition:APFloat.cpp:260
llvm::APFloatBase::x87DoubleExtended
static const fltSemantics & x87DoubleExtended() LLVM_READNONE
Definition:APFloat.cpp:280
llvm::APFloatBase::IEEEquad
static const fltSemantics & IEEEquad() LLVM_READNONE
Definition:APFloat.cpp:259
llvm::APFloatBase::IEEEdouble
static const fltSemantics & IEEEdouble() LLVM_READNONE
Definition:APFloat.cpp:258
llvm::APFloatBase::IEEEhalf
static const fltSemantics & IEEEhalf() LLVM_READNONE
Definition:APFloat.cpp:255
llvm::APFloatBase::BFloat
static const fltSemantics & BFloat() LLVM_READNONE
Definition:APFloat.cpp:256
llvm::EVT
Extended Value Type.
Definition:ValueTypes.h:35
llvm::EVT::getVectorVT
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements, bool IsScalable=false)
Returns the EVT that represents a vector NumElements in length, where each element is of type VT.
Definition:ValueTypes.h:74
llvm::EVT::isFloatingPoint
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
Definition:ValueTypes.h:147
llvm::EVT::getVectorElementCount
ElementCount getVectorElementCount() const
Definition:ValueTypes.h:345
llvm::EVT::getSizeInBits
TypeSize getSizeInBits() const
Return the size of the specified value type in bits.
Definition:ValueTypes.h:368
llvm::EVT::getRISCVVectorTupleNumFields
unsigned getRISCVVectorTupleNumFields() const
Given a RISCV vector tuple type, return the num_fields.
Definition:ValueTypes.h:359
llvm::EVT::getScalarSizeInBits
uint64_t getScalarSizeInBits() const
Definition:ValueTypes.h:380
llvm::EVT::getEVT
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
Definition:ValueTypes.cpp:289
llvm::EVT::getSimpleVT
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
Definition:ValueTypes.h:311
llvm::EVT::dump
void dump() const
Support for debugging, callable in GDB: VT.dump()
Definition:ValueTypes.cpp:201
llvm::EVT::getIntegerVT
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
Returns the EVT that represents an integer with the given number of bits.
Definition:ValueTypes.h:65
llvm::EVT::isRISCVVectorTuple
bool isRISCVVectorTuple() const
Return true if this is a vector value type.
Definition:ValueTypes.h:179
llvm::EVT::getEVTString
std::string getEVTString() const
This function returns value type as a string, e.g. "i32".
Definition:ValueTypes.cpp:162
llvm::EVT::isVector
bool isVector() const
Return true if this is a vector value type.
Definition:ValueTypes.h:168
llvm::EVT::getScalarType
EVT getScalarType() const
If this is a vector type, return the element type, otherwise return this.
Definition:ValueTypes.h:318
llvm::EVT::getTypeForEVT
Type * getTypeForEVT(LLVMContext &Context) const
This method returns an LLVM type corresponding to the specified EVT.
Definition:ValueTypes.cpp:210
llvm::EVT::isScalableVector
bool isScalableVector() const
Return true if this is a vector type where the runtime length is machine dependent.
Definition:ValueTypes.h:174
llvm::EVT::getVectorElementType
EVT getVectorElementType() const
Given a vector type, return the type of each element.
Definition:ValueTypes.h:323
llvm::EVT::isExtended
bool isExtended() const
Test if the given EVT is extended (as opposed to being simple).
Definition:ValueTypes.h:142
llvm::EVT::print
void print(raw_ostream &OS) const
Implement operator<<.
Definition:ValueTypes.h:491
llvm::EVT::getFltSemantics
const fltSemantics & getFltSemantics() const
Returns an APFloat semantics tag appropriate for the value type.
Definition:ValueTypes.cpp:320
llvm::EVT::isInteger
bool isInteger() const
Return true if this is an integer or a vector integer type.
Definition:ValueTypes.h:152
llvm::fltSemantics
Definition:APFloat.cpp:103

Generated on Thu Jul 17 2025 11:52:24 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp