OpenASIP 2.2
|
#include <TDGen.hh>
Public Member Functions | |
ValueType (int subwWidth, int subwCount, bool isFloat) | |
ValueType (const TCEString &vtStr) | |
ValueType (const Operand &opnd) | |
ValueType (const ValueType &other) | |
ValueType & | operator= (const ValueType &other) |
bool | isSupportedByLLVM () const |
int | width () const |
int | subwordWidth () const |
int | subwordCount () const |
bool | isFloat () const |
bool | isVector () const |
Operand::OperandType | operandType () const |
TCEString | valueTypeStr () const |
Static Public Member Functions | |
static TCEString | valueTypeStr (const Operand &operand) |
static ValueType | valueType (const TCEString &vtStr) |
static ValueType | valueType (const Operand &operand) |
static std::vector< ValueType > | vectorTypesOfWidth (int width, bool onlyInts=false) |
static std::vector< ValueType > | vectorTypesOfSubwordWidth (int subwordWidth, bool onlyInt=false) |
Public Attributes | |
int | subwWidth_ |
Subword width of the value type. | |
int | subwCount_ |
Subword count of the value type. | |
bool | isFloat_ |
If true, the value type is a floating point type. | |
Static Public Attributes | |
static const std::set< TCEString > | SUPPORTED_LLVM_VALUE_TYPES |
Contains all supported LLVM value types (<ValueType>). | |
Represents an LLVM value type to express different value types.
ValueType::ValueType | ( | int | subwWidth, |
int | subwCount, | ||
bool | isFloat | ||
) |
Constructor.
subwWidth | Subword width. |
subwCount | Subword count. |
isFloat | True, if is a floating point type. |
Definition at line 8702 of file TDGen.cc.
References assert.
ValueType::ValueType | ( | const TCEString & | vtStr | ) |
Constructor.
vtStr | Value type string in LLVM format. |
Definition at line 8713 of file TDGen.cc.
References isFloat_, subwCount_, subwWidth_, and valueType().
ValueType::ValueType | ( | const Operand & | opnd | ) |
Constructor.
Definition at line 8725 of file TDGen.cc.
References isFloat_, subwCount_, subwWidth_, and valueType().
ValueType::ValueType | ( | const ValueType & | other | ) |
bool ValueType::isFloat | ( | ) | const |
bool ValueType::isSupportedByLLVM | ( | ) | const |
Tells whether ValueType is supported by LLVM or not.
Definition at line 8762 of file TDGen.cc.
References SUPPORTED_LLVM_VALUE_TYPES, and valueTypeStr().
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), TDGen::genTCETargetLoweringSIMD_getSetCCResultVT(), vectorTypesOfSubwordWidth(), and vectorTypesOfWidth().
bool ValueType::isVector | ( | ) | const |
Tells whether ValueType is a vector type or not.
Definition at line 8816 of file TDGen.cc.
References subwCount_.
Operand::OperandType ValueType::operandType | ( | ) | const |
Returns the Operand::OperandType of ValueType.
Definition at line 8826 of file TDGen.cc.
References Operand::BOOL, Operand::FLOAT_WORD, Operand::HALF_FLOAT_WORD, isFloat_, subwWidth_, and Operand::UINT_WORD.
Referenced by TDGen::writeOperationDefUsingGivenOperandTypes().
Value assignment.
other | Value to be assigned. |
Definition at line 8749 of file TDGen.cc.
References isFloat_, subwCount_, and subwWidth_.
int ValueType::subwordCount | ( | ) | const |
Returns ValueType's subword count.
Definition at line 8796 of file TDGen.cc.
References subwCount_.
int ValueType::subwordWidth | ( | ) | const |
Returns ValueType's subword bitwidth.
Definition at line 8786 of file TDGen.cc.
References subwWidth_.
Referenced by vectorTypesOfSubwordWidth().
Returns given Operand as a value type object.
Definition at line 8927 of file TDGen.cc.
References valueType(), and valueTypeStr().
Returns given LLVM value type string (e.g. "v2i32") as ValueType.
vtStr | LLVM value type string to be converted to ValueType. |
Definition at line 8891 of file TDGen.cc.
References assert, TDGen::OT_REG_FP, and Conversion::toInt().
Referenced by valueType(), ValueType(), and ValueType().
TCEString ValueType::valueTypeStr | ( | ) | const |
Returns ValueType in LLVM value type string format, e.g. "v2i32".
Definition at line 8846 of file TDGen.cc.
References isFloat_, subwCount_, subwWidth_, and Conversion::toString().
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), TDGen::associatedVectorRegisterClass(), TDGen::createSelectPatterns(), TDGen::genGeneratedTCEPlugin_getVectorImmediateOpcode(), TDGen::genTCETargetLoweringSIMD_addVectorRegisterClasses(), TDGen::hasRegisterClassSupport(), TDGen::hasRegisterClassSupport(), isSupportedByLLVM(), valueType(), valueTypeStr(), TDGen::writeScalarOperationExploitations(), TDGen::writeScalarToVectorDefs(), TDGen::writeVectorBitwiseOperationDefs(), TDGen::writeVectorImmediateWriteDefs(), TDGen::writeVectorRegisterClasses(), TDGen::writeVectorRegisterMoveDefs(), and TDGen::writeVectorTruncStoreDefs().
Returns Operand in LLVM value type string format, e.g. "v2i32".
operand | Operand that will be transformed to value type string. |
Definition at line 8873 of file TDGen.cc.
References Operand::elementCount(), Operand::elementWidth(), Operand::FLOAT_WORD, Operand::HALF_FLOAT_WORD, Operand::type(), and valueTypeStr().
|
static |
Returns a list of vector value types that match the given subword width.
Currently filters out unsupported LLVM value types.
subwordWidth | The subword width of the desired value types. |
onlyInts | If true, floating point types are not included to output. |
Definition at line 8977 of file TDGen.cc.
References BYTE_BITWIDTH, isSupportedByLLVM(), SIMD_WORD_WIDTH, and subwordWidth().
Returns a list of vector value types that match the given width.
Currently filters out unsupported LLVM value types.
width | The width of the desired value types. |
onlyInts | If true, floating point types are not included to output. |
Definition at line 8941 of file TDGen.cc.
References isSupportedByLLVM(), and width().
Referenced by TDGen::writeScalarOperationExploitations(), and TDGen::writeVectorBitwiseOperationDefs().
int ValueType::width | ( | ) | const |
Returns ValueType's whole bitwidth.
Definition at line 8776 of file TDGen.cc.
References subwCount_, and subwWidth_.
Referenced by TDGen::associateRegistersWithVectorRegisterClasses(), TDGen::createVectorRVDRegNums(), TDGen::genGeneratedTCEPlugin_getVectorImmediateOpcode(), TDGen::genTCERegisterInfo_setReservedVectorRegs(), TDGenerator::RegisterClass::RegisterClass(), vectorTypesOfWidth(), TDGen::writeCallingConv(), TDGen::writeVectorBitConversions(), TDGen::writeVectorImmediateWriteDefs(), TDGen::writeVectorLoadStoreOperationExploitations(), and TDGen::writeVectorRegisterClasses().
bool TDGenerator::ValueType::isFloat_ |
If true, the value type is a floating point type.
Definition at line 727 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), isFloat(), operandType(), operator=(), ValueType(), ValueType(), valueTypeStr(), and TDGen::writeVectorBitwiseOperationDefs().
int TDGenerator::ValueType::subwCount_ |
Subword count of the value type.
Definition at line 725 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), isVector(), operator=(), subwordCount(), ValueType(), ValueType(), valueTypeStr(), width(), TDGen::writeOperationDefUsingGivenOperandTypes(), and TDGen::writeScalarToVectorDefs().
int TDGenerator::ValueType::subwWidth_ |
Subword width of the value type.
Definition at line 723 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), operandType(), operator=(), subwordWidth(), ValueType(), ValueType(), valueTypeStr(), width(), and TDGen::writeOperationDefUsingGivenOperandTypes().
|
static |
Contains all supported LLVM value types (<ValueType>).
Definition at line 730 of file TDGen.hh.
Referenced by TDGen::genTCETargetLoweringSIMD_addVectorRegisterClasses(), and isSupportedByLLVM().