|
LLVM
4.0.0
|
#include <LowLevelType.h>
Public Types | |
| enum | TypeKind : uint16_t { Invalid, Scalar, Pointer, Vector } |
Public Member Functions | |
| LLT (TypeKind Kind, uint16_t NumElements, unsigned SizeInBits) | |
| LLT () | |
| LLT (Type &Ty, const DataLayout &DL) | |
| Construct a low-level type based on an LLVM type. More... | |
| LLT (MVT VT) | |
| bool | isValid () const |
| bool | isScalar () const |
| bool | isPointer () const |
| bool | isVector () const |
| uint16_t | getNumElements () const |
| Returns the number of elements in a vector LLT. More... | |
| unsigned | getSizeInBits () const |
| Returns the total size of the type. Must only be called on sized types. More... | |
| unsigned | getScalarSizeInBits () const |
| unsigned | getAddressSpace () const |
| LLT | getElementType () const |
| Returns the vector's element type. Only valid for vector types. More... | |
| LLT | halfScalarSize () const |
| Get a low-level type with half the size of the original, by halving the size of the scalar type involved. More... | |
| LLT | doubleScalarSize () const |
| Get a low-level type with twice the size of the original, by doubling the size of the scalar type involved. More... | |
| LLT | halfElements () const |
| Get a low-level type with half the size of the original, by halving the number of vector elements of the scalar type involved. More... | |
| LLT | doubleElements () const |
| Get a low-level type with twice the size of the original, by doubling the number of vector elements of the scalar type involved. More... | |
| void | print (raw_ostream &OS) const |
| bool | operator== (const LLT &RHS) const |
| bool | operator!= (const LLT &RHS) const |
Static Public Member Functions | |
| static LLT | scalar (unsigned SizeInBits) |
| Get a low-level scalar or aggregate "bag of bits". More... | |
| static LLT | pointer (uint16_t AddressSpace, unsigned SizeInBits) |
| Get a low-level pointer in the given address space (defaulting to 0). More... | |
| static LLT | vector (uint16_t NumElements, unsigned ScalarSizeInBits) |
| Get a low-level vector of some number of elements and element width. More... | |
| static LLT | vector (uint16_t NumElements, LLT ScalarTy) |
| Get a low-level vector of some number of elements and element type. More... | |
Friends | |
| struct | DenseMapInfo< LLT > |
Definition at line 41 of file LowLevelType.h.
| enum llvm::LLT::TypeKind : uint16_t |
| Enumerator | |
|---|---|
| Invalid | |
| Scalar | |
| Pointer | |
| Vector | |
Definition at line 43 of file LowLevelType.h.
Definition at line 75 of file LowLevelType.h.
|
inlineexplicit |
Definition at line 81 of file LowLevelType.h.
|
explicit |
Construct a low-level type based on an LLVM type.
Definition at line 21 of file LowLevelType.cpp.
References assert(), llvm::DataLayout::getTypeSizeInBits(), Invalid, llvm::Type::isSized(), Pointer, Scalar, and Vector.
|
explicit |
Definition at line 43 of file LowLevelType.cpp.
References assert(), llvm::MVT::getSizeInBits(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), Invalid, llvm::MVT::isValid(), llvm::MVT::isVector(), Scalar, and Vector.
|
inline |
Get a low-level type with twice the size of the original, by doubling the number of vector elements of the scalar type involved.
The source must be a vector type. For example <2 x s32> will become <4 x s32>. Doubling the number of elements in sN produces <2 x sN>.
Definition at line 160 of file LowLevelType.h.
References assert(), isPointer(), print(), and Vector.
Referenced by llvm::LegalizerInfo::findLegalType().
|
inline |
Get a low-level type with twice the size of the original, by doubling the size of the scalar type involved.
For example s32 will become s64, <2 x s32> will become <2 x s64>.
Definition at line 137 of file LowLevelType.h.
References assert(), and isPointer().
Referenced by llvm::LegalizerInfo::findLegalType().
|
inline |
Definition at line 114 of file LowLevelType.h.
References assert(), and isPointer().
Referenced by llvm::MachineIRBuilder::buildGlobalValue(), and print().
|
inline |
Returns the vector's element type. Only valid for vector types.
Definition at line 120 of file LowLevelType.h.
References assert(), isVector(), and scalar().
Referenced by llvm::LegalizerInfo::computeTables(), and llvm::LegalizerInfo::getAction().
|
inline |
Returns the number of elements in a vector LLT.
Must only be called on vector types.
Definition at line 98 of file LowLevelType.h.
References assert(), and isVector().
Referenced by llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildSelect(), llvm::LegalizerInfo::computeTables(), and llvm::LegalizerInfo::getAction().
|
inline |
Definition at line 110 of file LowLevelType.h.
Referenced by halfScalarSize(), and print().
|
inline |
Returns the total size of the type. Must only be called on sized types.
Definition at line 104 of file LowLevelType.h.
References isPointer(), and isScalar().
Referenced by llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildSExtOrTrunc(), llvm::LegalizerHelper::fewerElementsVector(), llvm::LegalizerInfo::findLegalType(), llvm::LegalizerInfo::getAction(), llvm::AArch64RegisterBankInfo::getInstrMapping(), getRegClassForTypeOnBank(), llvm::LegalizerHelper::libcall(), llvm::LegalizerHelper::narrowScalar(), llvm::AArch64InstructionSelector::select(), selectCopy(), selectFPConvOpc(), vector(), and llvm::LegalizerHelper::widenScalar().
|
inline |
Get a low-level type with half the size of the original, by halving the number of vector elements of the scalar type involved.
The source must be a vector type with an even number of elements. For example <4 x s32> will become <2 x s32>, <2 x s32> will become s32.
Definition at line 146 of file LowLevelType.h.
References assert(), isVector(), scalar(), and Vector.
Referenced by llvm::LegalizerInfo::findLegalType().
|
inline |
Get a low-level type with half the size of the original, by halving the size of the scalar type involved.
For example s32 will become s16, <2 x s32> will become <2 x s16>.
Definition at line 128 of file LowLevelType.h.
References assert(), getScalarSizeInBits(), and isPointer().
Referenced by llvm::LegalizerInfo::findLegalType().
|
inline |
Definition at line 92 of file LowLevelType.h.
References Pointer.
Referenced by llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFrameIndex(), llvm::MachineIRBuilder::buildGEP(), llvm::MachineIRBuilder::buildGlobalValue(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildStore(), doubleElements(), doubleScalarSize(), getAddressSpace(), getSizeInBits(), halfScalarSize(), print(), and llvm::AArch64InstructionSelector::select().
|
inline |
Definition at line 90 of file LowLevelType.h.
References Scalar.
Referenced by llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildBrCond(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildGEP(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSub(), llvm::MachineIRBuilder::buildUAdde(), getSizeInBits(), print(), llvm::AArch64InstructionSelector::select(), selectFPConvOpc(), and vector().
|
inline |
Definition at line 88 of file LowLevelType.h.
References Invalid.
Referenced by llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildSequence(), llvm::MachineIRBuilder::buildStore(), llvm::MIRPrinter::convert(), llvm::MIPrinter::print(), print(), llvm::MachineInstr::print(), llvm::AArch64InstructionSelector::select(), and unsupportedBinOp().
|
inline |
Definition at line 94 of file LowLevelType.h.
References Vector.
Referenced by llvm::MachineIRBuilder::buildAdd(), llvm::MachineIRBuilder::buildFCmp(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildMul(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildSub(), llvm::LegalizerInfo::computeTables(), llvm::LegalizerInfo::getAction(), getElementType(), llvm::AArch64RegisterBankInfo::getInstrMapping(), getNumElements(), halfElements(), print(), and llvm::LegalizerInfo::setScalarInVectorAction().
Definition at line 173 of file LowLevelType.h.
Definition at line 168 of file LowLevelType.h.
Get a low-level pointer in the given address space (defaulting to 0).
Definition at line 57 of file LowLevelType.h.
References Pointer.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), IncomingArgHandler::getStackAddress(), OutgoingArgHandler::getStackAddress(), and llvm::AArch64InstructionSelector::select().
| void LLT::print | ( | raw_ostream & | OS | ) | const |
Definition at line 61 of file LowLevelType.cpp.
References assert(), getAddressSpace(), getScalarSizeInBits(), isPointer(), isScalar(), isValid(), isVector(), and llvm_unreachable.
Referenced by doubleElements(), and llvm::operator<<().
Get a low-level scalar or aggregate "bag of bits".
Definition at line 51 of file LowLevelType.h.
References assert(), and Scalar.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::RegisterBankInfo::OperandsMapper::createVRegs(), llvm::LegalizerInfo::findLegalType(), getElementType(), OutgoingArgHandler::getStackAddress(), halfElements(), llvm::LegalizerHelper::narrowScalar(), and llvm::AArch64InstructionSelector::select().
Get a low-level vector of some number of elements and element width.
NumElements must be at least 2.
Definition at line 63 of file LowLevelType.h.
References assert(), and Vector.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::AArch64InstructionSelector::select().
Get a low-level vector of some number of elements and element type.
Definition at line 69 of file LowLevelType.h.
References assert(), getSizeInBits(), isScalar(), and Vector.
|
friend |
Definition at line 175 of file LowLevelType.h.
1.8.6