OpenASIP 2.2
|
#include <TDGen.hh>
Classes | |
struct | RegInfo |
struct | TerminalDef |
Public Member Functions | |
TDGen (const TTAMachine::Machine &mach, bool initialize=true) | |
virtual | ~TDGen () |
virtual void | generateBackend (const std::string &path) const |
virtual std::string | generateBackend () const |
Static Public Attributes | |
static const char | OT_REG_BOOL = 'b' |
static const char | OT_REG_INT = 'r' |
static const char | OT_REG_LONG = 's' |
static const char | OT_REG_FP = 'f' |
static const char | OT_REG_HFP = 'h' |
static const char | OT_REG_DOUBLE = 'd' |
static const char | OT_IMM_BOOL = 'j' |
static const char | OT_IMM_INT = 'i' |
static const char | OT_IMM_FP = 'k' |
static const char | OT_IMM_HFP = 'l' |
static const char | OT_IMM_LONG = 'a' |
static const char | OT_VREG_BOOL = 'a' |
static const char | OT_VREG_INT8 = 'q' |
static const char | OT_VREG_INT16 = 't' |
static const char | OT_VREG_INT32 = 'u' |
static const char | OT_VREG_FP = 'e' |
static const char | OT_VREG_HFP = 'g' |
Protected Types | |
enum | RegType { GPR = 0 , RESERVED , ARGUMENT , RESULT } |
enum | RegsToProcess { ALL_REGISTERS , ONLY_EXTRAS , ONLY_LANES , ONLY_NORMAL } |
typedef std::map< std::string, std::vector< std::string > > | RegClassMap |
Protected Member Functions | |
bool | writeRegisterInfo (std::ostream &o) |
void | writeStartOfRegisterInfo (std::ostream &o) |
void | writeOperandDefs (std::ostream &o) |
void | writeIntegerImmediateDefs (std::ostream &o, const ImmInfo &iivis) |
void | writeMoveImmediateDefs (std::ostream &o) |
void | writeInstrInfo (std::ostream &o) |
void | writeBackendCode (std::ostream &o) |
void | writeTopLevelTD (std::ostream &o) |
void | writeInstrFormats (std::ostream &o) |
bool | checkRequiredRegisters () |
void | analyzeRegisters () |
void | analyzeRegisterFileClasses () |
void | analyzeRegisters (RegsToProcess regsToProcess) |
void | gatherAllMachineOperations () |
void | analyzeMachineVectorRegisterClasses () |
void | analyzeMachineRegisters () |
void | associateRegistersWithVectorRegisterClasses () |
void | orderEqualWidthRegistersToRoundRobin () |
void | verbose (const TCEString &msg) const |
bool | isVectorLoadOperation (const Operation &op) const |
bool | isVectorStoreOperation (const Operation &op) const |
bool | isWrongEndianessVectorOp (const Operation &op) const |
bool | isVectorBitwiseOperation (const Operation &op) const |
bool | hasRawOperands (const Operation &op) const |
int | subwordWidthOfRawData (const Operation &op) const |
bool | hasRegisterClassSupport (const Operation &op) const |
bool | hasRegisterClassSupport (const TDGenerator::ValueType &vt) const |
TCEString | associatedVectorRegisterClass (const Operand &operand) const |
void | writePatternReplacement (std::ostream &o, const TCEString &origPat, const TCEString &replacerPat) const |
void | writeOperationDefUsingGivenOperandTypes (std::ostream &o, Operation &op, bool skipPattern, std::vector< TDGenerator::ValueType > inputs, std::vector< TDGenerator::ValueType > outputs, TCEString instrSuffix="") |
void | writeRegisterDef (std::ostream &o, const RegInfo ®, const std::string regName, const std::string regTemplate, const std::string aliases, RegType type) |
void | write64bitRegisterInfo (std::ostream &o) |
void | write32bitRegisterInfo (std::ostream &o) |
void | write16bitRegisterInfo (std::ostream &o) |
void | write8bitRegisterInfo (std::ostream &o) |
void | write1bitRegisterInfo (std::ostream &o) |
void | writeRARegisterInfo (std::ostream &o) |
void | writeGuardRegisterClassInfo (std::ostream &o) |
void | writeVectorRegisterBaseClasses (std::ostream &o) const |
void | writeVectorRegisterNames (std::ostream &o) |
void | writeVectorRegisterClasses (std::ostream &o) const |
void | writeVectorOperationDefs (std::ostream &o, Operation &op, bool skipPattern) |
void | writeVectorOperationDef (std::ostream &o, Operation &op, TCEString valueTypes, const TCEString &attributes, bool skipPattern) |
void | saveAdditionalVectorOperationInfo (const Operation &op, const TCEString &valueTypes, bool isRegisterOp) |
void | writeVectorMemoryOperationDefs (std::ostream &o, Operation &op, bool skipPattern) |
void | writeVectorBitwiseOperationDefs (std::ostream &o, Operation &op, bool skipPattern) |
void | writeVectorRegisterMoveDefs (std::ostream &o) |
void | writeVectorTruncStoreDefs (std::ostream &o) const |
void | writeScalarToVectorDefs (std::ostream &o) const |
void | writeVectorBitConversions (std::ostream &o) const |
void | writeScalarOperationExploitations (std::ostream &o) |
void | writeVectorLoadStoreOperationExploitations (std::ostream &o) |
void | writeWiderVectorOperationExploitations (std::ostream &o) |
void | genGeneratedTCEPlugin_getStore (std::ostream &o) const |
void | genGeneratedTCEPlugin_getLoad (std::ostream &o) const |
void | genGeneratedTCEPlugin_isVectorRegisterMove (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorValueType (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorBroadcastOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorPackOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorSelectOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorShuffle1Opcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorShuffle2Opcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getConstantVectorShuffleOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getExtractElemOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorShlSameOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorShrSameOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorShruSameOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorAndSameOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorIorSameOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorXorSameOpcode (std::ostream &o) const |
void | genTCETargetLoweringSIMD_addVectorRegisterClasses (std::ostream &o) const |
void | genTCETargetLoweringSIMD_associatedVectorRegClass (std::ostream &o) const |
void | genTCETargetLoweringSIMD_getSetCCResultVT (std::ostream &o) const |
void | genTCEInstrInfoSIMD_copyPhysVectorReg (std::ostream &o) const |
void | genGeneratedTCEPlugin_getVectorImmediateOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getGatherOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getLoadOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getAddOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getShlOpcode (std::ostream &o) const |
void | genGeneratedTCEPlugin_getIorOpcode (std::ostream &o) const |
void | writeVectorImmediateWriteDefs (std::ostream &instrInfoTD) |
void | createMinMaxDef (const TCEString &opName, const TCEString &valueName, std::ostream &os) |
void | createVectorMinMaxDef (const TCEString &opName, int bits, char llvmTypeChar, const TCEString &postFix, std::ostream &os) |
void | writeOperationDefs (std::ostream &o, Operation &op, bool skipPattern) |
void | writeOperationDef (std::ostream &o, Operation &op, const std::string &operandTypes, const std::string &attrs, bool skipPattern, std::string backendPrefix="") |
std::string | emulatingOpNodeLLVMName (const Operation &op, const OperationDAG &dag, const OperationNode &node, const std::string &operandTypes) |
void | writeEmulationPattern (std::ostream &o, const Operation &op, const OperationDAG &dag) |
void | write64bitMoveDefs (std::ostream &o) |
void | writeControlFlowInstrDefs (std::ostream &os) |
void | writeCondBranchDefs (std::ostream &os) |
void | writeCallDef (std::ostream &o) |
void | writeHWLoopDef (std::ostream &o) |
virtual void | writeCallDefRegs (std::ostream &o) |
void | writeRegisterClasses (std::ostream &o) |
virtual TCEString | llvmOperationPattern (const Operation &op, char operandType=' ') const |
virtual TCEString | llvmOperationName (const TCEString &opName) const |
bool | operationCanBeMatched (const Operation &op, std::set< std::string > *recursionCycleCheck=NULL, bool recursionHasStore=false) |
bool | operationDAGCanBeMatched (const OperationDAG &op, std::set< std::string > *recursionCycleCheck=NULL, bool recursionHasStore=false) |
const OperationDAG * | getMatchableOperationDAG (const Operation &op) |
const std::vector< OperationDAG * > | getMatchableOperationDAGs (const Operation &op) |
std::string | tceOperationPattern (const Operation &op) |
std::string | patOutputs (const Operation &op, const std::string &oprTypes) |
std::string | patInputs (const Operation &op, const std::string &oprTypes) |
virtual std::string | operandToString (const Operand &operand, bool match, char operandType, const std::string &immDefName="") |
std::string | operationNodeToString (const Operation &op, const OperationDAG &dag, const OperationNode &node, bool emulationPattern, const std::string &operandTypes) |
std::string | constantNodeString (const Operation &op, const OperationDAG &dag, const ConstantNode &node, const std::string &operandTypes, const OperationDAGNode *successor=nullptr) |
std::string | dagNodeToString (const Operation &op, const OperationDAG &dag, const OperationDAGNode &node, bool emulationPattern, const std::string &operandTypes, const Operation *emulatingOp=nullptr, const OperationDAGNode *successor=nullptr) |
std::string | operationPattern (const Operation &op, const OperationDAG &dag, const std::string &operandTypes) |
virtual char | operandChar (Operand &operand) |
std::string | createDefaultOperandTypeString (const Operation &op) |
void | writeVectorStoreDefs (std::ostream &o, const TCEString &opName, const TCEString &opNameSuffix, bool addrImm, const TCEString &dataType, bool writePredicatedVersions) |
void | genTCEInstrInfo_copyPhys64bitReg (std::ostream &o) const |
void | writeArgRegsArray (std::ostream &os) |
virtual void | createSelectPatterns (std::ostream &os) |
void | writeAddressingModeDefs (std::ostream &o) |
void | createByteExtLoadPatterns (std::ostream &os) |
void | createShortExtLoadPatterns (std::ostream &os) |
void | create32BitExtLoadPatterns (std::ostream &os) |
void | createEndiannesQuery (std::ostream &os) |
void | createConstantMaterializationQuery (std::ostream &os) |
void | createConstShiftPatterns (std::ostream &os) |
void | writeOperationDefs (std::ostream &o, Operation &op, const std::string &operandTypes, const std::string &attrs, bool skipPattern, std::string backendPrefix="") |
void | writeVectorStoreDefs (std::ostream &o, Operation &op, int vectorLen) |
void | writeVectorTruncStoreDefs (std::ostream &o, Operation &op, int bitsize, int vectorLen) |
void | createGetMaxMemoryAlignment (std::ostream &os) const |
void | writeVectorAnyextPattern (std::ostream &o, Operation &op, const TCEString &loadPatternName, int vectorLen) |
void | writeVectorLoadDefs (std::ostream &o, const TCEString &opName, const TCEString &opNameSuffix, bool addrImm, const TCEString &resultType, const TCEString &loadPatternName, bool writePredicatedVersions) |
virtual void | writeImmediateDef (std::ostream &o, const std::string &defName, const std::string &operandType, const std::string &predicate) |
void | writeInstrDef (std::ostream &o, const std::string &instrDefName, const std::string &outs, const std::string &ins, const std::string &asmString, const std::string &pattern) |
void | writeVectorLoadDefs (std::ostream &o, Operation &op, const TCEString &loadPatternName, int vectorLen) |
void | writeBooleanStorePatterns (std::ostream &os) |
std::string | immediatePredicate (int64_t lowerBoundInclusive, uint64_t upperBoundInclusive) |
std::string | immediateOperandNameForEmulatedOperation (const OperationDAG &, const Operand &operand) |
bool | areImmediateOperandsLegal (const Operation &operation, const std::string &operandTypes) const |
void | writeBroadcastDefs (std::ostream &o, Operation &op, int vectorLen) |
bool | writePortGuardedJumpDefPair (std::ostream &os, const TCEString &tceop1, const TCEString &tceop2, bool fp=false) |
std::string | subPattern (const Operation &op, const OperationDAG &dag) |
OperationDAG * | createTrivialDAG (Operation &op) |
bool | canBeImmediate (const OperationDAG &dag, const TerminalNode &node) |
virtual void | createMinMaxGenerator (std::ostream &os) |
void | writeCallSeqStart (std::ostream &os) |
void | writeMiscPatterns (std::ostream &o) |
void | generateLoadStoreCopyGenerator (std::ostream &os) |
void | createParamDRegNums (std::ostream &os) |
virtual void | createVectorRVDRegNums (std::ostream &os) |
void | writeCallingConv (std::ostream &os) |
void | writeCallingConvLicenceText (std::ostream &os) |
void | writeConstShiftPat (std::ostream &os, const TCEString &nodeName, const TCEString &opNameBase, int i) |
void | createBoolAndHalfLoadPatterns (std::ostream &os) |
virtual void | createConstantMaterializationPatterns (std::ostream &os) |
void | createBranchAnalysis (std::ostream &os) |
void | genTCERegisterInfo_setReservedVectorRegs (std::ostream &os) const |
void | writeGetPointerAdjustmentQuery (std::ostream &os) const |
bool | canBePredicated (Operation &op, const std::string &operandTypes) |
TCEString | getLLVMPatternWithConstants (const Operation &op, const std::string &operandTypes, const std::string &operand0, const std::string &operand1) const |
std::string | operandTypesToRegisters (const std::string &opdTypes) const |
char | operandTypeToRegister (const char &opdType) const |
TCEString | getMovePattern (const char &opdType, const std::string &inputPattern) const |
void | initializeBackendContents () |
Static Protected Member Functions | |
static std::vector< std::string > | supportedStackAccessOperations (const TTAMachine::Machine &mach) |
Protected Attributes | |
std::map< ImmInfoKey, std::string > | immOperandDefs_ |
Maps (operation, operand) pairs to i32 immediate operand definition names. | |
const TTAMachine::Machine & | mach_ |
ImmInfo * | immInfo_ |
unsigned | dregNum_ |
std::string | registerInfo_ |
std::string | addressingModeDefs_ |
std::string | operandDefs_ |
std::string | instrInfo_ |
std::string | instrFormats_ |
std::string | callingConv_ |
std::string | argRegsArray_ |
std::string | backendCode_ |
std::string | topLevelTD_ |
OperationDAGSelector::OperationSet | allOpNames_ |
Contains all operation names in upper case. | |
std::map< TCEString, Operation * > | scalarOps_ |
Contains all scalar operations (<Name, Operation>). | |
std::map< TCEString, Operation * > | vectorOps_ |
Contains all vector operations (<Name, Operation>). | |
std::map< int, TCEString > | baseClasses_ |
Contains vector base classes for register files (<Width, Name>). | |
std::map< int, std::vector< TDGenerator::RegisterInfo > > | registers_ |
Contains registers fit for being vector registers (<Width, Registers>). | |
std::map< TCEString, TDGenerator::RegisterClass > | vRegClasses_ |
Contains required vector register classes (<ValueType, RegClass>). | |
std::map< TCEString, TDGenerator::InstructionInfo > | registerStores_ |
All register store operations (<ValueType, InstrInfo>). | |
std::map< TCEString, TDGenerator::InstructionInfo > | registerLoads_ |
All register load operations (<ValueType, InstrInfo>). | |
std::map< TCEString, TDGenerator::InstructionInfo > | immediateStores_ |
All immediate store operations (<ValueType, InstrInfo>). | |
std::map< TCEString, TDGenerator::InstructionInfo > | immediateLoads_ |
All immediate load operations (<ValueType, InstrInfo>). | |
std::map< TCEString, TCEString > | packOperations_ |
Contains machine's PACK instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | vbcastOperations_ |
Contains machine's VBCAST instructions (<ValueType, InstrName>). | |
std::vector< std::pair< const Operation *, TCEString > > | truncOperations_ |
Contains machine's TRUNCxx/CFH instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | vselectOperations_ |
Contains machine's VSELECT instructions (<instrName, ValueType>). | |
std::map< TCEString, TCEString > | vshuffle1Operations_ |
Contains machine's VSHUFFLE1 instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | vshuffle2Operations_ |
Contains machine's VSHUFFLE2 instructions (<ValueType, InstrName>). | |
std::map< std::pair< TCEString, std::vector< int > >, TCEString > | vcshuffleOperations_ |
Contains machine's VCSHUFFLE instructions (<<ValueType, ConstantSelects>, InstrName>). | |
std::map< TCEString, TCEString > | extractElemOperations_ |
Contains machine's EXTRACTELEM instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | shlSameOperations_ |
Contains machine's SHLSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | shrSameOperations_ |
Contains machine's SHRSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | shruSameOperations_ |
Contains machine's SHRUSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | andSameOperations_ |
Contains machine's ANDSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | iorSameOperations_ |
Contains machine's IORSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | xorSameOperations_ |
Contains machine's XORSAME instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | gatherOperations_ |
Contains machine's GATHER instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | addOperations_ |
Contains machine's add instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | shlOperations_ |
Contains machine's shl instructions (<ValueType, InstrName>). | |
std::map< TCEString, TCEString > | iorOperations_ |
Contains machine's shl instructions (<ValueType, InstrName>). | |
std::set< TCEString > | movOperations_ |
Contains all moves between register classes (<InstrName>). | |
std::vector< RegInfo > | regs1bit_ |
std::vector< RegInfo > | regs8bit_ |
std::vector< RegInfo > | regs16bit_ |
std::vector< RegInfo > | regs32bit_ |
std::vector< RegInfo > | regs64bit_ |
std::vector< std::string > | llvmGuardRegs_ |
The LLVM register defs used as guards. | |
std::map< std::string, RegInfo > | regs_ |
Map of generated llvm register names to physical register in the machine. | |
std::vector< std::string > | argRegNames_ |
std::vector< std::string > | resRegNames_ |
std::vector< std::string > | gprRegNames_ |
std::map< std::string, std::string > | opNames_ |
std::map< std::string, std::string > | truePredOps_ |
std::map< std::string, std::string > | falsePredOps_ |
int | maxVectorSize_ |
int | highestLaneInt_ |
int | highestLaneBool_ |
bool | hasExBoolRegs_ |
bool | hasExIntRegs_ |
bool | hasSelect_ |
bool | hasConditionalMoves_ |
int | maxScalarWidth_ |
bool | littleEndian_ |
unsigned int | argRegCount_ |
unsigned int | requiredI32Regs_ |
Minimum number of 32 bit registers. | |
unsigned int | requiredI64Regs_ |
bool | prebypassStackIndeces_ |
bool | use64bitForFP_ |
std::set< RegInfo > | guardedRegs_ |
List of register that are associated with a guard on a bus. | |
std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > | tempRegFiles_ |
Register files whose last reg reserved for temp reg copies. | |
RegClassMap | regsInClasses_ |
All registers in certain group. | |
RegClassMap | regsInRFClasses_ |
std::vector< std::string > | constantMaterializationPredicates_ |
All predicates used in constant materialization patterns. | |
Static Protected Attributes | |
static const int | FP_SUBW_WIDTH |
Float type subword width. | |
static const int | HFP_SUBW_WIDTH |
Half float type subword width. | |
static const int | BOOL_SUBW_WIDTH |
Bool type subword width. | |
static const int | MAX_SCALAR_WIDTH = 64 |
Distincts wide vs scalar registers. | |
static const int | MAX_SUBW_COUNT = SIMD_WORD_WIDTH / BYTE_BITWIDTH |
Maximum number of subwords that any SIMD operation can have. | |
static const bool | EXPLOIT_BIGGER_REGISTERS = true |
If set to true, smaller vector value types can be stored to larger register files, e.g. v4i8 vectors can be stored to registers that are over 32 bits in size. | |
static const std::map< TCEString, TCEString > | OPERATION_PATTERNS_ |
Contains <BaseOpName, OpPattern> key-value pairs. | |
static const std::string | guardRegTemplateName = "Guard" |
TCE Backend plugin source code and .td definition generator.
Generates files for building target architecture plugin for LLVM-TCE backend. This version generates the backend files for the "RISC instruction set style" output and provides useful methods.
|
protected |
|
protected |
Enumerator | |
---|---|
ALL_REGISTERS | |
ONLY_EXTRAS | |
ONLY_LANES | |
ONLY_NORMAL |
|
protected |
TDGen::TDGen | ( | const TTAMachine::Machine & | mach, |
bool | initialize = true |
||
) |
Constructor.
mach | Machine to generate plugin for. |
Definition at line 341 of file TDGen.cc.
References ImmediateAnalyzer::analyze(), argRegCount_, MachineConnectivityCheck::hasConditionalMoves(), hasConditionalMoves_, immInfo_, initializeBackendContents(), TTAMachine::Machine::is64bit(), mach_, maxScalarWidth_, prebypassStackIndeces_, requiredI32Regs_, requiredI64Regs_, tempRegFiles_, and MachineConnectivityCheck::tempRegisterFiles().
|
virtual |
|
protected |
Groups all registers in the machine by register width.
Goes through register files and sorts all real machine registers into <Width, vector<Register>> groups. A base class for each Width is also created.
Definition at line 1478 of file TDGen.cc.
References argRegCount_, assert, baseClasses_, AssocTools::containsKey(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::is64bit(), TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAMachine::Machine::Navigator< ComponentType >::item(), Application::logStream(), mach_, MAX_SCALAR_WIDTH, TTAMachine::Component::name(), orderEqualWidthRegistersToRoundRobin(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), TTAMachine::Machine::registerFileNavigator(), registers_, TDGenerator::RegisterInfo::regName_, regs16bit_, regs1bit_, regs32bit_, regs64bit_, TTAMachine::BaseRegisterFile::size(), tempRegFiles_, Conversion::toString(), Application::VERBOSE_LEVEL_DEFAULT, Application::verboseLevel(), vRegClasses_, and TTAMachine::BaseRegisterFile::width().
Referenced by writeRegisterInfo().
|
protected |
Creates vector register classes required by the machine.
The function goes through all operations and lists all different vector operand value types, after which a register class is created for each vector value type to support the vector value type.
Definition at line 1282 of file TDGen.cc.
References allOpNames_, Operand::elementWidth(), FP_SUBW_WIDTH, HFP_SUBW_WIDTH, NullOperation::instance(), TDGenerator::ValueType::isFloat_, TDGenerator::ValueType::isSupportedByLLVM(), Operand::isVector(), Operation::operand(), Operation::operandCount(), OperationPool::operation(), Operand::RAW_DATA, TDGenerator::ValueType::subwCount_, TDGenerator::ValueType::subwWidth_, Conversion::toString(), Operand::type(), TDGenerator::ValueType::valueTypeStr(), verbose(), and vRegClasses_.
Referenced by writeRegisterInfo().
|
protected |
|
protected |
Iterates through all registers in the machine and adds register information to the register sets.
Definition at line 838 of file TDGen.cc.
References TTAMachine::Machine::busNavigator(), AssocTools::containsKey(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), guardedRegs_, TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAMachine::RegisterFile::isReserved(), TTAMachine::Machine::Navigator< ComponentType >::item(), Application::logStream(), mach_, TTAMachine::Component::name(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), REG_RENAMER_PART, TTAMachine::RegisterGuard::registerFile(), TTAMachine::Machine::registerFileNavigator(), TTAMachine::RegisterGuard::registerIndex(), regs1bit_, regs32bit_, regs64bit_, regs8bit_, TTAMachine::BaseRegisterFile::size(), tempRegFiles_, Application::VERBOSE_LEVEL_DEFAULT, Application::verboseLevel(), TTAMachine::BaseRegisterFile::width(), and TTAMachine::RegisterFile::zeroRegister().
Referenced by writeRegisterInfo().
|
protected |
|
protected |
Checks if the operation can have the specified immediate operands.
Definition at line 7617 of file TDGen.cc.
References assert, ImmInfo::count(), immInfo_, Operand::isAddress(), Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), Operation::operandCount(), OT_IMM_INT, and Operand::swap().
Referenced by writeOperationDef().
Returns the name of the vector class that supports given operand.
operand | Checked if any register class supports value type of this. |
Definition at line 1842 of file TDGen.cc.
References assert, TDGenerator::RegisterClass::name(), TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
Referenced by operandToString().
|
protected |
Attaches proper register groups to register files.
Definition at line 1709 of file TDGen.cc.
References TDGenerator::RegisterClass::addRegisters(), EXPLOIT_BIGGER_REGISTERS, registers_, TDGenerator::RegisterClass::valueType(), vRegClasses_, and TDGenerator::ValueType::width().
Referenced by writeRegisterInfo().
|
protected |
Returns true if the operand corresponding to the given TerminalNode in an OperationDAG can be immediate in the llvm pattern.
dag | DAG of the whole operation. |
node | TerminalNode corresponding to the operand queried. |
Definition at line 6123 of file TDGen.cc.
References BoostGraph< GraphNode, GraphEdge >::headNode(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::outDegree(), and BoostGraph< GraphNode, GraphEdge >::outEdge().
Referenced by dagNodeToString().
|
protected |
Returns true if the instruction can be predicated.
TODO
Definition at line 7665 of file TDGen.cc.
References hasConditionalMoves_, and OT_IMM_INT.
Referenced by writeOperationDef().
|
protected |
Checks that the target machine has required registers to build a usable plugin.
Definition at line 3336 of file TDGen.cc.
References __func__, TTAMachine::Machine::is64bit(), mach_, regs32bit_, regs64bit_, requiredI32Regs_, requiredI64Regs_, and tempRegFiles_.
Referenced by writeRegisterInfo().
|
protected |
Definition at line 5611 of file TDGen.cc.
References assert, BoostGraph< GraphNode, GraphEdge >::headNode(), BoostGraph< GraphNode, GraphEdge >::inDegree(), Operand::index(), TTAMachine::Machine::is64bit(), Operand::isInput(), mach_, Operation::numberOfOutputs(), Operation::operand(), TerminalNode::operandIndex(), OT_IMM_BOOL, OT_IMM_FP, OT_IMM_INT, OT_IMM_LONG, OT_REG_BOOL, OT_REG_DOUBLE, OT_REG_FP, OT_REG_HFP, OT_REG_INT, OT_REG_LONG, BoostGraph< GraphNode, GraphEdge >::outDegree(), BoostGraph< GraphNode, GraphEdge >::outEdge(), BoostGraph< GraphNode, GraphEdge >::predecessors(), Conversion::toString(), and ConstantNode::value().
Referenced by dagNodeToString().
|
protected |
Definition at line 6808 of file TDGen.cc.
References TTAMachine::Machine::hasOperation(), and mach_.
Referenced by writeInstrInfo().
|
protected |
Definition at line 8608 of file TDGen.cc.
References TTAMachine::Machine::hasOperation(), TTAMachine::Machine::is64bit(), littleEndian_, mach_, and opNames_.
Referenced by writeInstrInfo().
|
protected |
Definition at line 7970 of file TDGen.cc.
References mach_, opNames_, MachineInfo::supportsBoolRegisterGuardedJumps(), and MachineInfo::supportsPortGuardedJumps().
Referenced by writeBackendCode().
|
protected |
Definition at line 6531 of file TDGen.cc.
References TTAMachine::Machine::hasOperation(), TTAMachine::Machine::is64bit(), littleEndian_, mach_, OT_IMM_INT, OT_IMM_LONG, OT_REG_INT, OT_REG_LONG, and SUBIMM.
Referenced by writeInstrInfo().
|
protectedvirtual |
Generates llvm patterns for constants which are not supported directly as immediates by the target machine.
For example, if a target does not sign extending immediates, a pattern is generated that transforms negative constants C to (SUB 0, -C).
Definition at line 7458 of file TDGen.cc.
References constantMaterializationPredicates_, ImmInfo::immediateValueBounds(), immInfo_, opNames_, Conversion::toString(), and writeImmediateDef().
Referenced by writeInstrInfo().
|
protected |
Creates query function for TCEISelLowering for testing if otherwise unsupported constant as immediate can be materialized instead of converting it to constant pool load.
Definition at line 6501 of file TDGen.cc.
References constantMaterializationPredicates_.
Referenced by writeBackendCode().
|
protected |
Definition at line 8599 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), mach_, and writeConstShiftPat().
Referenced by writeInstrInfo().
|
protected |
Definition at line 5439 of file TDGen.cc.
References Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), and operandChar().
Referenced by subPattern(), writeOperationDefs(), and writeOperationDefUsingGivenOperandTypes().
|
protected |
Definition at line 6487 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), littleEndian_, and mach_.
Referenced by writeBackendCode().
|
protected |
Definition at line 7048 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), and mach_.
|
protectedvirtual |
Definition at line 6398 of file TDGen.cc.
References createVectorMinMaxDef(), TTAMachine::Machine::is64bit(), mach_, and opNames_.
Referenced by writeBackendCode().
|
protected |
Definition at line 7010 of file TDGen.cc.
References argRegCount_.
Referenced by writeBackendCode().
|
protectedvirtual |
Definition at line 7065 of file TDGen.cc.
References getLLVMPatternWithConstants(), hasConditionalMoves_, hasSelect_, TTAMachine::Machine::is64bit(), mach_, TDGenerator::RegisterClass::name(), OperationPool::operation(), opNames_, regs1bit_, sub, TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
Referenced by writeInstrInfo().
|
protected |
Definition at line 6691 of file TDGen.cc.
References TTAMachine::Machine::hasOperation(), TTAMachine::Machine::is64bit(), littleEndian_, mach_, OT_IMM_INT, OT_IMM_LONG, OT_REG_INT, and OT_REG_LONG.
Referenced by writeInstrInfo().
|
protected |
Creates a dummy dag for an OSAL operation.
op | Operation to create OperationDAG for. |
Definition at line 6093 of file TDGen.cc.
References BoostGraph< GraphNode, GraphEdge >::addNode(), BoostGraph< GraphNode, GraphEdge >::connectNodes(), Operation::impl(), Operand::index(), Operand::isInput(), Operation::numberOfInputs(), Operation::numberOfOutputs(), and Operation::operand().
Referenced by writeOperationDef(), and RISCVTDGen::writePatternDefinition().
|
protected |
Definition at line 6380 of file TDGen.cc.
References createMinMaxDef().
Referenced by createMinMaxGenerator().
|
protectedvirtual |
Definition at line 7022 of file TDGen.cc.
References maxScalarWidth_, TDGenerator::RegisterClass::numberOfRegisters(), TDGenerator::RegisterClass::registerInfo(), TDGenerator::RegisterInfo::regName_, TDGenerator::RegisterClass::valueType(), vRegClasses_, and TDGenerator::ValueType::width().
Referenced by writeBackendCode().
|
protected |
Converts single OperationDAG node to llvm pattern fragment string.
op | Operation that the whole DAG is for. |
dag | Whole operation DAG. |
node | DAG node to return string for. |
immOp | Index of an operand to define as an immediate or 0 if none. |
emulationPattern | True, if the returned string should be in emulation pattern format. |
Definition at line 5506 of file TDGen.cc.
References __func__, abortWithError, assert, canBeImmediate(), constantNodeString(), dagNodeToString(), immOperandDefs_, BoostGraph< GraphNode, GraphEdge >::inDegree(), Operand::index(), BoostGraph< GraphNode, GraphEdge >::inEdge(), Operand::isInput(), Operand::isOutput(), ImmInfo::key(), Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), TerminalNode::operandIndex(), operandToString(), operationNodeToString(), OT_IMM_BOOL, OT_IMM_INT, OT_REG_BOOL, BoostGraph< GraphNode, GraphEdge >::outDegree(), OperationNode::referencedOperation(), BoostGraph< GraphNode, GraphEdge >::tailNode(), and Conversion::toString().
Referenced by dagNodeToString(), operationNodeToString(), operationPattern(), subPattern(), and writeEmulationPattern().
|
protected |
Returns an llvm name for an operation node in an emulation dag.
op | the operation being emulated. |
dag | dag of the emulated operation |
node | node whose name is being asked |
operandTypes | string containing oeprand types for the emulated op. |
Definition at line 5674 of file TDGen.cc.
References __func__, assert, OperationDAGEdge::dstOperand(), BoostGraph< GraphNode, GraphEdge >::headNode(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), TTAMachine::Machine::is64bit(), mach_, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), operandChar(), TerminalNode::operandIndex(), OT_IMM_INT, OT_IMM_LONG, BoostGraph< GraphNode, GraphEdge >::outDegree(), BoostGraph< GraphNode, GraphEdge >::outEdge(), Operand::RAW_DATA, OperationNode::referencedOperation(), Operand::SINT_WORD, Operand::SLONG_WORD, OperationDAGEdge::srcOperand(), StringTools::stringToUpper(), BoostGraph< GraphNode, GraphEdge >::tailNode(), Operand::type(), Operand::UINT_WORD, and Operand::ULONG_WORD.
Referenced by operationNodeToString().
|
protected |
Gathers all machine op names and sorts them to vector and scalar operations.
Definition at line 997 of file TDGen.cc.
References allOpNames_, MachineInfo::getOpset(), NullOperation::instance(), Operation::isVectorOperation(), mach_, OperationPool::operation(), scalarOps_, and vectorOps_.
Referenced by writeRegisterInfo().
|
virtual |
Writes tce backend plugin code into a single string. Used for hash generation.
Reimplemented in RISCVTDGen.
Definition at line 486 of file TDGen.cc.
References addressingModeDefs_, argRegsArray_, backendCode_, callingConv_, instrFormats_, instrInfo_, operandDefs_, registerInfo_, and topLevelTD_.
|
virtual |
Generates all files required to build a tce backend plugin (excluding static plugin code included from include/llvm/TCE/).
Reimplemented in RISCVTDGen.
Definition at line 431 of file TDGen.cc.
References addressingModeDefs_, argRegsArray_, backendCode_, callingConv_, instrFormats_, instrInfo_, operandDefs_, registerInfo_, topLevelTD_, and writeInstrInfo().
Referenced by LLVMBackend::createPlugin(), and LLVMBackend::pluginFilename().
|
protected |
Generates implementations of getLoad() and getStore() to Backend.inc file.
os | Output stream to the file. |
Definition at line 6365 of file TDGen.cc.
References genGeneratedTCEPlugin_getLoad(), and genGeneratedTCEPlugin_getStore().
Referenced by writeBackendCode().
|
protected |
Definition at line 3285 of file TDGen.cc.
References addOperations_.
Referenced by writeBackendCode().
|
protected |
|
protected |
|
protected |
Definition at line 3255 of file TDGen.cc.
References gatherOperations_.
|
protected |
Definition at line 3315 of file TDGen.cc.
References iorOperations_.
Referenced by writeBackendCode().
|
protected |
Generates implementation of getLoad() function.
Definition at line 2939 of file TDGen.cc.
References guardRegTemplateName, TTAMachine::Machine::hasOperation(), TTAMachine::Machine::is64bit(), littleEndian_, mach_, TDGenerator::RegisterClass::name(), registerLoads_, regsInClasses_, use64bitForFP_, verbose(), and vRegClasses_.
Referenced by generateLoadStoreCopyGenerator().
|
protected |
Definition at line 3271 of file TDGen.cc.
References registerLoads_.
Referenced by writeBackendCode().
|
protected |
Definition at line 3300 of file TDGen.cc.
References shlOperations_.
Referenced by writeBackendCode().
|
protected |
Generates implementation of getStore() function.
Definition at line 2839 of file TDGen.cc.
References guardRegTemplateName, TTAMachine::Machine::is64bit(), littleEndian_, mach_, TDGenerator::RegisterClass::name(), registerStores_, regsInClasses_, use64bitForFP_, verbose(), and vRegClasses_.
Referenced by generateLoadStoreCopyGenerator().
|
protected |
|
protected |
|
protected |
Definition at line 3235 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), vRegClasses_, and TDGenerator::ValueType::width().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 8396 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), and mach_.
|
protected |
Generates implementation of copyPhysVectorReg().
Only the previously created vector register classes are added to the implementation to make LLVM compilation flow work.
Definition at line 3187 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), and vRegClasses_.
Referenced by writeBackendCode().
|
protected |
Definition at line 4203 of file TDGen.cc.
References maxScalarWidth_, TDGenerator::RegisterClass::numberOfRegisters(), TDGenerator::RegisterClass::registerInfo(), TDGenerator::RegisterInfo::regName_, TDGenerator::RegisterClass::valueType(), vRegClasses_, and TDGenerator::ValueType::width().
Referenced by writeBackendCode().
|
protected |
Generates a function that adds existing register classes in lowering phase.
Definition at line 3053 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), TDGenerator::ValueType::SUPPORTED_LLVM_VALUE_TYPES, TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
Referenced by writeBackendCode().
|
protected |
Generates a function that returns correct reg class for a value type.
Definition at line 3098 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), and vRegClasses_.
Referenced by writeBackendCode().
|
protected |
Generates a function that returns correct return value type for comparisons.
In LLVM vector comparison operations result into boolean vectors, which have the same subword count as input vectors.
Definition at line 3128 of file TDGen.cc.
References TDGenerator::ValueType::isSupportedByLLVM(), MAX_SUBW_COUNT, and Conversion::toString().
Referenced by writeBackendCode().
|
protected |
Returns LLVM pattern for the expression with constant value(s) supported by target machine.
For example, for pattern (SUBrri (foo ...), 123) the method returns (SUBrrr (foo ...), (MOVI32ri 123)) if the target machine can not supply the constant "123" as an immediate.
The method should be called after all operation definitions have been created (after all calls to writeOperationDef()).
Return empty string if the given pattern can not be handled because:
op | The operation. |
operandTypes | The preferred operand types. |
operand0 | The pattern for the first operand or constant indicated by operandTypes. |
operand1 | The pattern for the second operand or constant indicated by operandTypes. |
Definition at line 7756 of file TDGen.cc.
References assert, ImmInfo::canTakeImmediate(), ImmInfo::canTakeImmediateByWidth(), getMovePattern(), immInfo_, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), operandTypesToRegisters(), operandTypeToRegister(), opNames_, OT_IMM_BOOL, OT_IMM_FP, OT_IMM_HFP, OT_IMM_INT, StringTools::stringToUpper(), and Conversion::toInt().
Referenced by createSelectPatterns().
|
protected |
Returns first operation DAG that can be used in LLVM pattern.
Operation DAGs are traversed in the order of trigger-semantics in the first .opp file found in path that defines the Operation.
This method does not transfer ownership.
Definition at line 5361 of file TDGen.cc.
References assert, Operation::dag(), Operation::dagCode(), Operation::dagCount(), Operation::dagError(), Operation::name(), and operationDAGCanBeMatched().
Referenced by operationNodeToString(), and writeOperationDef().
|
protected |
Returns a vector of DAGs that can be used in LLVM pattern.
Operation DAGs are traversed in the order of trigger-semantics in the first .opp file found in path that defines the Operation.
This method does not transfer ownership.
Definition at line 5391 of file TDGen.cc.
References Operation::dag(), Operation::dagCode(), Operation::dagCount(), Operation::dagError(), Operation::name(), and operationDAGCanBeMatched().
Referenced by RISCVTDGen::writePatternDefinition().
|
protected |
Definition at line 7909 of file TDGen.cc.
References assert, operandTypeToRegister(), OT_IMM_BOOL, OT_IMM_FP, OT_IMM_HFP, OT_IMM_INT, OT_REG_BOOL, OT_REG_FP, OT_REG_HFP, and OT_REG_INT.
Referenced by getLLVMPatternWithConstants().
|
protected |
Checks if operation has operands of raw type.
op | Operation to be checked. |
Definition at line 1755 of file TDGen.cc.
References Operand::isVector(), Operation::operand(), Operation::operandCount(), Operand::RAW_DATA, and Operand::type().
|
protected |
Checks if all operands of the operation have a supporting register class.
op | Operation whose operands will be checked. |
Definition at line 1805 of file TDGen.cc.
References Operand::isVector(), Operation::operand(), Operation::operandCount(), TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
Referenced by writeScalarOperationExploitations(), writeVectorBitwiseOperationDefs(), and writeVectorOperationDef().
|
protected |
Checks if the ValueType has a supporting register class.
vt | ValueType to be checked. |
Definition at line 1827 of file TDGen.cc.
References TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
|
protected |
Returns corresponding immediate operand name for the emulated operation.
dag | The emulation code of the emulated operation. |
operand | The operand. |
Definition at line 7584 of file TDGen.cc.
References assert, BoostGraph< GraphNode, GraphEdge >::headNode(), immOperandDefs_, ImmInfo::key(), BoostGraph< GraphNode, GraphEdge >::outEdges(), OperationNode::referencedOperation(), and BoostGraph< GraphNode, GraphEdge >::rootNodes().
Referenced by writeEmulationPattern().
|
protected |
Returns llvm predicate expression for short immediate constraint.
Definition at line 7560 of file TDGen.cc.
References Conversion::toString().
Referenced by writeIntegerImmediateDefs(), and writeMoveImmediateDefs().
|
protected |
Definition at line 394 of file TDGen.cc.
References addressingModeDefs_, argRegsArray_, backendCode_, callingConv_, instrFormats_, instrInfo_, operandDefs_, registerInfo_, topLevelTD_, writeAddressingModeDefs(), writeArgRegsArray(), writeBackendCode(), writeCallingConv(), writeInstrFormats(), writeInstrInfo(), writeOperandDefs(), writeRegisterInfo(), and writeTopLevelTD().
Referenced by TDGen().
|
protected |
Checks if the given operation is a bitwise operation.
op | Operation which is checked. |
Definition at line 1995 of file TDGen.cc.
References abortWithError.
Referenced by writeInstrInfo().
|
protected |
Checks if the given operation is a vector load memory operation.
op | Operation which is checked. |
Definition at line 1965 of file TDGen.cc.
References abortWithError.
Referenced by writeInstrInfo().
|
protected |
Checks if the given operation is a vector store memory operation.
op | Operation which is checked. |
Definition at line 1977 of file TDGen.cc.
References abortWithError.
Referenced by writeInstrInfo().
|
protected |
Definition at line 1983 of file TDGen.cc.
References abortWithError.
Returns llvm operation name for the given OSAL operation name, if any.
Definition at line 5109 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), littleEndian_, mach_, and StringTools::stringToLower().
Referenced by writePortGuardedJumpDefPair().
|
protectedvirtual |
Returns LLVM operation pattern for given OSAL operation.
op | Operation for which the LLVM pattern should be returned. |
Definition at line 4895 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), littleEndian_, mach_, Operation::name(), and StringTools::stringToLower().
Referenced by operationCanBeMatched(), operationNodeToString(), writeEmulationPattern(), writeOperationDef(), and RISCVTDGen::writePatternDefinition().
|
protectedvirtual |
Returns corresponding character for given operand type.
operand | Operand under inspection. |
Definition at line 4755 of file TDGen.cc.
References Operand::BOOL, Operand::elementWidth(), Operand::FLOAT_WORD, Operand::HALF_FLOAT_WORD, TTAMachine::Machine::is64bit(), Operand::isVector(), mach_, OT_REG_BOOL, OT_REG_FP, OT_REG_HFP, OT_REG_INT, OT_REG_LONG, OT_VREG_BOOL, OT_VREG_FP, OT_VREG_HFP, OT_VREG_INT16, OT_VREG_INT32, OT_VREG_INT8, Operand::RAW_DATA, Operand::SINT_WORD, Operand::SLONG_WORD, Operand::type(), Operand::UINT_WORD, and Operand::ULONG_WORD.
Referenced by createDefaultOperandTypeString(), emulatingOpNodeLLVMName(), operationCanBeMatched(), writeEmulationPattern(), writeOperationDef(), and RISCVTDGen::writePatternDefinition().
|
protectedvirtual |
Returns LLVM .td format string for an operand.
operand | Operand to return string for. |
match | True, if the string should be in the matching pattern format. |
operandType | Character that identifies the type of the operand. |
Definition at line 5870 of file TDGen.cc.
References __func__, abortWithError, assert, associatedVectorRegisterClass(), Operand::BOOL, Operand::DOUBLE_WORD, Operand::FLOAT_WORD, Operand::HALF_FLOAT_WORD, Operand::index(), TTAMachine::Machine::is64bit(), Operand::isAddress(), Operand::isVector(), mach_, OT_IMM_BOOL, OT_IMM_FP, OT_IMM_HFP, OT_IMM_INT, OT_IMM_LONG, OT_REG_BOOL, OT_REG_FP, OT_REG_HFP, OT_REG_INT, OT_REG_LONG, OT_VREG_BOOL, OT_VREG_FP, OT_VREG_HFP, OT_VREG_INT16, OT_VREG_INT32, OT_VREG_INT8, Operand::RAW_DATA, Operand::SINT_WORD, Operand::SLONG_WORD, Conversion::toString(), Operand::type(), Operand::UINT_WORD, and Operand::ULONG_WORD.
Referenced by dagNodeToString(), patInputs(), patOutputs(), and writeEmulationPattern().
|
protected |
Definition at line 7885 of file TDGen.cc.
References operandTypeToRegister().
Referenced by getLLVMPatternWithConstants().
|
protected |
Definition at line 7894 of file TDGen.cc.
References OT_IMM_BOOL, OT_IMM_FP, OT_IMM_HFP, OT_IMM_INT, OT_REG_BOOL, OT_REG_FP, OT_REG_HFP, and OT_REG_INT.
Referenced by getLLVMPatternWithConstants(), getMovePattern(), and operandTypesToRegisters().
|
protected |
Check if operation can be matched with llvm pattern.
Check if operation has llvmOperationPatters or one of it's DAGs contain only operations, which can be matched.
Definition at line 5281 of file TDGen.cc.
References Operation::dag(), Operation::dagCount(), TTAMachine::Machine::is64bit(), llvmOperationPattern(), mach_, Operation::name(), Operation::numberOfInputs(), operandChar(), operationDAGCanBeMatched(), OT_REG_INT, and OT_REG_LONG.
Referenced by operationDAGCanBeMatched(), writeInstrInfo(), and RISCVTDGen::writePatternDefinition().
|
protected |
Definition at line 5315 of file TDGen.cc.
References Operation::name(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), operationCanBeMatched(), OperationNode::referencedOperation(), and Operation::writesMemory().
Referenced by getMatchableOperationDAG(), getMatchableOperationDAGs(), and operationCanBeMatched().
|
protected |
Converts OSAL dag operation node to llvm .td pattern fragment string.
op | Operation which this operation node is part of. |
dag | Parent DAG of the operation node. |
node | Node to convert to string. |
immOp | Index of an operand to define as immediate or 0 if none. |
emulationPattern | True, if the string should be in emulation pattern format. |
Definition at line 5785 of file TDGen.cc.
References __func__, assert, dagNodeToString(), OperationDAGEdge::dstOperand(), emulatingOpNodeLLVMName(), getMatchableOperationDAG(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), llvmOperationPattern(), Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), OperationNode::referencedOperation(), subPattern(), BoostGraph< GraphNode, GraphEdge >::tailNode(), tceOperationPattern(), and Conversion::toString().
Referenced by dagNodeToString().
|
protected |
Returns operation pattern in llvm .td format.
op | Operation to return pattern for. |
dag | Operation pattern's DAG. |
immOp | Index of an operand to define as an immediate operand, or 0, if all operands should be in registers. |
Definition at line 5421 of file TDGen.cc.
References dagNodeToString(), and OperationDAG::endNodes().
Referenced by writeOperationDef(), and RISCVTDGen::writePatternDefinition().
|
protected |
Sets registers to use round robin order in register allocation.
Starting from register index number 0, all same width registers having the same index number are pushed to a vector. Then, index is increased by one and same action is performed, index increased etc., until all registers of same width are pushed to the vector. Then, the vector is used to replace old register order.
For example, two register files R64_1 (register indices 0, 1, 2 and 3) and R64_2 (register indices 0, 1) are ordered as: R64_1(0), R64_2(0), R64_1(1), R64_2(1), R64_1(2), R64_1(3), and LLVM register allocator will use this order to allocate the registers.
Definition at line 1674 of file TDGen.cc.
References TDGenerator::RegisterInfo::regIndex_, and registers_.
Referenced by analyzeMachineRegisters().
|
protected |
Returns llvm input definition list for an operation.
op | Operation to define inputs for. |
Definition at line 6043 of file TDGen.cc.
References assert, immOperandDefs_, Operand::isAddress(), ImmInfo::key(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), operandToString(), and OT_IMM_INT.
Referenced by writeOperationDef().
|
protected |
Returns llvm output definition list for an operation.
op | Operation to define outputs for. |
Definition at line 6074 of file TDGen.cc.
References assert, Operand::isOutput(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), and operandToString().
Referenced by writeOperationDef().
|
protected |
Saves information of some operations.
Additional information of some operations is needed later, and thus, they need to be saved for later reference.
op | Vector operation. |
valueTypes | Operand value type identifier characters. |
isRegisterOp | If false, operation has immediate operands. |
Definition at line 2246 of file TDGen.cc.
References abortWithError.
Referenced by writeVectorOperationDef().
|
protected |
Return operation pattern is llvm .td format without outputs.
This pattern can be used as sub-pattern of bigger pattern. The operation must have only one output.
Definition at line 5468 of file TDGen.cc.
References __func__, createDefaultOperandTypeString(), dagNodeToString(), OperationDAG::endNodes(), and BoostGraph< GraphNode, GraphEdge >::predecessors().
Referenced by operationNodeToString().
|
protected |
Returns subword width of vector operands of "raw" type.
op | Operation that has raw operands. |
Definition at line 1778 of file TDGen.cc.
References assert, Operand::elementWidth(), Operand::isVector(), Operation::operand(), Operation::operandCount(), Operand::RAW_DATA, Operand::type(), and Operand::width().
|
staticprotected |
Returns OSAL operation names valid for stack accesses.
mach | The target machine. |
Definition at line 7685 of file TDGen.cc.
References TTAMachine::Machine::functionUnitNavigator(), Operation::name(), MachineInfo::osalOperation(), Operation::readsMemory(), StringTools::stringToUpper(), and Operation::writesMemory().
Referenced by writeBackendCode().
|
protected |
Pattern for tce generated custom op patterns.
Definition at line 5266 of file TDGen.cc.
References Operation::name(), Operation::numberOfInputs(), and Conversion::toString().
Referenced by operationNodeToString().
|
protected |
Prints debugging information if verbose switch is used.
msg | Debug message. |
Definition at line 1862 of file TDGen.cc.
References Application::logStream(), Application::VERBOSE_LEVEL_DEFAULT, and Application::verboseLevel().
Referenced by analyzeMachineVectorRegisterClasses(), genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), writeCallingConv(), and writeVectorOperationDef().
|
protected |
Writes 16-bit register definitions to the output stream.
Definition at line 1211 of file TDGen.cc.
References GPR, regs16bit_, regsInClasses_, RESULT, Conversion::toString(), and writeRegisterDef().
|
protected |
Writes 1-bit register definitions to the output stream.
Definition at line 961 of file TDGen.cc.
References GPR, TTAMachine::Machine::is64bit(), mach_, regs1bit_, regsInClasses_, RESERVED, Conversion::toString(), and writeRegisterDef().
Referenced by writeRegisterInfo().
|
protected |
Definition at line 1021 of file TDGen.cc.
References argRegCount_, ARGUMENT, dregNum_, GPR, TTAMachine::Machine::is64bit(), mach_, prebypassStackIndeces_, regs32bit_, regsInClasses_, regsInRFClasses_, RESERVED, RESULT, Conversion::toString(), use64bitForFP_, and writeRegisterDef().
Referenced by writeRegisterInfo().
|
protected |
Definition at line 8378 of file TDGen.cc.
|
protected |
Writes 64-bit register definitions to the output stream.
Definition at line 1363 of file TDGen.cc.
References argRegCount_, ARGUMENT, dregNum_, GPR, TTAMachine::Machine::is64bit(), mach_, regs64bit_, RESERVED, RESULT, Conversion::toString(), use64bitForFP_, and writeRegisterDef().
Referenced by writeRegisterInfo().
|
protected |
|
protected |
Definition at line 8419 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), and mach_.
Referenced by initializeBackendContents().
|
protected |
Definition at line 6996 of file TDGen.cc.
References argRegCount_.
Referenced by initializeBackendContents().
|
protected |
Generates required function definitions for the backend plugin.
o | Output stream to write the c++ code to. |
Definition at line 3997 of file TDGen.cc.
References __func__, TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), createBranchAnalysis(), createConstantMaterializationQuery(), createEndiannesQuery(), createMinMaxGenerator(), createParamDRegNums(), createVectorRVDRegNums(), falsePredOps_, TTAMachine::Machine::functionUnitNavigator(), generateLoadStoreCopyGenerator(), genGeneratedTCEPlugin_getAddOpcode(), genGeneratedTCEPlugin_getIorOpcode(), genGeneratedTCEPlugin_getLoadOpcode(), genGeneratedTCEPlugin_getShlOpcode(), genTCEInstrInfoSIMD_copyPhysVectorReg(), genTCERegisterInfo_setReservedVectorRegs(), genTCETargetLoweringSIMD_addVectorRegisterClasses(), genTCETargetLoweringSIMD_associatedVectorRegClass(), genTCETargetLoweringSIMD_getSetCCResultVT(), TDGen::RegInfo::idx, TTAMachine::Machine::is64bit(), TTAMachine::Machine::Navigator< ComponentType >::item(), littleEndian_, mach_, maxVectorSize_, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), opNames_, regs_, TDGen::RegInfo::rf, StringTools::stringToLower(), supportedStackAccessOperations(), truePredOps_, and writeGetPointerAdjustmentQuery().
Referenced by initializeBackendContents().
|
protected |
Writes special store patterns for i1 types.
Definition at line 4568 of file TDGen.cc.
References littleEndian_, and opNames_.
Referenced by writeInstrInfo().
|
protected |
|
protected |
Writes .td pattern for the call instruction(s) to the output stream.
Definition at line 3955 of file TDGen.cc.
References argRegNames_, and writeCallDefRegs().
Referenced by writeControlFlowInstrDefs().
|
protectedvirtual |
Definition at line 3580 of file TDGen.cc.
References argRegNames_, baseClasses_, gprRegNames_, maxScalarWidth_, registers_, TDGenerator::RegisterInfo::regName_, and resRegNames_.
Referenced by writeCallDef().
|
protected |
Writes details about function arguments and returns values.
o | Output stream to the file. |
Definition at line 6870 of file TDGen.cc.
References TDGenerator::RegisterClass::alignment(), argRegCount_, TTAMachine::Machine::is64bit(), mach_, TDGenerator::RegisterClass::numberOfRegisters(), TDGenerator::RegisterClass::registerInfo(), TDGenerator::RegisterInfo::regName_, TDGenerator::RegisterClass::valueType(), verbose(), vRegClasses_, TDGenerator::ValueType::width(), and writeCallingConvLicenceText().
Referenced by initializeBackendContents().
|
protected |
Definition at line 6975 of file TDGen.cc.
Referenced by writeCallingConv().
|
protected |
Definition at line 7944 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), and mach_.
Referenced by writeInstrInfo().
|
protected |
Writes instructions definitions and patterns for conditional branches.
Definition at line 3661 of file TDGen.cc.
References abortWithError, assert, TTAMachine::Machine::controlUnit(), MachineInfo::getOpset(), mach_, opNames_, MachineInfo::supportsBoolRegisterGuardedJumps(), MachineInfo::supportsPortGuardedJump(), MachineInfo::supportsPortGuardedJumps(), writeInstrDef(), and writePortGuardedJumpDefPair().
Referenced by writeControlFlowInstrDefs().
|
protected |
Definition at line 8577 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), mach_, and opNames_.
Referenced by createConstShiftPatterns().
|
protected |
Writes control flow instructions definitions and patterns
Definition at line 3616 of file TDGen.cc.
References writeCallDef(), and writeCondBranchDefs().
Referenced by writeInstrInfo().
|
protected |
Writes operation emulation pattern in .td format to an output stream.
o | Output stream to write the definition to. |
op | Emulated operation. |
dag | Emulation pattern. |
Definition at line 4800 of file TDGen.cc.
References assert, dagNodeToString(), OperationDAG::endNodes(), immediateOperandNameForEmulatedOperation(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), TTAMachine::Machine::is64bit(), llvmOperationPattern(), mach_, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), operandChar(), operandToString(), OT_REG_INT, OT_REG_LONG, and BoostGraph< GraphNode, GraphEdge >::tailNode().
Referenced by writeInstrInfo().
|
protected |
Writes query method for retrieving LLVM instruction for pointer adjustment and suitable offset value.
Some machines may not SUBrri definition (second operand can not take an immediate) and, therefore, pointer adjustments must use other operation for it.
Definition at line 7522 of file TDGen.cc.
References ADDIMM, TTAMachine::Machine::is64bit(), mach_, opNames_, SUBIMM, and THROW_EXCEPTION.
Referenced by writeBackendCode().
|
protected |
Writes register class for registers usable as guard.
Call this after all regular register definitions are written (after all calls to writeRegisterDef());
Definition at line 2008 of file TDGen.cc.
References guardRegTemplateName, TTAMachine::Machine::is64bit(), llvmGuardRegs_, mach_, RESERVED, and writeRegisterDef().
Referenced by writeRegisterInfo().
|
protected |
Writes hwloop instructions and patterns.
Definition at line 3627 of file TDGen.cc.
References TTAMachine::Machine::controlUnit(), TTAMachine::FunctionUnit::hasOperation(), mach_, and opNames_.
Referenced by writeInstrInfo().
|
protectedvirtual |
Writes single immediate operand definitions to the stream.
o | The output stream. |
defName | The name of the immediate operand definition. |
operandType | The target type (i.e "i32"). |
predicate | The predicate expression without return statement or ';' at the end. |
Definition at line 4610 of file TDGen.cc.
Referenced by createConstantMaterializationPatterns(), writeIntegerImmediateDefs(), and writeMoveImmediateDefs().
|
protected |
Writes LLVM instruction definition in TCE format to the stream.
Definition at line 4626 of file TDGen.cc.
Referenced by writeCondBranchDefs(), and writePortGuardedJumpDefPair().
|
protected |
Writes details about instruction formatting
o | Output stream to the file. |
Definition at line 4255 of file TDGen.cc.
Referenced by initializeBackendContents().
|
protected |
Writes all machine instructions to instruction info .td file.
os | Output stream to the file. |
Definition at line 3384 of file TDGen.cc.
References __func__, allOpNames_, TTAMachine::Machine::Navigator< ComponentType >::count(), create32BitExtLoadPatterns(), createBoolAndHalfLoadPatterns(), createByteExtLoadPatterns(), createConstantMaterializationPatterns(), createConstShiftPatterns(), createSelectPatterns(), createShortExtLoadPatterns(), falsePredOps_, OperationDAGSelector::findDags(), TTAMachine::Machine::functionUnitNavigator(), hasConditionalMoves_, TTAMachine::Machine::hasOperation(), immInfo_, NullOperation::instance(), TTAMachine::Machine::is64bit(), isVectorBitwiseOperation(), isVectorLoadOperation(), Operation::isVectorOperation(), isVectorStoreOperation(), TTAMachine::Machine::Navigator< ComponentType >::item(), littleEndian_, LLVMBackend::llvmRequiredOpset(), Application::logStream(), mach_, TTAMachine::HWOperation::name(), Operation::name(), Operation::numberOfOutputs(), OperationPool::operation(), TTAMachine::FunctionUnit::operation(), operationCanBeMatched(), TTAMachine::FunctionUnit::operationCount(), opNames_, OperationDAGSelector::OperationDAGList::smallestNodeCount(), StringTools::stringToUpper(), truePredOps_, Application::VERBOSE_LEVEL_DEFAULT, Application::verboseLevel(), writeBooleanStorePatterns(), writeCallSeqStart(), writeControlFlowInstrDefs(), writeEmulationPattern(), writeHWLoopDef(), writeMiscPatterns(), writeOperationDefs(), writeScalarOperationExploitations(), writeScalarToVectorDefs(), writeVectorBitConversions(), writeVectorBitwiseOperationDefs(), writeVectorImmediateWriteDefs(), writeVectorLoadStoreOperationExploitations(), writeVectorMemoryOperationDefs(), writeVectorOperationDefs(), writeVectorRegisterMoveDefs(), and writeVectorTruncStoreDefs().
Referenced by generateBackend(), and initializeBackendContents().
|
protected |
Writes unique immediate operands (ImmLeafs) for all operations that can have short immediates to transported to theirs operands.
The names of the immediate operands are stored in i32immOperandDefs_ map. Note: operations, that can not have short immediates to be trasported at all, do not entry in the map.
o | The output stream. |
iivs | The immediate info. |
Definition at line 649 of file TDGen.cc.
References ImmInfo::count(), immediatePredicate(), ImmInfo::immediateValueBounds(), immOperandDefs_, NullOperation::instance(), TTAMachine::Machine::is64bit(), ImmInfo::key(), mach_, OperationPool::operation(), Operand::swap(), Conversion::toString(), and writeImmediateDef().
Referenced by writeOperandDefs().
|
protected |
Definition at line 8465 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), and mach_.
Referenced by writeInstrInfo().
|
protected |
Writes immediate operand definitions that are used for MOV instructions.
Creates immediate operand definitions for immediate to register instructions (MOVI), that only accept supported immediate values.
Definition at line 756 of file TDGen.cc.
References TTAMachine::Machine::busNavigator(), immediatePredicate(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::instructionTemplateNavigator(), TTAMachine::Machine::is64bit(), mach_, TTAMachine::Machine::registerFileNavigator(), and writeImmediateDef().
Referenced by writeOperandDefs().
|
protected |
Writes all short immediate definitions to the stream.
o | The output stream. |
Definition at line 621 of file TDGen.cc.
References assert, immInfo_, writeIntegerImmediateDefs(), and writeMoveImmediateDefs().
Referenced by initializeBackendContents().
|
protected |
Writes a single operation def for single operation.
o | Output stream to write the definition to. |
op | Operation to write definition for. |
operandTypes | value types of operands. |
Definition at line 4649 of file TDGen.cc.
References areImmediateOperandsLegal(), assert, canBePredicated(), createTrivialDAG(), Operation::dagCount(), falsePredOps_, getMatchableOperationDAG(), TTAMachine::Machine::is64bit(), llvmOperationPattern(), Application::logStream(), mach_, Operation::name(), operandChar(), operationPattern(), opNames_, OT_REG_INT, OT_REG_LONG, patInputs(), patOutputs(), StringTools::stringToUpper(), truePredOps_, Application::VERBOSE_LEVEL_DEFAULT, and Application::verboseLevel().
Referenced by writeOperationDefs(), writeOperationDefs(), and writeVectorOperationDef().
|
protected |
Writes scalar operation definition(s).
o | Output stream to write the definition to. |
op | Operation to write definition for. |
skipPattern | True, if skip pattern generation. |
Definition at line 4312 of file TDGen.cc.
References createDefaultOperandTypeString(), hasConditionalMoves_, hasSelect_, TTAMachine::Machine::is64bit(), mach_, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), OT_REG_BOOL, Operand::RAW_DATA, Operation::readsMemory(), Operand::SINT_WORD, Operand::SLONG_WORD, Operand::type(), Operand::UINT_WORD, Operand::ULONG_WORD, writeOperationDef(), writeOperationDefs(), and Operation::writesMemory().
Referenced by writeInstrInfo(), and writeOperationDefs().
|
protected |
Writes operation defs for single operation, with different immediate params.
o | Output stream to write the definition to. |
op | Operation to write definition for. |
operandTypes | value types of operands. |
Definition at line 4516 of file TDGen.cc.
References Operation::canSwap(), Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), regOperandCharToImmOperandChar(), TCEString::upper(), and writeOperationDef().
|
protected |
Writes operation definition using given operand types.
Changes the operands to match the provided ones, after which a definition is written. Finally, original operands are restored.
o | Output stream. |
op | Operation used to create new operation definitions. |
skipPattern | If true, operation pattern writing is skipped. |
inputs | Input operand types for the new operation. |
outputs | Output operand types for the new operation. |
instrSuffix | Optional suffix that will be added to instruction name. |
Definition at line 1896 of file TDGen.cc.
References assert, createDefaultOperandTypeString(), Operation::input(), Operation::numberOfInputs(), Operation::numberOfOutputs(), TDGenerator::ValueType::operandType(), Operation::output(), Operand::setElementCount(), Operand::setElementWidth(), Operand::setType(), TDGenerator::ValueType::subwCount_, TDGenerator::ValueType::subwWidth_, and writeVectorOperationDef().
Referenced by writeScalarOperationExploitations(), writeVectorBitwiseOperationDefs(), and writeVectorLoadStoreOperationExploitations().
|
protected |
Writes a pattern fragment definition.
origPat | Pattern that instruction selector should replace. |
replacerPat | Pattern that will replace the original pattern. |
Definition at line 1875 of file TDGen.cc.
Referenced by writeScalarToVectorDefs(), writeVectorBitConversions(), and writeVectorTruncStoreDefs().
|
protected |
Definition at line 3897 of file TDGen.cc.
References llvmOperationName(), mach_, opNames_, MachineInfo::supportsPortGuardedJump(), TCEString::upper(), and writeInstrDef().
Referenced by writeCondBranchDefs().
|
protected |
Writes return address register definition to the output stream.
Definition at line 3157 of file TDGen.cc.
References dregNum_, TTAMachine::Machine::is64bit(), and mach_.
Referenced by writeRegisterInfo().
|
protected |
Definition at line 816 of file TDGen.cc.
Referenced by writeRegisterInfo().
|
protected |
Writes .td definition of a single register to the output stream.
o | Output stream to write the definition to. |
reg | Information about the physical register. |
regName | Name for the register in the llvm framework. |
regTemplate | Base class for the register. |
aliases | Comma-separated list of aliases for this register. |
Definition at line 503 of file TDGen.cc.
References argRegNames_, ARGUMENT, assert, dregNum_, GPR, gprRegNames_, guardedRegs_, guardRegTemplateName, TDGen::RegInfo::idx, llvmGuardRegs_, regs_, regsInClasses_, RESERVED, resRegNames_, RESULT, and TDGen::RegInfo::rf.
Referenced by write16bitRegisterInfo(), write1bitRegisterInfo(), write32bitRegisterInfo(), write64bitRegisterInfo(), writeGuardRegisterClassInfo(), and writeVectorRegisterNames().
|
protected |
Writes .td definitions of all registers in the machine to an output stream.
o | Output stream for the .td definitions. |
Definition at line 551 of file TDGen.cc.
References analyzeMachineRegisters(), analyzeMachineVectorRegisterClasses(), analyzeRegisters(), assert, associateRegistersWithVectorRegisterClasses(), checkRequiredRegisters(), gatherAllMachineOperations(), regs32bit_, requiredI32Regs_, write1bitRegisterInfo(), write32bitRegisterInfo(), write64bitRegisterInfo(), writeGuardRegisterClassInfo(), writeRARegisterInfo(), writeRegisterClasses(), writeStartOfRegisterInfo(), writeVectorRegisterBaseClasses(), writeVectorRegisterClasses(), and writeVectorRegisterNames().
Referenced by initializeBackendContents().
|
protected |
This function writes scalar operation exploitations.
Some scalar operations can be exploited to execute vector operations. For instance, bitwise logical operations are same for any operand width. A 32-bit scalar XOR operation can execute bitwise exclusive OR operation for v32i1, v4i8 and v2i16 vector operands similarly as it does for i32 type.
Definition at line 2475 of file TDGen.cc.
References TTAMachine::Machine::hasOperation(), hasRegisterClassSupport(), NullOperation::instance(), TTAMachine::Machine::is64bit(), littleEndian_, mach_, MAX_SCALAR_WIDTH, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), OperationPool::operation(), Operation::output(), TDGenerator::ValueType::valueTypeStr(), TDGenerator::ValueType::vectorTypesOfWidth(), Operand::width(), and writeOperationDefUsingGivenOperandTypes().
Referenced by writeInstrInfo().
|
protected |
Writes scalar_to_vector patterns for vector value types.
Definition at line 2388 of file TDGen.cc.
References TDGenerator::ValueType::subwCount_, TDGenerator::ValueType::valueTypeStr(), vbcastOperations_, and writePatternReplacement().
Referenced by writeInstrInfo().
|
protected |
Writes static register info to the beginning of register info .td file.
o | Output stream to the file. |
Definition at line 594 of file TDGen.cc.
Referenced by writeRegisterInfo().
|
protected |
Writes a top level TCE.td file which includes generated .td definitions.
o | Output stream to the file. |
Definition at line 4231 of file TDGen.cc.
Referenced by initializeBackendContents().
|
protected |
|
protected |
Writes bit conversion patterns.
Definition at line 2418 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), TDGenerator::RegisterClass::valueType(), vRegClasses_, TDGenerator::ValueType::width(), and writePatternReplacement().
Referenced by writeInstrInfo().
|
protected |
Writes bitwise NOT/AND/IOR/XOR operation definitions for vector operations.
For 32-bit or less vector widths, 32-bit base operation is used. For bitwise bool vector operations wider than 32 bits, corresponding bitwise operation is searched from the machine, and used to create operation definitions if it exists.
o | Output stream. |
op | Operation used to create bitwise operations. |
skipPattern | If true, operation pattern writing is skipped. |
Definition at line 2657 of file TDGen.cc.
References assert, hasRegisterClassSupport(), TDGenerator::ValueType::isFloat_, Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::output(), TDGenerator::ValueType::valueTypeStr(), TDGenerator::ValueType::vectorTypesOfWidth(), Operand::width(), and writeOperationDefUsingGivenOperandTypes().
Referenced by writeInstrInfo().
|
protected |
Definition at line 3216 of file TDGen.cc.
References TDGenerator::RegisterClass::name(), opNames_, TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), vRegClasses_, and TDGenerator::ValueType::width().
Referenced by writeInstrInfo().
|
protected |
|
protected |
|
protected |
Attaches load and store operations to vector types that don't have them.
Checks first which vector value types don't have load and store operations for memory accessing. After collecting the value types without load/store, the function tries to search existing load/store instructions whose data operand width matches the vector value type that doesn't have a load/store operation. If the function can find matching memory instructions, it creates new memory instructions for the vector value types by exploiting existing matching memory instructions.
Definition at line 2704 of file TDGen.cc.
References TTAMachine::Machine::is64bit(), mach_, maxScalarWidth_, OperationPool::operation(), registerLoads_, registerStores_, vRegClasses_, TDGenerator::ValueType::width(), and writeOperationDefUsingGivenOperandTypes().
Referenced by writeInstrInfo().
|
protected |
Writes instruction definitions for memory vector operations.
Subword aligned LDQ/LDH/LDW/STQ/STH/STQ vector operations can be passed directly to writing vector operation definitions, but vector aligned LOAD and STORE operations can be used for several different vector types of the same width, thus, all the different vector types need to be covered and separate memory instruction have to be made for them.
Definition at line 2261 of file TDGen.cc.
References abortWithError.
Referenced by writeInstrInfo().
|
protected |
Writes instruction of the vector operation to the .td file.
Creates register version and possibly an immediate version of the vector operation in case there are any scalar operands.
o | Output stream to the file. |
op | Operation to be written as an instruction to the .td file. |
valueTypes | Operand value type identifier characters. |
attributes | Operation attributes. |
skipPattern | True, if skip pattern creation. |
Definition at line 2181 of file TDGen.cc.
References hasRegisterClassSupport(), Operation::name(), Operation::numberOfOutputs(), Operation::operandCount(), OT_IMM_BOOL, OT_IMM_FP, OT_IMM_HFP, OT_IMM_INT, OT_REG_BOOL, OT_REG_FP, OT_REG_HFP, OT_REG_INT, saveAdditionalVectorOperationInfo(), verbose(), and writeOperationDef().
Referenced by writeOperationDefUsingGivenOperandTypes().
|
protected |
Writes needed defitinion(s) of the vector operation to the .td file.
Creates 4 differend instructions of the operation at most:
o | Output stream to the .td file. |
op | Vector operation of which the definitions will be created. |
skipPattern | True, if skip pattern creation. |
Definition at line 2164 of file TDGen.cc.
References abortWithError.
Referenced by writeInstrInfo().
|
protected |
Writes base class definitions to the .td file.
Definition at line 2047 of file TDGen.cc.
References baseClasses_, and MAX_SCALAR_WIDTH.
Referenced by writeRegisterInfo().
|
protected |
Writes register class definitions to the .td file.
Definition at line 2102 of file TDGen.cc.
References TDGenerator::RegisterClass::alignment(), TDGenerator::RegisterClass::name(), TDGenerator::RegisterClass::numberOfRegisters(), TDGenerator::RegisterClass::registerInfo(), TDGenerator::RegisterInfo::regName_, THROW_EXCEPTION, TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), vRegClasses_, and TDGenerator::ValueType::width().
Referenced by writeRegisterInfo().
|
protected |
Writes MOV instructions between vector register classes.
Definition at line 2270 of file TDGen.cc.
References falsePredOps_, hasConditionalMoves_, movOperations_, TDGenerator::RegisterClass::name(), opNames_, truePredOps_, TDGenerator::RegisterClass::valueType(), TDGenerator::ValueType::valueTypeStr(), and vRegClasses_.
Referenced by writeInstrInfo().
|
protected |
Writes register definitions to the .td file.
Definition at line 2070 of file TDGen.cc.
References baseClasses_, MAX_SCALAR_WIDTH, TDGenerator::RegisterInfo::regFileName_, TDGenerator::RegisterInfo::regIndex_, registers_, TDGenerator::RegisterInfo::regName_, RESERVED, and writeRegisterDef().
Referenced by writeRegisterInfo().
|
protected |
|
protected |
|
protected |
Writes truncstore patterns for vector value types.
Definition at line 2318 of file TDGen.cc.
References immediateStores_, TDGenerator::RegisterClass::name(), registerStores_, truncOperations_, TDGenerator::ValueType::valueTypeStr(), vRegClasses_, and writePatternReplacement().
Referenced by writeInstrInfo().
|
protected |
|
protected |
Writes vector operation definitions that exploit bigger vector operations.
Exploited vector operands are written in ascending order by their subword count, meaning that e.g. ADD32X16, ADD32X32, and ADD32X4 operation exploitations are listed so that ADD32X4 are written first, then ADD32X16, and then ADD32X32. This way the instruction selection will first use ADD32X4 to execute vector addition for v2i32 vector operand types, and thus, is more optimal solution than executing the same v2i32 addition with ADD32X16 (though ADD32X4 would be also available in the machine).
Definition at line 2831 of file TDGen.cc.
References abortWithError.
Contains machine's add instructions (<ValueType, InstrName>).
Definition at line 579 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getAddOpcode().
|
protected |
Definition at line 470 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Contains all operation names in upper case.
Definition at line 520 of file TDGen.hh.
Referenced by analyzeMachineVectorRegisterClasses(), gatherAllMachineOperations(), and writeInstrInfo().
|
protected |
Definition at line 628 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), createParamDRegNums(), TDGen(), write32bitRegisterInfo(), write64bitRegisterInfo(), writeArgRegsArray(), and writeCallingConv().
|
protected |
Definition at line 605 of file TDGen.hh.
Referenced by writeCallDef(), writeCallDefRegs(), and writeRegisterDef().
|
protected |
Definition at line 475 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Definition at line 476 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Contains vector base classes for register files (<Width, Name>).
Definition at line 529 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), writeCallDefRegs(), writeVectorRegisterBaseClasses(), and writeVectorRegisterNames().
|
staticprotected |
Bool type subword width.
|
protected |
Definition at line 474 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
All predicates used in constant materialization patterns.
Definition at line 649 of file TDGen.hh.
Referenced by createConstantMaterializationPatterns(), and createConstantMaterializationQuery().
|
protected |
Definition at line 468 of file TDGen.hh.
Referenced by write32bitRegisterInfo(), write64bitRegisterInfo(), writeRARegisterInfo(), and writeRegisterDef().
|
staticprotected |
If set to true, smaller vector value types can be stored to larger register files, e.g. v4i8 vectors can be stored to registers that are over 32 bits in size.
Definition at line 493 of file TDGen.hh.
Referenced by associateRegistersWithVectorRegisterClasses().
|
protected |
Definition at line 612 of file TDGen.hh.
Referenced by writeBackendCode(), writeInstrInfo(), writeOperationDef(), and writeVectorRegisterMoveDefs().
|
staticprotected |
Float type subword width.
Definition at line 480 of file TDGen.hh.
Referenced by analyzeMachineVectorRegisterClasses().
Contains machine's GATHER instructions (<ValueType, InstrName>).
Definition at line 577 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getGatherOpcode().
|
protected |
Definition at line 607 of file TDGen.hh.
Referenced by writeCallDefRegs(), and writeRegisterDef().
|
protected |
List of register that are associated with a guard on a bus.
Definition at line 636 of file TDGen.hh.
Referenced by analyzeRegisters(), and writeRegisterDef().
|
staticprotected |
Definition at line 651 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), writeGuardRegisterClassInfo(), and writeRegisterDef().
|
protected |
Definition at line 623 of file TDGen.hh.
Referenced by canBePredicated(), createSelectPatterns(), TDGen(), writeInstrInfo(), writeOperationDefs(), and writeVectorRegisterMoveDefs().
|
protected |
Definition at line 621 of file TDGen.hh.
Referenced by createSelectPatterns(), and writeOperationDefs().
|
staticprotected |
Half float type subword width.
Definition at line 482 of file TDGen.hh.
Referenced by analyzeMachineVectorRegisterClasses().
|
protected |
|
protected |
All immediate store operations (<ValueType, InstrInfo>).
Definition at line 542 of file TDGen.hh.
Referenced by writeVectorTruncStoreDefs().
|
protected |
Definition at line 465 of file TDGen.hh.
Referenced by areImmediateOperandsLegal(), createConstantMaterializationPatterns(), getLLVMPatternWithConstants(), TDGen(), writeInstrInfo(), writeOperandDefs(), and ~TDGen().
|
protected |
Maps (operation, operand) pairs to i32 immediate operand definition names.
Definition at line 436 of file TDGen.hh.
Referenced by dagNodeToString(), immediateOperandNameForEmulatedOperation(), patInputs(), and writeIntegerImmediateDefs().
|
protected |
Definition at line 473 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Definition at line 472 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
Contains machine's shl instructions (<ValueType, InstrName>).
Definition at line 583 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getIorOpcode().
|
protected |
Definition at line 627 of file TDGen.hh.
Referenced by createBoolAndHalfLoadPatterns(), createByteExtLoadPatterns(), createEndiannesQuery(), createShortExtLoadPatterns(), genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), llvmOperationName(), llvmOperationPattern(), writeBackendCode(), writeBooleanStorePatterns(), writeInstrInfo(), and writeScalarOperationExploitations().
|
protected |
The LLVM register defs used as guards.
Definition at line 599 of file TDGen.hh.
Referenced by writeGuardRegisterClassInfo(), and writeRegisterDef().
|
protected |
Definition at line 463 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeRegisters(), checkRequiredRegisters(), constantNodeString(), create32BitExtLoadPatterns(), createBoolAndHalfLoadPatterns(), createBranchAnalysis(), createByteExtLoadPatterns(), createConstShiftPatterns(), createEndiannesQuery(), createGetMaxMemoryAlignment(), createMinMaxGenerator(), createSelectPatterns(), createShortExtLoadPatterns(), emulatingOpNodeLLVMName(), gatherAllMachineOperations(), genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), genTCEInstrInfo_copyPhys64bitReg(), llvmOperationName(), llvmOperationPattern(), operandChar(), operandToString(), operationCanBeMatched(), TDGen(), write1bitRegisterInfo(), write32bitRegisterInfo(), write64bitRegisterInfo(), writeAddressingModeDefs(), writeBackendCode(), writeCallingConv(), writeCallSeqStart(), writeCondBranchDefs(), writeConstShiftPat(), writeEmulationPattern(), writeGetPointerAdjustmentQuery(), writeGuardRegisterClassInfo(), writeHWLoopDef(), writeInstrInfo(), writeIntegerImmediateDefs(), writeMiscPatterns(), writeMoveImmediateDefs(), writeOperationDef(), writeOperationDefs(), RISCVTDGen::writePatternDefinition(), writePortGuardedJumpDefPair(), writeRARegisterInfo(), writeScalarOperationExploitations(), and writeVectorLoadStoreOperationExploitations().
|
staticprotected |
Distincts wide vs scalar registers.
Definition at line 486 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), writeScalarOperationExploitations(), writeVectorRegisterBaseClasses(), and writeVectorRegisterNames().
|
staticprotected |
Maximum number of subwords that any SIMD operation can have.
Definition at line 488 of file TDGen.hh.
Referenced by genTCETargetLoweringSIMD_getSetCCResultVT().
|
protected |
Definition at line 625 of file TDGen.hh.
Referenced by createVectorRVDRegNums(), genTCERegisterInfo_setReservedVectorRegs(), TDGen(), writeCallDefRegs(), and writeVectorLoadStoreOperationExploitations().
|
protected |
Definition at line 614 of file TDGen.hh.
Referenced by writeBackendCode().
|
protected |
Contains all moves between register classes (<InstrName>).
Definition at line 586 of file TDGen.hh.
Referenced by writeVectorRegisterMoveDefs().
|
protected |
Definition at line 471 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Definition at line 609 of file TDGen.hh.
Referenced by createBoolAndHalfLoadPatterns(), createBranchAnalysis(), createConstantMaterializationPatterns(), createMinMaxDef(), createMinMaxGenerator(), createSelectPatterns(), getLLVMPatternWithConstants(), writeBackendCode(), writeBooleanStorePatterns(), writeCondBranchDefs(), writeConstShiftPat(), writeGetPointerAdjustmentQuery(), writeHWLoopDef(), writeInstrInfo(), writeOperationDef(), writePortGuardedJumpDefPair(), writeVectorImmediateWriteDefs(), and writeVectorRegisterMoveDefs().
|
static |
Definition at line 503 of file TDGen.hh.
Referenced by constantNodeString(), dagNodeToString(), getLLVMPatternWithConstants(), getMovePattern(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), and writeVectorOperationDef().
|
static |
Definition at line 505 of file TDGen.hh.
Referenced by constantNodeString(), getLLVMPatternWithConstants(), getMovePattern(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), and writeVectorOperationDef().
|
static |
Definition at line 506 of file TDGen.hh.
Referenced by getLLVMPatternWithConstants(), getMovePattern(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), and writeVectorOperationDef().
|
static |
Definition at line 504 of file TDGen.hh.
Referenced by areImmediateOperandsLegal(), canBePredicated(), constantNodeString(), createByteExtLoadPatterns(), createShortExtLoadPatterns(), dagNodeToString(), emulatingOpNodeLLVMName(), getLLVMPatternWithConstants(), getMovePattern(), operandToString(), operandTypeToRegister(), patInputs(), regOperandCharToImmOperandChar(), and writeVectorOperationDef().
|
static |
Definition at line 507 of file TDGen.hh.
Referenced by constantNodeString(), createByteExtLoadPatterns(), createShortExtLoadPatterns(), emulatingOpNodeLLVMName(), operandToString(), and regOperandCharToImmOperandChar().
|
static |
Definition at line 497 of file TDGen.hh.
Referenced by constantNodeString(), dagNodeToString(), getMovePattern(), operandChar(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), writeOperationDefs(), and writeVectorOperationDef().
|
static |
Definition at line 502 of file TDGen.hh.
Referenced by constantNodeString().
|
static |
Definition at line 500 of file TDGen.hh.
Referenced by constantNodeString(), getMovePattern(), operandChar(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), TDGenerator::ValueType::valueType(), and writeVectorOperationDef().
|
static |
Definition at line 501 of file TDGen.hh.
Referenced by constantNodeString(), getMovePattern(), operandChar(), operandToString(), operandTypeToRegister(), regOperandCharToImmOperandChar(), and writeVectorOperationDef().
|
static |
Definition at line 498 of file TDGen.hh.
Referenced by constantNodeString(), createByteExtLoadPatterns(), createShortExtLoadPatterns(), getMovePattern(), operandChar(), operandToString(), operandTypeToRegister(), operationCanBeMatched(), regOperandCharToImmOperandChar(), writeEmulationPattern(), writeOperationDef(), RISCVTDGen::writePatternDefinition(), and writeVectorOperationDef().
|
static |
Definition at line 499 of file TDGen.hh.
Referenced by constantNodeString(), createByteExtLoadPatterns(), createShortExtLoadPatterns(), operandChar(), operandToString(), operationCanBeMatched(), regOperandCharToImmOperandChar(), writeEmulationPattern(), writeOperationDef(), and RISCVTDGen::writePatternDefinition().
|
static |
Definition at line 508 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
static |
Definition at line 512 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
static |
Definition at line 513 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
static |
Definition at line 510 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
static |
Definition at line 511 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
static |
Definition at line 509 of file TDGen.hh.
Referenced by operandChar(), and operandToString().
|
protected |
Definition at line 632 of file TDGen.hh.
Referenced by TDGen(), and write32bitRegisterInfo().
|
protected |
Definition at line 469 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
All register load operations (<ValueType, InstrInfo>).
Definition at line 540 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getLoadOpcode(), and writeVectorLoadStoreOperationExploitations().
|
protected |
Contains registers fit for being vector registers (<Width, Registers>).
Definition at line 532 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), associateRegistersWithVectorRegisterClasses(), orderEqualWidthRegistersToRoundRobin(), writeCallDefRegs(), and writeVectorRegisterNames().
|
protected |
All register store operations (<ValueType, InstrInfo>).
Definition at line 538 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getStore(), writeVectorLoadStoreOperationExploitations(), and writeVectorTruncStoreDefs().
|
protected |
Definition at line 593 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), and write16bitRegisterInfo().
|
protected |
Definition at line 589 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeRegisters(), createSelectPatterns(), and write1bitRegisterInfo().
|
protected |
Definition at line 595 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeRegisters(), checkRequiredRegisters(), write32bitRegisterInfo(), and writeRegisterInfo().
|
protected |
Definition at line 597 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeRegisters(), checkRequiredRegisters(), and write64bitRegisterInfo().
|
protected |
Definition at line 591 of file TDGen.hh.
Referenced by analyzeRegisters().
|
protected |
Map of generated llvm register names to physical register in the machine.
Definition at line 603 of file TDGen.hh.
Referenced by writeBackendCode(), and writeRegisterDef().
|
protected |
All registers in certain group.
Definition at line 645 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), write16bitRegisterInfo(), write1bitRegisterInfo(), write32bitRegisterInfo(), and writeRegisterDef().
|
protected |
Definition at line 647 of file TDGen.hh.
Referenced by write32bitRegisterInfo().
|
protected |
Minimum number of 32 bit registers.
Definition at line 630 of file TDGen.hh.
Referenced by checkRequiredRegisters(), TDGen(), and writeRegisterInfo().
|
protected |
Definition at line 631 of file TDGen.hh.
Referenced by checkRequiredRegisters(), and TDGen().
|
protected |
Definition at line 606 of file TDGen.hh.
Referenced by writeCallDefRegs(), and writeRegisterDef().
Contains all scalar operations (<Name, Operation>).
Definition at line 523 of file TDGen.hh.
Referenced by gatherAllMachineOperations().
Contains machine's shl instructions (<ValueType, InstrName>).
Definition at line 581 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getShlOpcode().
|
protected |
Register files whose last reg reserved for temp reg copies.
Definition at line 641 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeRegisters(), checkRequiredRegisters(), and TDGen().
|
protected |
Definition at line 477 of file TDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Definition at line 611 of file TDGen.hh.
Referenced by writeBackendCode(), writeInstrInfo(), writeOperationDef(), and writeVectorRegisterMoveDefs().
Contains machine's TRUNCxx/CFH instructions (<ValueType, InstrName>).
Definition at line 551 of file TDGen.hh.
Referenced by writeVectorTruncStoreDefs().
|
protected |
Definition at line 633 of file TDGen.hh.
Referenced by genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), write32bitRegisterInfo(), and write64bitRegisterInfo().
Contains machine's VBCAST instructions (<ValueType, InstrName>).
Definition at line 549 of file TDGen.hh.
Referenced by writeScalarToVectorDefs().
Contains all vector operations (<Name, Operation>).
Definition at line 526 of file TDGen.hh.
Referenced by gatherAllMachineOperations().
|
protected |
Contains required vector register classes (<ValueType, RegClass>).
Definition at line 535 of file TDGen.hh.
Referenced by analyzeMachineRegisters(), analyzeMachineVectorRegisterClasses(), associatedVectorRegisterClass(), associateRegistersWithVectorRegisterClasses(), createSelectPatterns(), createVectorRVDRegNums(), genGeneratedTCEPlugin_getLoad(), genGeneratedTCEPlugin_getStore(), genGeneratedTCEPlugin_getVectorImmediateOpcode(), genTCEInstrInfoSIMD_copyPhysVectorReg(), genTCERegisterInfo_setReservedVectorRegs(), genTCETargetLoweringSIMD_addVectorRegisterClasses(), genTCETargetLoweringSIMD_associatedVectorRegClass(), hasRegisterClassSupport(), hasRegisterClassSupport(), writeCallingConv(), writeVectorBitConversions(), writeVectorImmediateWriteDefs(), writeVectorLoadStoreOperationExploitations(), writeVectorRegisterClasses(), writeVectorRegisterMoveDefs(), and writeVectorTruncStoreDefs().