Go to the documentation of this file.
12 #ifndef TTA_PEEL_2_BB_LOOPS_HH
13 #define TTA_PEEL_2_BB_LOOPS_HH
33 return "optimizes two-BB inner loops into single-bb inner loops";
38 assert(!ok &&
"only call this on fail to allow return false"); }
48 operator bool()
const {
return preLoop != NULL; }
TTAProgram::InstructionReferenceManager * irm_
BasicBlockNode * postLoop
BasicBlockNode * beginLoop
bool negateOp(ProgramOperationPtr po)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
#define assert(condition)
Peel2BBLoops(InterPassData &data, const TTAMachine::Machine &targetMachine)
void updateCFG(ControlFlowGraph &cfg, BBNodes &bbns)
void peel2BBLoop(ControlFlowGraph &cfg, BBNodes &bbns)
void appendBB(const TTAProgram::BasicBlock &src, TTAProgram::BasicBlock &dest, BasicBlockNode *newJumpDest)
TTAProgram::CodeGenerator * codeGenerator_
void handleControlFlowGraph(ControlFlowGraph &cfg, const TTAMachine::Machine &targetMachine) override
BBNodes(BasicBlockNode *prel, BasicBlockNode *bl, BasicBlockNode *el, BasicBlockNode *pol)
BBNodes testIf2BBLoop(ControlFlowGraph &cfg, BasicBlockNode &bbn)
virtual std::string shortDescription() const override
const TTAMachine::Machine & mach_
void performCodeMotion(BBNodes &bbns)