58 unsigned int _function_id,
const DesignFlowManagerConstRef _design_flow_manager)
70 switch(relationship_type)
74 relationships.insert(std::make_pair(OP_FEEDBACK_EDGES_IDENTIFICATION,
SAME_FUNCTION));
103 graph::vertex_iterator v, v_end;
104 std::list<vertex> to_visit;
107 std::map<graph::vertex_descriptor, bool> MARK;
110 for(boost::tie(v, v_end) = boost::vertices(*cfg); v != v_end; ++v)
117 while(!to_visit.empty())
119 vertex actual = to_visit.front();
121 "-->Checking vertex " +
GET_NAME(cfg, actual) +
" : " + std::to_string(index));
122 to_visit.pop_front();
125 graph::out_edge_iterator o, o_end;
126 graph::in_edge_iterator i, i_end;
129 for(boost::tie(o, o_end) = boost::out_edges(actual, *cfg); o != o_end; o++)
135 for(boost::tie(i, i_end) = boost::in_edges(next, *cfg); i != i_end; i++)
137 if(!MARK[boost::source(*i, *cfg)])
140 "---Not adding because of predecessor " +
GET_NAME(cfg, boost::source(*i, *cfg)));
147 if(Cget_edge_info<OpEdgeInfo>(*o, *cfg) &&
CFG_TRUE_CHECK(cfg, *o))
155 to_visit.push_front(next);
163 to_visit.push_front(then);
168 const std::map<vertex, unsigned int>& map_levels =
function_behavior->get_map_levels();
175 for(boost::tie(v, v_end) = boost::vertices(*cfg); v != v_end; v++)
#define CFG_TRUE_CHECK(data, edge_index)
check if the edge is a then control flow edge
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
#define INDENT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
File containing functions and utilities to support the printing of debug messagges.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
Data structore used to build the topological order of the operations vertices.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
#define GET_NAME(data, vertex_index)
Helper macro returning the name associated with a node.
unsigned int bb_version
The version of the basic block intermediate representation on which this step has been applied...
Auxiliary methods for manipulating string.
Analysis step computing a topological order of the operations.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
#define ENTRY
Superclass include.
Extended control flow graph.
Target must be reexecuted.
const OpGraphInfoConstRef CGetOpGraphInfo() const
Returns the property associated with the graph.
OpOrderComputation(const ParameterConstRef Param, const application_managerRef AppM, unsigned int function_id, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
#define DEBUG_LEVEL_NONE
no debugging print is performed.
~OpOrderComputation() override
Destructor.
DesignFlowStep_Status InternalExec() override
Computes a topological order of the operations according to the control flow graph.
This file collects some hash functors.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
this class is used to manage the command-line or XML options.
int debug_level
The debug level.
This class provides methods to build an operations graph.
#define NULL_VERTEX
null vertex definition
A brief description of the C++ Header File.
const FunctionBehaviorRef function_behavior
The function behavior of the function to be analyzed.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...