62 const auto caller_id = get_node_info<UnfoldedFunctionInfo>(caller_v, ucg)->f_id;
70 for(
const auto& call_id : caller->second)
76 const auto is_direct =
78 for(
const auto& called_id :
82 const auto& behaviors = cg->CGetCallGraphInfo()->behaviors;
83 const auto b = behaviors.find(called_id);
97 const auto CGM = HLSMgr->CGetCallGraphManager();
98 const auto root_functions = CGM->GetRootFunctions();
100 const auto root_function = *(root_functions.begin());
101 const auto CG = CGM->CGetCallGraph();
107 std::vector<boost::default_color_type> csc_color(boost::num_vertices(*CG));
109 boost::make_iterator_property_map(
110 csc_color.begin(), boost::get(boost::vertex_index_t(), *CG), boost::white_color));
116 const auto FB = HLSMgr->CGetFunctionBehavior(root_function);
117 for(
const auto fun_id : CGM->GetReachedFunctionsFrom(root_function))
121 "at least ENTRY and EXIT node must exist for op graph of function " +
STR(fun_id));
122 HLSMgr->RDiscr->n_total_operations += boost::num_vertices(*op_graph) - 2;
125 HLSMgr->RDiscr->unfolded_root_v =
127 RecursivelyUnfold(HLSMgr->RDiscr->unfolded_root_v, HLSMgr->RDiscr->DiscrepancyCallGraph, CG,
128 HLSMgr->RDiscr->call_sites_info);
132 const DesignFlowManagerConstRef _design_flow_manager)
144 switch(relationship_type)
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Data structure representing the entire HLS information.
~CallGraphUnfolding() override
File containing functions and utilities to support the printing of debug messagges.
static void Unfold(const HLS_managerRef &HLSMgr)
boost::graph_traits< boost_raw_graph >::vertex_descriptor AddVertex(const NodeInfoRef v_info)
DesignFlowStep_Status Exec() override
Execute the step.
const int output_level
The output level.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
#define INDENT_OUT_MEX(outLevel, curOutLevel, mex)
CallGraphUnfolding(const ParameterConstRef Param, const HLS_managerRef HLSMgr, const DesignFlowManagerConstRef design_flow_manager)
CustomUnorderedMap< unsigned int, UnorderedSetStdStable< unsigned int > > fu_id_to_call_ids
Maps every function to the calls it performs.
static void RecursivelyUnfold(const UnfoldedVertexDescriptor caller_v, UnfoldedCallGraph &ucg, const CallGraphConstRef &cg, const CallSitesInfoRef &call_sites_info)
boost::graph_traits< boost_raw_graph >::edge_descriptor AddEdge(boost::graph_traits< boost_raw_graph >::vertex_descriptor src, boost::graph_traits< boost_raw_graph >::vertex_descriptor tgt, const EdgeInfoRef e_info)
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
refcount< EdgeInfo > EdgeInfoRef
RefCount type definition of the edge_info class structure.
Target must be reexecuted.
CustomUnorderedMap< unsigned int, UnorderedSetStdStable< unsigned int > > call_id_to_called_id
Maps every id of a call site to the id of the called function.
DesignFlowStep_Status
The status of a step.
boost::graph_traits< UnfoldedCallGraph >::vertex_descriptor UnfoldedVertexDescriptor
const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
refcount< NodeInfo > NodeInfoRef
RefCount type definition of the NodeInfo class structure.
CustomUnorderedSet< unsigned int > indirect_calls
Set of indirect calls.
CustomUnorderedSet< unsigned int > taken_addresses
Set of taken addresses.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
this class is used to manage the command-line or XML options.
Control flow graph with feedback.
#define OUTPUT_LEVEL_VERBOSE
verbose debugging print is performed.
refcount< const HLSFlowStepSpecialization > HLSFlowStepSpecializationConstRef
const refcount definition of the class
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...