OpenASIP
2.0
|
#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. More... | |
int | subwCount_ |
Subword count of the value type. More... | |
bool | isFloat_ |
If true, the value type is a floating point type. More... | |
Static Public Attributes | |
static const std::set< TCEString > | SUPPORTED_LLVM_VALUE_TYPES |
Contains all supported LLVM value types (<ValueType>). More... | |
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 8628 of file TDGen.cc.
References assert.
Referenced by valueType().
ValueType::ValueType | ( | const TCEString & | vtStr | ) |
Constructor.
vtStr | Value type string in LLVM format. |
Definition at line 8639 of file TDGen.cc.
References isFloat_, subwCount_, subwWidth_, and valueType().
ValueType::ValueType | ( | const Operand & | opnd | ) |
Constructor.
Definition at line 8651 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 8688 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 8742 of file TDGen.cc.
References subwCount_.
Operand::OperandType ValueType::operandType | ( | ) | const |
Returns the Operand::OperandType of ValueType.
Definition at line 8752 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 8675 of file TDGen.cc.
References isFloat_, subwCount_, and subwWidth_.
int ValueType::subwordCount | ( | ) | const |
Returns ValueType's subword count.
Definition at line 8722 of file TDGen.cc.
References subwCount_.
int ValueType::subwordWidth | ( | ) | const |
Returns ValueType's subword bitwidth.
Definition at line 8712 of file TDGen.cc.
References subwWidth_.
Referenced by vectorTypesOfSubwordWidth().
Returns given Operand as a value type object.
Definition at line 8853 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 8817 of file TDGen.cc.
References assert, TDGen::OT_REG_FP, Conversion::toInt(), and ValueType().
Referenced by ValueType(), and valueType().
TCEString ValueType::valueTypeStr | ( | ) | const |
Returns ValueType in LLVM value type string format, e.g. "v2i32".
Definition at line 8772 of file TDGen.cc.
References isFloat_, subwCount_, subwWidth_, and Conversion::toString().
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), TDGen::createSelectPatterns(), TDGen::genGeneratedTCEPlugin_getVectorImmediateOpcode(), TDGen::genTCETargetLoweringSIMD_addVectorRegisterClasses(), TDGen::hasRegisterClassSupport(), isSupportedByLLVM(), valueType(), valueTypeStr(), TDGen::writeScalarOperationExploitations(), TDGen::writeScalarToVectorDefs(), TDGen::writeVectorBitwiseOperationDefs(), TDGen::writeVectorImmediateWriteDefs(), TDGen::writeVectorRegisterClasses(), and TDGen::writeVectorRegisterMoveDefs().
Returns Operand in LLVM value type string format, e.g. "v2i32".
operand | Operand that will be transformed to value type string. |
Definition at line 8799 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 8903 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 8867 of file TDGen.cc.
References isSupportedByLLVM(), and width().
int ValueType::width | ( | ) | const |
Returns ValueType's whole bitwidth.
Definition at line 8702 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 712 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), isFloat(), operandType(), operator=(), ValueType(), valueTypeStr(), and TDGen::writeVectorBitwiseOperationDefs().
int TDGenerator::ValueType::subwCount_ |
Subword count of the value type.
Definition at line 710 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), isVector(), operator=(), subwordCount(), ValueType(), valueTypeStr(), width(), TDGen::writeOperationDefUsingGivenOperandTypes(), and TDGen::writeScalarToVectorDefs().
int TDGenerator::ValueType::subwWidth_ |
Subword width of the value type.
Definition at line 708 of file TDGen.hh.
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), operandType(), operator=(), subwordWidth(), ValueType(), valueTypeStr(), width(), and TDGen::writeOperationDefUsingGivenOperandTypes().
|
static |
Contains all supported LLVM value types (<ValueType>).
Definition at line 715 of file TDGen.hh.
Referenced by isSupportedByLLVM().