Go to the documentation of this file.
11 #ifndef TTA_CODE_GENERATOR_HH
12 #define TTA_CODE_GENERATOR_HH
29 class InstructionReference;
30 class InstructionReferenceManager;
32 class TerminalRegister;
36 class ProgramAnnotation;
175 std::shared_ptr<TTAProgram::Move>
209 const MoveNode* dynamicLimitMove,
int iterationCount,
int divider,
int loopSize);
CodeGenerator(const TTAMachine::Machine &mach)
const UniversalMachine * uMach_
Universal machine.
void immediateMove(TTAProgram::CodeSnippet &dstProcedure, int imm, const TCEString &dstReg)
void popFromStack(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, TTAProgram::Terminal *dstTerminal)
TTAProgram::TerminalFUPort * createTerminalFUPort(const TCEString &opName, int operand)
const TTAMachine::Machine * mach_
Target machine.
void registerMove(TTAProgram::CodeSnippet &dstProcedure, const TCEString &srcReg, const TCEString &dstReg)
ProgramOperationPtr createWhileLoopBufferInit(int loopSize)
TTAProgram::Instruction * addMoveToProcedure(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *srcTerminal, TTAProgram::Terminal *dstTerminal)
void addAnnotatedMoveToProcedure(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *srcTerminal, TTAProgram::Terminal *dstTerminal, const TTAProgram::ProgramAnnotation &annotation)
void storeTerminal(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *dstTerminal, TTAProgram::Terminal *srcTerminal)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
void pushRegisterToStack(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, const TCEString &srcReg)
TTAProgram::Terminal * createTerminalRegister(const TTAMachine::RegisterFile &rf, int regNum, bool readPort) const
void incrementStackPointer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &spReg)
void storeToAddress(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *dstTerminal, const TCEString &srcReg)
void pushRegisterToBuffer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, const TCEString &srcReg)
std::shared_ptr< TTAProgram::Move > createMove(TTAProgram::Terminal *src, TTAProgram::Terminal *dst)
std::set< TCEString > RegisterSet
void storeToRegisterAddress(TTAProgram::CodeSnippet &dstProcedure, const TCEString &dstReg, const TCEString &srcReg)
void decrementRegisterAddress(TTAProgram::CodeSnippet &dstProcedure, const TCEString &dstReg, int decrement)
TTAProgram::Procedure * createSchedYieldProcedure(TTAProgram::InstructionReferenceManager &refManager, const TCEString &name, const TCEString &schedProcedureName, const TCEString &stackReg, const TCEString &rvReg, const RegisterSet &saveRegs)
void popRegisterFromStack(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, const TCEString &dstReg)
void loadTerminal(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *srcTerminal, TTAProgram::Terminal *dstTerminal)
std::shared_ptr< TTAProgram::Move > createCall(TTAProgram::InstructionReference &callDst)
void decrementStackPointer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &spReg)
void incrementRegisterAddress(TTAProgram::CodeSnippet &dstProcedure, const TCEString &dstReg, int increment)
void popRegisterFromBuffer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &indexRegister, const TCEString &dstReg)
void registerJump(TTAProgram::CodeSnippet &dstProcedure, const TCEString &jumpAddrReg)
void pushInstructionReferenceToStack(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, TTAProgram::InstructionReference &srcAddr)
void popFromBuffer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &indexRegister, TTAProgram::Terminal *dstTerminal)
void loadFromRegisterAddress(TTAProgram::CodeSnippet &dstProcedure, const TCEString &srcReg, const TCEString &dstReg)
MachineInfo::OperationSet opset_
TCETools::CIStringSet OperationSet
void pushInstructionReferenceToBuffer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &indexRegister, TTAProgram::InstructionReference &srcAddr)
ProgramOperationPtr createBreakOperation(const MoveNode *jump)
std::vector< ProgramOperationPtr > createForLoopBufferInit(const MoveNode *dynamicLimitMove, int iterationCount, int divider, int loopSize)
void loadFromAddress(TTAProgram::CodeSnippet &dstProcedure, TTAProgram::Terminal *srcTerminal, const TCEString &dstReg)
static TTAProgram::MoveGuard * createInverseGuard(const TTAProgram::MoveGuard &mg, const TTAMachine::Bus *bus=NULL)
void pushToStack(TTAProgram::CodeSnippet &dstProcedure, const TCEString &stackRegister, TTAProgram::Terminal *srcTerminal)
void createExternalCall(TTAProgram::CodeSnippet &dstProcedure, const TCEString &procedureName)
std::shared_ptr< TTAProgram::Move > createJump(TTAProgram::InstructionReference &dst)
void pushToBuffer(TTAProgram::CodeSnippet &dstProcedure, const TCEString &indexRegister, TTAProgram::Terminal *srcTerminal)