82 std::map<vertex, CustomOrderedSet<unsigned int>>
live_in;
85 std::map<vertex, CustomOrderedSet<unsigned int>>
live_out;
112 std::map<vertex, std::string>
names;
235 var_op_definition[var] = v;
305 ending_operations[op].insert(v);
321 running_operations[op].insert(v);
346 support_set.push_front(v);
388 dummy_states.insert(state);
398 return dummy_states.find(state) != dummy_states.end();
void add_state_in_for_var(unsigned int var, vertex op, vertex state, vertex state_in)
put into relation for a given variable used in a state the state from which the variable comes ...
void add_state_out_for_var(unsigned int var, vertex op, vertex state, vertex state_in)
put into relation for a given variable defined in a state the state to which the variable goes ...
std::map< vertex, std::map< vertex, std::map< unsigned int, CustomOrderedSet< vertex > > > > state_out_definitions
store along which transitions the variable has to be stored
void add_dummy_state(vertex state)
add a state to the set of dummy vertices
const CustomOrderedSet< vertex > & get_state_where_end(vertex op) const
return in which support vertex the operation is ending
std::map< vertex, std::map< vertex, std::map< unsigned int, CustomOrderedSet< vertex > > > > state_in_definitions
store where a variable comes from given a support state and an operation
void add_state_for_running_op(vertex op, vertex v)
add a running state for a given operation
const tree_managerRef TreeM
The tree manager.
bool has_op_where_defined(unsigned int var) const
return true in case there exist an operation defining it
void erase_el_live_out(const vertex &v, unsigned int var)
erase a variable from the live out
bool is_a_dummy_state(vertex state)
check if a state is a dummy state
const CustomOrderedSet< unsigned int > empty_set
used to return a reference to an empty set
This class manages the tree structures extracted from the raw file.
std::map< vertex, CustomOrderedSet< vertex > > running_operations
store where an operation run and need its input
void add_state_for_ending_op(vertex op, vertex v)
add an ending state for a given operation
Class specification of the graph structures.
const CustomOrderedSet< vertex > & get_state_in(vertex state, vertex op, unsigned int var) const
given a variable and a state it returns the set of states from which the variable may come ...
void add_support_state(vertex v)
add a support state
bool has_state_out(vertex state, vertex op, unsigned int var) const
return true in case the variable for a given op and a given state has a state out ...
vertex get_start_op(vertex state) const
Return the operation from which the computation start.
redefinition of map to manage ordered/unordered structures
void set_live_in(const vertex &v, unsigned int var)
Store a variable alive at the input of the given vertex.
std::map< vertex, vertex > start_op
map a chained vertex with one of the starting operation
bool are_in_conflict(vertex op1, vertex op2) const
states if two operations are in conflict (i.e.
CONSTREF_FORWARD_DECL(Parameter)
bool non_in_parallel(vertex v1, vertex v2, const BBGraphConstRef cdg) const
const std::list< vertex > & get_support() const
return the support set of the live in/out
Class used to describe a particular graph with basic blocks as nodes.
void set_HLS(hlsRef _HLS)
std::map< vertex, CustomOrderedSet< unsigned int > > live_in
This is the map from each vertex to the set of variables live at the input of vertex.
const ParameterConstRef Param
class containing all the parameters
std::map< unsigned int, vertex > var_op_definition
store which operation defines the variable
liveness(const HLS_managerRef HLSMgr, const ParameterConstRef Param)
Constructor.
redefinition of set to manage ordered/unordered structures
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
const HLS_managerRef HLSMgr
const CustomOrderedSet< unsigned int > & get_live_out(const vertex &v) const
Get the set of variables live at the output of a vertex.
void erase_el_live_in(const vertex &v, unsigned int var)
erase a variable from the live in
std::map< vertex, CustomOrderedSet< unsigned int > > live_out
This is the map from each vertex to the set of variables live at the output of vertex.
Template definition of refcount.
std::list< vertex > support_set
vertex over which the live in/out is computed
const CustomOrderedSet< vertex > & get_state_out(vertex state, vertex op, unsigned int var) const
given a variable and a state it returns the set of destination states where the variable may be used ...
std::map< vertex, std::string > names
store the name of each state
void set_start_op(vertex state, vertex op)
Set the starting operation for a specified chained state.
bool has_state_in(vertex state, vertex op, unsigned int var) const
return true in case the variable for a given op and a given state has a state in
void set_live_out(const vertex &v, const CustomOrderedSet< unsigned int > &vars)
Store the variables alive at the output of the given vertex.
std::map< vertex, CustomOrderedSet< vertex > > ending_operations
store where an operation is terminating its execution
void add_name(vertex v, const std::string &name)
define the name of a state
const CustomOrderedSet< vertex > & get_state_where_run(vertex op) const
return in which support vertex the operation is running
const std::string null_vertex_string
null vertex string
CustomOrderedSet< vertex > dummy_states
Data structure that contains all information about high level synthesis process.
vertex get_op_where_defined(unsigned int var) const
return which operation defines the variable
void add_op_definition(unsigned int var, vertex v)
add a definition vertex for a variable
bool is_defined(unsigned int var) const
return true in case the variable var for a given opoeration v has been defined
const std::string & get_name(vertex v) const
return the name of the given state
const CustomOrderedSet< unsigned int > & get_live_in(const vertex &v) const
Get the set of variables live at the input of a vertex.