OpenASIP
2.0
|
#include <ProgramDependenceEdge.hh>
Public Types | |
enum | EdgeType { PDG_EDGE_CONTROL, PDG_EDGE_DATA, PDG_EDGE_LOOP_CLOSE, PDG_EDGE_CONTROL_ARTIFICIAL } |
Public Member Functions | |
ProgramDependenceEdge (ControlDependenceEdge &cEdge) | |
ProgramDependenceEdge (DataDependenceEdge &cEdge) | |
ProgramDependenceEdge (EdgeType type=PDG_EDGE_CONTROL_ARTIFICIAL) | |
virtual | ~ProgramDependenceEdge () |
bool | isControlDependence () const |
bool | isDataDependence () const |
bool | isArtificialControlDependence () const |
bool | isLoopCloseEdge () const |
ControlDependenceEdge & | controlDependenceEdge () |
DataDependenceEdge & | dataDependenceEdge () |
TCEString | toString () const |
TCEString | dotString () const |
void | setFixed () |
bool | fixed () |
![]() | |
GraphEdge () | |
GraphEdge (const GraphEdge &edge) | |
virtual GraphEdge * | clone () const |
virtual | ~GraphEdge () |
virtual int | edgeID () const |
virtual bool | isBackEdge () const |
int | weight () const |
void | setWeight (int w) |
Private Attributes | |
ControlDependenceEdge * | cEdge_ |
DataDependenceEdge * | dEdge_ |
EdgeType | type_ |
bool | fixed_ |
Set to fixed if edge is not to be moved any more while serializing. More... | |
Definition at line 41 of file ProgramDependenceEdge.hh.
Definition at line 43 of file ProgramDependenceEdge.hh.
ProgramDependenceEdge::ProgramDependenceEdge | ( | ControlDependenceEdge & | cEdge | ) |
Constructor, makes new Program Dependence Edge with reference to original Control Dependence Edge in CDG.
cEdge | Control Dependence Edge |
Definition at line 50 of file ProgramDependenceEdge.cc.
References ControlDependenceEdge::isLoopCloseEdge(), PDG_EDGE_CONTROL, PDG_EDGE_LOOP_CLOSE, and type_.
ProgramDependenceEdge::ProgramDependenceEdge | ( | DataDependenceEdge & | dEdge | ) |
Constructor, makes new Program Dependence Edge with reference to original Data Dependence Edge in DDG.
dEdge | Data Dependence Edge |
Definition at line 65 of file ProgramDependenceEdge.cc.
ProgramDependenceEdge::ProgramDependenceEdge | ( | EdgeType | type = PDG_EDGE_CONTROL_ARTIFICIAL | ) |
|
virtual |
ControlDependenceEdge & ProgramDependenceEdge::controlDependenceEdge | ( | ) |
Returns reference to control dependence edge of CDG.
Definition at line 166 of file ProgramDependenceEdge.cc.
References __func__, and cEdge_.
Referenced by ProgramDependenceGraph::processPredicate().
DataDependenceEdge & ProgramDependenceEdge::dataDependenceEdge | ( | ) |
Returns reference to data dependence edge of CDG.
Definition at line 179 of file ProgramDependenceEdge.cc.
References dEdge_.
Referenced by ProgramDependenceGraph::moveDDGedges().
|
virtual |
Returns the edge description as a string in .dot format.
Reimplemented from GraphEdge.
Definition at line 101 of file ProgramDependenceEdge.cc.
References cEdge_, isArtificialControlDependence(), isControlDependence(), ControlDependenceEdge::isFalseEdge(), isLoopCloseEdge(), ControlDependenceEdge::isTrueEdge(), and toString().
|
inline |
bool ProgramDependenceEdge::isArtificialControlDependence | ( | ) | const |
Tests if edge is artificial control dependence type. Artificial edges are added during PDG synchronization.
Definition at line 147 of file ProgramDependenceEdge.cc.
References PDG_EDGE_CONTROL_ARTIFICIAL, and type_.
Referenced by dotString(), isControlDependence(), ProgramDependenceGraph::processPredicate(), and toString().
bool ProgramDependenceEdge::isControlDependence | ( | ) | const |
Tests if edge is control dependence type.
Definition at line 126 of file ProgramDependenceEdge.cc.
References cEdge_, isArtificialControlDependence(), PDG_EDGE_CONTROL, and type_.
Referenced by dotString(), and toString().
bool ProgramDependenceEdge::isDataDependence | ( | ) | const |
Tests if edge is data dependence type.
Definition at line 137 of file ProgramDependenceEdge.cc.
References dEdge_, PDG_EDGE_DATA, and type_.
Referenced by ProgramDependenceGraph::removeGuardedJump(), and toString().
bool ProgramDependenceEdge::isLoopCloseEdge | ( | ) | const |
Tests if edge is loop close edge from artificial close node to loop entry node
Definition at line 157 of file ProgramDependenceEdge.cc.
References PDG_EDGE_LOOP_CLOSE, and type_.
Referenced by dotString(), and toString().
|
inline |
|
virtual |
Returns the edge description as a string.
Reimplemented from GraphEdge.
Definition at line 81 of file ProgramDependenceEdge.cc.
References cEdge_, dEdge_, isArtificialControlDependence(), isControlDependence(), isDataDependence(), isLoopCloseEdge(), ControlDependenceEdge::toString(), and DataDependenceEdge::toString().
Referenced by dotString().
|
private |
Definition at line 68 of file ProgramDependenceEdge.hh.
Referenced by controlDependenceEdge(), dotString(), isControlDependence(), and toString().
|
private |
Definition at line 69 of file ProgramDependenceEdge.hh.
Referenced by dataDependenceEdge(), isDataDependence(), and toString().
|
private |
Set to fixed if edge is not to be moved any more while serializing.
Definition at line 72 of file ProgramDependenceEdge.hh.
Referenced by fixed(), and setFixed().
|
private |
Definition at line 70 of file ProgramDependenceEdge.hh.
Referenced by isArtificialControlDependence(), isControlDependence(), isDataDependence(), isLoopCloseEdge(), and ProgramDependenceEdge().