Go to the documentation of this file.
10 #ifndef TTA_SIMPLE_IF_CONVERTER_HH
11 #define TTA_SIMPLE_IF_CONVERTER_HH
33 class InstructionReferenceManager;
62 std::map<ProgramOperationPtr,ProgramOperationPtr>& poMapping);
117 std::pair<BasicBlockNode*,BasicBlockNode*>
successors(
132 bool ignoreLastInstruction);
TTAProgram::BasicBlock & lastBB_
TTAProgram::MoveGuard * invg_
BasicBlockNode & firstNode_
TTAProgram::MoveGuard * guard_
bool writesRegister(const TTAProgram::BasicBlock &bb, int index, const TTAMachine::RegisterFile &rf, bool ignoreLastInstruction)
TTAProgram::BasicBlock & jumpDestBB_
static ProgramOperationPtr fixTerminalPO(TTAProgram::TerminalFUPort &terminal, std::map< ProgramOperationPtr, ProgramOperationPtr > &poMapping)
virtual std::string shortDescription() const
TTAProgram::InstructionReferenceManager * irm_
CandidateBlocks * detectDiamond(BasicBlockNode &bbn, BasicBlockNode &fallThruNode, BasicBlockNode &jumpDestNode, ControlFlowGraph &cfg)
virtual void handleProgram(TTAProgram::Program &program, const TTAMachine::Machine &targetMachine)
BasicBlockNode * joinNode_
CandidateBlocks * searchCandidate(ControlFlowGraph &cfg)
SimpleIfConverter(InterPassData &data, const TTAMachine::Machine &targetMachine)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
void addJump(TTAProgram::BasicBlock &bb, BasicBlockNode &bbn)
std::pair< BasicBlockNode *, BasicBlockNode * > successors(BasicBlockNode &node, ControlFlowGraph &cfg)
TTAProgram::BasicBlock & firstBB_
BasicBlockNode & fallThruNode_
bool canConvert(CandidateBlocks *candidates, ControlFlowGraph &cfg)
const TTAMachine::RegisterFile * grFile_
void convert(CandidateBlocks &bblocks, ControlFlowGraph &cfg)
BasicBlockNode * succNode1_
virtual void handleProcedure(TTAProgram::Procedure &procedure, const TTAMachine::Machine &targetMachine)
BasicBlockNode & lastNode_
TTAProgram::BasicBlock * joinBB_
bool hasConditionals(TTAProgram::BasicBlock &bb)
void combineBlocks(CandidateBlocks &bblocks)
static bool removeJump(TTAProgram::BasicBlock &bb)
virtual void handleControlFlowGraph(ControlFlowGraph &cfg, const TTAMachine::Machine &targetMachine)
CandidateBlocks * detectTriangleViaJump(BasicBlockNode &bbn, BasicBlockNode &fallThruNode, BasicBlockNode &jumpDestNode, ControlFlowGraph &cfg)
find Finds info of the inner loops in the program
TTAProgram::BasicBlock & fallThruBB_
CandidateBlocks * detectTriangleViaFt(BasicBlockNode &bbn, BasicBlockNode &fallThruNode, BasicBlockNode &jumpDestNode, ControlFlowGraph &cfg)
CandidateBlocks(BasicBlockNode &firstNode, BasicBlockNode &fallThruNode, BasicBlockNode &jumpNode, BasicBlockNode &lastNode, BasicBlockNode *joinNode, BasicBlockNode *succNode1, BasicBlockNode *succNode2, bool removeJoin, bool removeFT, bool removeJd)
BasicBlockNode & jumpDestNode_
void appendBB(const TTAProgram::BasicBlock &src, TTAProgram::BasicBlock &dest, TTAProgram::MoveGuard *mg, bool removeJumps)
TTAProgram::CodeGenerator * codeGenerator_
void updateCfg(CandidateBlocks &bblocks, ControlFlowGraph &cfg)
BasicBlockNode * succNode2_