50 #ifndef BASIC_BLOCK_HPP 51 #define BASIC_BLOCK_HPP 53 #include "config_HAVE_UNORDERED.hpp" 84 #define D_SELECTOR (1 << 7) 88 #define PD_SELECTOR (1 << 8) 91 #define J_SELECTOR (1 << 9) 94 #define PP_SELECTOR (1 << 10) 203 bool cdg_edge_T()
const;
208 bool cdg_edge_F()
const;
213 bool cfg_edge_T()
const;
218 bool cfg_edge_F()
const;
223 bool switch_p()
const;
233 void set_epp_value(
unsigned long long _epp_value);
238 unsigned long long get_epp_value()
const;
307 if(ExistsEdge(source, target))
309 return AddSelector(source, target, selector);
352 void WriteDot(
const std::string& file_name,
const int detail_level = 0)
const;
361 const int detail_level = 0)
const;
366 size_t num_bblocks()
const;
450 class BBEdgeSorter : std::binary_function<EdgeDescriptor, EdgeDescriptor, bool>
484 const std::map<vertex, unsigned int>&
ref;
503 return ref.find(x)->second < ref.find(y)->second;
BBVertexSorter bb_sorter
The vertex sorter.
This struct specifies the field bloc (basic block).
BBEdgeInfoRef GetBBEdgeInfo(const EdgeDescriptor e)
Returns the info associated with an edge.
const CustomOrderedSet< unsigned int > & get_live_in() const
Returns the live in of the basic block.
const unsigned int function_index
The index of the function.
Base class storing user data information to the whole graph.
Definition of the node_info object for the basic_block graph.
Information associated with a basic block edge.
BBGraphInfoRef GetBBGraphInfo()
Returns the property associated with the graph.
EdgeInfoRef GetEdgeInfo(typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target)
Get the edge property.
const BBGraphInfoConstRef CGetBBGraphInfo() const
Returns the property associated with the graph.
CONSTREF_FORWARD_DECL(application_manager)
Class specification of the graph structures.
Information associated with an operation or basic block graph.
const EdgeInfoConstRef CGetEdgeInfo(typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target) const
Get the edge property.
NodeInfoRef GetNodeInfo(typename boost::graph_traits< graphs_collection >::vertex_descriptor node)
FIXME: this method should become protected and called by equivalent method in subclasses Get the node...
redefinition of map to manage ordered/unordered structures
std::list< vertex > statements_list
List of operation vertices associated with basic block node.
EdgeDescriptor AddEdge(const vertex source, const vertex target, const int selector)
Add an edge with empty information associated.
unsigned long long epp_value
edge instrumented weight
unsigned int cer
id of the control equivalent region
const BBEdgeInfoConstRef CGetBBEdgeInfo(const EdgeDescriptor e) const
Returns the info associated with an edge.
Class used to describe a particular graph with basic blocks as nodes.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
size_t size() const
Returns the number of vertices of the graph representing the original program, associated with the cu...
const NodeInfoConstRef CGetNodeInfo(typename boost::graph_traits< graphs_collection >::vertex_descriptor node) const
Get the node property.
Base class description of data information associated with each node of a graph.
BBNodeInfo()
Empty constructor.
Information associated with the whole basic-block graph.
refcount< EdgeInfo > EdgeInfoRef
RefCount type definition of the edge_info class structure.
const CustomOrderedSet< unsigned int > & get_live_out() const
Returns the live in of the basic block.
bool empty() const
Returns true if there is no node associated with the basic block.
redefinition of set to manage ordered/unordered structures
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
BBGraphConstRef bb_graph
The basic block graph to which edges belong Note: this should be const, but can not because of assign...
General class used to describe a graph in PandA.
The key comparison function for vertices set based on levels.
class providing methods to manage a basic blocks graph.
Base class for graph property.
GraphInfoRef GetGraphInfo()
FIXME: this method should become protected and called by equivalent method in subclasses Get the grap...
Template definition of refcount.
Base class description of data information associated with each edge of a graph.
Data structures used to represent an edge in operation and basic block graphs.
BBNodeInfoRef GetBBNodeInfo(const vertex node)
Return the info associated with a basic block.
unsigned int loop_id
id of the loop to which basic block belongs to (0 if it doesn't belong to any loop) ...
const GraphInfoConstRef CGetGraphInfo() const
FIXME: this method should become protected and called by equivalent method in subclasses Get the grap...
void add_operation_node(const vertex op)
Adds an operation to the list of the statements.
bool operator()(const vertex x, const vertex y) const
Compares position of two vertices sorted in topological order.
const BBNodeInfoConstRef CGetBBNodeInfo(const vertex node) const
Return the info associated with a basic block.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
blocRef block
Structure associated with this basic block in the GCC tree.
unsigned int get_bb_index() const
Returns the index of the basic block.
x
Return the smallest n such that 2^n >= _x.
vertex entry_vertex
Index identifying the entry basic block.
CustomUnorderedMap< unsigned int, vertex > bb_index_map
bb_vertex_order_by_map(const std::map< vertex, unsigned int > &_ref)
Constructor.
const application_managerConstRef AppM
NOTE: this is equivalent to a weakrefcount since deleter should be null.
vertex exit_vertex
Index identifying the exit basic block.
BBGraphConstRef bb_graph
The basic block graph to which vertices belong Note: this should be const, but can not because of ass...
vertex get_last_operation() const
Returns the last operation vertex associated with the basic block.
vertex get_first_operation() const
Returns the first operation vertex associated with the basic block.
const std::map< vertex, unsigned int > & ref
Topological sorted vertices.
This structure defines graphs where nodes are basic_blocks.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.