|
OpenASIP 2.2
|
#include <iostream>#include <fstream>#include <set>#include <assert.h>#include "OperationPool.hh"#include "Operation.hh"#include "Conversion.hh"#include "OperationIndex.hh"#include "Operand.hh"#include "Application.hh"
Go to the source code of this file.
Enumerations | |
| enum | mode { NORMAL , FU_ADDRESSABLE , ADDRESSPACE , RISCV } |
Functions | |
| std::string | operandTypeCString (const Operand &operand) |
| void | writeCustomOpMacro (std::ostream &os, std::string &opName, const Operation &op, mode macroMode, bool legacy) |
| void | writeCustomOpMacros (std::ostream &os) |
| int | main (int argc, char *argv[]) |
| enum mode |
TCE custom op macro header generator for LLVM TCE backend.
| Enumerator | |
|---|---|
| NORMAL | |
| FU_ADDRESSABLE | |
| ADDRESSPACE | |
| RISCV | |
Definition at line 45 of file tceopgen.cc.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
tceopgen main function.
Generates plugin sourcecode files using TDGen.
Definition at line 310 of file tceopgen.cc.
References assert, Conversion::toString(), and writeCustomOpMacros().

| std::string operandTypeCString | ( | const Operand & | operand | ) |
Returns a C type string for the given operand type.
Definition at line 50 of file tceopgen.cc.
References Operand::DOUBLE_WORD, Operand::FLOAT_WORD, Operand::RAW_DATA, Operand::SINT_WORD, Operand::SLONG_WORD, Operand::type(), Operand::UINT_WORD, and Operand::ULONG_WORD.
Referenced by writeCustomOpMacro().

| void writeCustomOpMacro | ( | std::ostream & | os, |
| std::string & | opName, | ||
| const Operation & | op, | ||
| mode | macroMode, | ||
| bool | legacy | ||
| ) |
Produces the _TCE_OPNAME or _TCEFU_OPNAME macro that can be written to the tceops.h header file from the given operation.
Definition at line 85 of file tceopgen.cc.
References ADDRESSPACE, Operation::affectedByCount(), Operation::affectsCount(), FU_ADDRESSABLE, Operation::hasSideEffects(), Operation::input(), Operand::isInput(), Operand::isVector(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), operandTypeCString(), Operation::output(), RISCV, and Operation::writesMemory().
Referenced by writeCustomOpMacros().

| void writeCustomOpMacros | ( | std::ostream & | os | ) |
Produces the _TCE_OPNAME and _TCEFU_OPNAME macros that can be written to the tceops.h header file.
Definition at line 267 of file tceopgen.cc.
References ADDRESSPACE, Exception::errorMessage(), Application::errorStream(), FU_ADDRESSABLE, OperationIndex::module(), OperationIndex::moduleCount(), NORMAL, OperationIndex::operationCount(), OperationIndex::operationName(), RISCV, Operation::usesMemory(), and writeCustomOpMacro().
Referenced by main().
