OpenASIP
2.0
|
#include <ProgramGraph.hh>
Public Member Functions | |
ProgramGraph (TTAProgram::Program &program, const TTAMachine::Machine &mach) | |
virtual | ~ProgramGraph () |
TTAProgram::Program & | generateProgram () const |
MoveNode & | nodeOf (const TTAProgram::Move &) const |
int | graphCount () const |
ProgramDependenceGraph * | graphAt (int) |
ProgramDependenceGraph * | graph (const std::string) |
Private Member Functions | |
void | clear () |
ProgramGraph (const ProgramGraph &) | |
Copying forbidden. More... | |
ProgramGraph & | operator= (const ProgramGraph &) |
Assignment forbidden. More... | |
Private Attributes | |
TTAProgram::Program & | program_ |
Original program. More... | |
std::vector< ControlFlowGraph * > | cfgs_ |
Vector of CFG's for each procedure. More... | |
std::vector< ControlDependenceGraph * > | cdgs_ |
Vector of CDG's for each procedure. More... | |
std::vector< DataDependenceGraph * > | ddgs_ |
Vector of DDG's for each procedure. More... | |
std::vector< ProgramDependenceGraph * > | pdgs_ |
Vector of PDG's for each procedure. More... | |
Definition at line 60 of file ProgramGraph.hh.
ProgramGraph::ProgramGraph | ( | TTAProgram::Program & | program, |
const TTAMachine::Machine & | mach | ||
) |
Constructor.
Creates a new ProgramGraph from Program
program | Program in POM |
Definition at line 54 of file ProgramGraph.cc.
References DataDependenceGraph::ALL_ANTIDEPS, DataDependenceGraphBuilder::build(), cdgs_, cfgs_, clear(), ddgs_, pdgs_, program, and ProgramDependenceGraph::ProgramDependenceGraph().
|
virtual |
Destructor.
Removes the graphs.
Definition at line 99 of file ProgramGraph.cc.
References clear().
|
private |
Copying forbidden.
|
private |
Deletes all graphs owned by this.
Definition at line 87 of file ProgramGraph.cc.
References cdgs_, cfgs_, ddgs_, SequenceTools::deleteAllItems(), and pdgs_.
Referenced by ProgramGraph(), and ~ProgramGraph().
TTAProgram::Program & ProgramGraph::generateProgram | ( | ) | const |
Convert Program Graph to Program Object Model and returns POM
TODO: convert PDG to POM this is basically scheduling
Definition at line 109 of file ProgramGraph.cc.
References TTAProgram::NullProgram::instance().
ProgramDependenceGraph * ProgramGraph::graph | ( | const std::string | name | ) |
Returns a PDG for procedure identified by procedure name.
name | name of a procedure |
Definition at line 157 of file ProgramGraph.cc.
References __func__, graphCount(), BoostGraph< ProgramDependenceNode, ProgramDependenceEdge >::name(), and pdgs_.
ProgramDependenceGraph * ProgramGraph::graphAt | ( | int | i | ) |
Returns a PDG for procedure identified by index.
i | index of a procedure |
Definition at line 143 of file ProgramGraph.cc.
References __func__, graphCount(), and pdgs_.
int ProgramGraph::graphCount | ( | ) | const |
MoveNode & ProgramGraph::nodeOf | ( | const TTAProgram::Move & | ) | const |
Returns MoveNode of program representation corresponding to Move of POM.
move | move from POM |
TODO: find a move and return corresponding MoveNode
Definition at line 122 of file ProgramGraph.cc.
|
private |
Assignment forbidden.
|
private |
Vector of CDG's for each procedure.
Definition at line 86 of file ProgramGraph.hh.
Referenced by clear(), and ProgramGraph().
|
private |
Vector of CFG's for each procedure.
Definition at line 84 of file ProgramGraph.hh.
Referenced by clear(), and ProgramGraph().
|
private |
Vector of DDG's for each procedure.
Definition at line 88 of file ProgramGraph.hh.
Referenced by clear(), and ProgramGraph().
|
private |
Vector of PDG's for each procedure.
Definition at line 90 of file ProgramGraph.hh.
Referenced by clear(), graph(), graphAt(), graphCount(), and ProgramGraph().
|
private |
Original program.
Definition at line 81 of file ProgramGraph.hh.