OpenASIP 2.2
|
#include <RISCVTDGen.hh>
Public Member Functions | |
RISCVTDGen (const TTAMachine::Machine &mach) | |
virtual | ~RISCVTDGen ()=default |
virtual void | generateBackend (const std::string &path) const |
virtual std::string | generateBackend () const |
![]() | |
TDGen (const TTAMachine::Machine &mach, bool initialize=true) | |
virtual | ~TDGen () |
Protected Member Functions | |
virtual void | initializeBackendContents () |
InstructionFormat * | findFormat (const std::string name) const |
void | findCustomOps () |
void | writeInstructionDeclarations (std::ostream &o) const |
void | writePatternDefinition (std::ostream &o, Operation &op) |
void | writePatternDefinitions (std::ostream &o) |
void | writeInstructionDeclaration (std::ostream &o, const std::string &name, const int encoding) const |
std::string | transformTCEPattern (std::string pattern, const unsigned numIns) const |
void | dumpClassDefinitions (std::ostream &) const |
std::string | getFormatType (const std::string &opName) const |
std::string | decimalsToHex (const std::string &pattern) const |
![]() | |
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 () |
Protected Attributes | |
BinaryEncoding * | bem_ |
std::map< std::string, int > | customOps_ |
std::string | declarationStr_ |
std::string | patternStr_ |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
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' |
![]() | |
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 |
![]() | |
static std::vector< std::string > | supportedStackAccessOperations (const TTAMachine::Machine &mach) |
![]() | |
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" |
Definition at line 42 of file RISCVTDGen.hh.
RISCVTDGen::RISCVTDGen | ( | const TTAMachine::Machine & | mach | ) |
Definition at line 52 of file RISCVTDGen.cc.
References assert, bem_, findCustomOps(), BEMGenerator::generate(), and initializeBackendContents().
|
virtualdefault |
|
protected |
OpenASIP converts hex numbers to unsigned by default. The converted number might not fit into i32. This function transforms the given instruction pattern to use hex encoding.
pattern | The instruction pattern. |
Definition at line 69 of file RISCVTDGen.cc.
References TCEString::intToHexString(), and TCEString::unsignedToHexString().
Referenced by transformTCEPattern().
|
protected |
Definition at line 313 of file RISCVTDGen.cc.
References Application::TCEVersionString().
Referenced by writeInstructionDeclarations().
|
protected |
Definition at line 109 of file RISCVTDGen.cc.
References bem_, MapTools::containsKey(), customOps_, InstructionFormat::encoding(), BinaryEncoding::instructionFormat(), InstructionFormat::operationAtIndex(), InstructionFormat::operationCount(), RISCVFields::RISCV_R1_TYPE_NAME, RISCVFields::RISCV_R1R_TYPE_NAME, RISCVFields::RISCV_R3R_TYPE_NAME, RISCVFields::RISCV_R_TYPE_NAME, and RISCVFields::RISCVRTypeOperations.
Referenced by RISCVTDGen().
|
protected |
|
virtual |
Writes tce backend plugin code into a single string. Used for hash generation.
Reimplemented from TDGen.
Definition at line 308 of file RISCVTDGen.cc.
References declarationStr_.
|
virtual |
Generates all files required to build a tce backend plugin (excluding static plugin code included from include/llvm/TCE/).
Reimplemented from TDGen.
Definition at line 299 of file RISCVTDGen.cc.
References declarationStr_, and patternStr_.
Referenced by main().
|
protected |
Definition at line 134 of file RISCVTDGen.cc.
References assert, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), and OperationPool::operation().
Referenced by writeInstructionDeclaration().
|
protectedvirtual |
Definition at line 284 of file RISCVTDGen.cc.
References declarationStr_, patternStr_, writeInstructionDeclarations(), and writePatternDefinitions().
Referenced by RISCVTDGen().
|
protected |
OpenASIP uses different reg declarations and pattern structure than the upstream RISC-V BE. This method transforms the TDGen generated patterns to the RISC-V one.
pattern | The pattern generated by TDGen |
Definition at line 200 of file RISCVTDGen.cc.
References assert, decimalsToHex(), and TCEString::replaceString().
Referenced by writePatternDefinition().
|
protected |
Definition at line 162 of file RISCVTDGen.cc.
References assert, getFormatType(), RISCVTools::getFunc2Str(), RISCVTools::getFunc3Str(), RISCVTools::getFunc7Str(), and TCEString::upper().
Referenced by writeInstructionDeclarations().
|
protected |
Definition at line 184 of file RISCVTDGen.cc.
References customOps_, dumpClassDefinitions(), and writeInstructionDeclaration().
Referenced by initializeBackendContents().
|
protected |
Definition at line 227 of file RISCVTDGen.cc.
References TDGen::createTrivialDAG(), Operation::dagCount(), TDGen::getMatchableOperationDAGs(), TTAMachine::Machine::is64bit(), TDGen::llvmOperationPattern(), TDGen::mach_, Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), TDGen::operandChar(), TDGen::operationCanBeMatched(), TDGen::operationPattern(), TDGen::OT_REG_INT, TDGen::OT_REG_LONG, transformTCEPattern(), and TCEString::upper().
Referenced by writePatternDefinitions().
|
protected |
Definition at line 272 of file RISCVTDGen.cc.
References customOps_, OperationPool::operation(), and writePatternDefinition().
Referenced by initializeBackendContents().
|
protected |
Definition at line 69 of file RISCVTDGen.hh.
Referenced by findCustomOps(), and RISCVTDGen().
|
protected |
Definition at line 70 of file RISCVTDGen.hh.
Referenced by findCustomOps(), writeInstructionDeclarations(), and writePatternDefinitions().
|
protected |
Definition at line 71 of file RISCVTDGen.hh.
Referenced by generateBackend(), generateBackend(), and initializeBackendContents().
|
protected |
Definition at line 72 of file RISCVTDGen.hh.
Referenced by generateBackend(), and initializeBackendContents().