44 #ifndef BASIC_BLOCKS_GRAPH_CONSTRUCTOR_HPP 45 #define BASIC_BLOCKS_GRAPH_CONSTRUCTOR_HPP This struct specifies the field bloc (basic block).
bool check_vertex(unsigned int block_index) const
return true in case the vertex has been already created
void add_operation_to_bb(vertex op, unsigned int index)
Add an operation to its basic block.
Class specification of the graph structures.
EdgeDescriptor AddEdge(const vertex source, const vertex target, const int selector)
Add an edge selector.
redefinition of map to manage ordered/unordered structures
BasicBlocksGraphConstructor(BBGraphsCollectionRef _bg)
Constructor.
CustomUnorderedMap< unsigned int, vertex > & bb_index_map
Map between basic block node index and vertices.
REF_FORWARD_DECL(BasicBlocksGraphConstructor)
~BasicBlocksGraphConstructor()
Destructor.
const BBGraphRef bb_graph
Reference to graph with all the edges.
vertex Cget_vertex(unsigned int block_index) const
return a vertex of the graph given the functionID.
Class used to describe a particular graph with basic blocks as nodes.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
void Clear()
Remove all vertices and edges.
void RemoveEdge(const vertex source, const vertex target, const int selector)
Remove an edge selector.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
void add_bb_edge_info(const vertex source, const vertex target, int type, const unsigned int label)
add label to edge between vertex source and vertex target
vertex add_vertex(const blocRef info)
Add a new vertex to the basic blocks graphs.
EdgeDescriptor connect_to_entry(const vertex target)
add edge between entry and target
class providing methods to manage a basic blocks graph.
Template definition of refcount.
const BBGraphsCollectionRef bg
reference to the bulk basic blocks graph
EdgeDescriptor connect_to_exit(const vertex source)
add edge between source and exit
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
This structure defines graphs where nodes are basic_blocks.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.