OpenASIP  2.0
Public Member Functions | List of all members
ControlDependenceGraphPass Class Referenceabstract

#include <ControlDependenceGraphPass.hh>

Inheritance diagram for ControlDependenceGraphPass:
Inheritance graph
Collaboration diagram for ControlDependenceGraphPass:
Collaboration graph

Public Member Functions

 ControlDependenceGraphPass (InterPassData &data)
 
virtual ~ControlDependenceGraphPass ()
 
virtual void handleControlDependenceGraph (ControlDependenceGraph &cdg, const TTAMachine::Machine &targetMachine)=0
 
- Public Member Functions inherited from SchedulerPass
 SchedulerPass (InterPassData &data)
 
virtual ~SchedulerPass ()
 
InterPassDatainterPassData ()
 
virtual std::string shortDescription () const =0
 
virtual std::string longDescription () const
 

Detailed Description

Interface for scheduler passes that handle control dependence graphs.

Definition at line 55 of file ControlDependenceGraphPass.hh.

Constructor & Destructor Documentation

◆ ControlDependenceGraphPass()

ControlDependenceGraphPass::ControlDependenceGraphPass ( InterPassData data)

Constructor.

Definition at line 47 of file ControlDependenceGraphPass.cc.

47  :
48  SchedulerPass(data) {
49 }

◆ ~ControlDependenceGraphPass()

ControlDependenceGraphPass::~ControlDependenceGraphPass ( )
virtual

Destructor.

Definition at line 54 of file ControlDependenceGraphPass.cc.

54  {
55 }

Member Function Documentation

◆ handleControlDependenceGraph()

void ControlDependenceGraphPass::handleControlDependenceGraph ( ControlDependenceGraph cdg,
const TTAMachine::Machine targetMachine 
)
pure virtual

Handles a single control dependence graph.

The pass should work with any kind of control dependence graph, it should not assume the CDG represents a whole procedure, for example.

Parameters
cdgThe control dependence graph to handle.
machineThe target machine if any. (NullMachine::instance() if target machine is irrelevant).
Exceptions
Incase handling is unsuccesful for any reason (cdg might still get modified).

Definition at line 70 of file ControlDependenceGraphPass.cc.

71  {
72  //Trivial handling so far, just compute analysis info for serialization
73  // Throws exception in case there is indirect jump
74  cdg.nodeCount();
75  try {
76  cdg.analyzeCDG();
77  } catch (const InvalidData& e) {
78  // CFG had indirect jump
79  } catch (const Exception& e) {
80  throw ModuleRunTimeError(
81  __FILE__, __LINE__, __func__, e.errorMessageStack());
82  }
83  targetMachine.machineTester();
84 }

References __func__, ControlDependenceGraph::analyzeCDG(), Exception::errorMessageStack(), TTAMachine::Machine::machineTester(), and BoostGraph< GraphNode, GraphEdge >::nodeCount().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
ControlDependenceGraph::analyzeCDG
void analyzeCDG()
Definition: ControlDependenceGraph.cc:745
SchedulerPass::SchedulerPass
SchedulerPass(InterPassData &data)
Definition: SchedulerPass.cc:40
InvalidData
Definition: Exception.hh:149
TTAMachine::Machine::machineTester
MachineTester & machineTester() const
Definition: Machine.cc:671
__func__
#define __func__
Definition: Application.hh:67
Exception::errorMessageStack
std::string errorMessageStack(bool messagesOnly=false) const
Definition: Exception.cc:138
Exception
Definition: Exception.hh:54
ModuleRunTimeError
Definition: Exception.hh:1043
BoostGraph::nodeCount
int nodeCount() const