Go to the documentation of this file.
54 for (
int bbIndex = 0; bbIndex < nodeCount; ++bbIndex) {
88 #ifdef DEBUG_CALLS_TO_JUMPS
90 <<
"### found call: " << originalCall.
toString()
93 <<
"### BB: " << bb.
toString() << std::endl;
109 std::shared_ptr<Move> returnAddressMove = NULL;
110 std::shared_ptr<Move> jumpToFunction;
114 if (returnLocation != NULL) {
118 returnAddressMove = std::make_shared<Move>(
125 jumpToFunction = std::make_shared<Move>(
131 if (returnLocation != NULL) {
135 returnAddressMove = std::make_shared<Move>(
143 jumpToFunction = std::make_shared<Move>(
153 if (returnAddressMove != NULL) {
156 raMoveInstr->
addMove(returnAddressMove);
160 irm.
replace(instr, *raMoveInstr);
165 jumpInstr->
addMove(jumpToFunction);
169 if (returnAddressMove == NULL && irm.
hasReference(instr))
170 irm.
replace(instr, *jumpInstr);
176 #ifdef DEBUG_CALLS_TO_JUMPS
178 <<
"### removing " << instr.
toString() << std::endl;
void addMove(std::shared_ptr< Move > move)
@ ANN_JUMP_FUNCTION_CALL
The JUMP in the annotated move is a function call and should be treated as such in the data dependenc...
virtual Instruction & firstInstruction() const
Node & node(const int index) const
virtual void insertBefore(const Instruction &pos, Instruction *ins)
TTAMachine::Bus & universalBus() const
TTAProgram::TerminalFUPort * createTerminalFUPort(const TCEString &opName, int operand)
bool isUnconditional() const
virtual void remove(Instruction &ins)
InstructionReference createReference(Instruction &ins)
static UniversalMachine & instance()
std::string toString() const
std::string toString() const
static std::ostream & logStream()
TTAProgram::InstructionReferenceManager & instructionReferenceManager()
TTAProgram::BasicBlock & basicBlock()
#define assert(condition)
virtual ControlUnit * controlUnit() const
virtual int instructionCount() const
bool hasReference(Instruction &ins) const
void replace(Instruction &insA, Instruction &insB)
MoveGuard & guard() const
void addAnnotation(const ProgramAnnotation &annotation)
static NullInstructionTemplate & instance()
BasicBlockNode * fallThruSuccessor(const BasicBlockNode &bbn) const
virtual Terminal * copy() const =0
virtual Instruction & instructionAtIndex(int index) const
Terminal & source() const
virtual std::string toString() const
SpecialRegisterPort * returnAddressPort() const
virtual void handleControlFlowGraph(ControlFlowGraph &cfg, const TTAMachine::Machine &targetMachine)