OpenASIP
2.0
|
#include <ControlFlowGraphPass.hh>
Public Member Functions | |
ControlFlowGraphPass (InterPassData &data) | |
virtual | ~ControlFlowGraphPass () |
virtual void | handleControlFlowGraph (ControlFlowGraph &cfg, const TTAMachine::Machine &targetMachine) |
void | executeBasicBlockPass (ControlFlowGraph &cfg, const TTAMachine::Machine &targetMachine, BasicBlockPass &bbPass) |
Public Member Functions inherited from SchedulerPass | |
SchedulerPass (InterPassData &data) | |
virtual | ~SchedulerPass () |
InterPassData & | interPassData () |
virtual std::string | shortDescription () const =0 |
virtual std::string | longDescription () const |
Interface for scheduler passes that handle control flow graphs.
Definition at line 50 of file ControlFlowGraphPass.hh.
ControlFlowGraphPass::ControlFlowGraphPass | ( | InterPassData & | data | ) |
Constructor.
Definition at line 42 of file ControlFlowGraphPass.cc.
|
virtual |
void ControlFlowGraphPass::executeBasicBlockPass | ( | ControlFlowGraph & | cfg, |
const TTAMachine::Machine & | targetMachine, | ||
BasicBlockPass & | bbPass | ||
) |
Executes the given basic block pass on each basic block of the given control flow graph in the original program order.
A helper function for implementing most simplest types of CFG passes.
cfg | The control flow graph to handle. |
targetMachine | The target machine, if any. (NullMachine::instance() if target machine is irrelevant). |
bbPass | The basic block pass to execute. |
In | case handling is unsuccesful for any reason (cfg might still get modified). |
Definition at line 90 of file ControlFlowGraphPass.cc.
References BasicBlockNode::basicBlock(), BasicBlockPass::handleBasicBlock(), ControlFlowGraph::instructionReferenceManager(), BasicBlockNode::isNormalBB(), BasicBlockNode::isScheduled(), ControlFlowGraph::isSingleBBLoop(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), and BasicBlockNode::setScheduled().
Referenced by handleControlFlowGraph().
|
virtual |
Handles a single control flow graph.
The pass should work with any kind of control flow graph, it should not assume the CFG represents a whole procedure, for example.
cfg | The control flow graph to handle. |
machine | The target machine if any. (NullMachine::instance() if target machine is irrelevant). |
In | case handling is unsuccesful for any reason (cfg might still get modified). |
Reimplemented in BBSchedulerController, Peel2BBLoops, PreOptimizer, SimpleIfConverter, CallsToJumps, and ScheduleEstimator.
Definition at line 65 of file ControlFlowGraphPass.cc.
References abortWithError, and executeBasicBlockPass().
Referenced by llvm::LLVMTCEIRBuilder::compileFast(), llvm::LLVMTCEIRBuilder::compileOptimized(), and ProcedurePass::executeControlFlowGraphPass().