PandA-2024.02
Public Types | Public Member Functions | Private Types | Private Attributes
dominance< GraphObj > Class Template Reference

Dominator o post-dominator data structure. More...

#include <Dominance.hpp>

Inheritance diagram for dominance< GraphObj >:
Inheritance graph
[legend]
Collaboration diagram for dominance< GraphObj >:
Collaboration graph
[legend]

Public Types

enum  cdi_direction { CDI_DOMINATORS, CDI_POST_DOMINATORS, CDI_NONE }
 type of computation. More...
 
enum  dom_state { DOM_NONE, DOM_NO_FAST_QUERY, DOM_OK }
 type of information stored in dom_info data structure More...
 

Public Member Functions

 dominance (const dominance< GraphObj > &)=delete
 Deleted copy constructor for Weffc++. More...
 
dominance< GraphObj > operator= (const dominance< GraphObj > &)=delete
 Deleted assignment operator for Weffc++. More...
 
void calculate_dominance_info (enum dominance::cdi_direction dir)
 The main entry point into this module. More...
 
 dominance (const GraphObj &_g, const Vertex _en_block, const Vertex _ex_block, const ParameterConstRef _param)
 Constructor for the dominance class. More...
 
Vertex get_immediate_dominator (Vertex v) const
 Return the immediate dominator of a Vertex. More...
 
const CustomUnorderedMapStable< Vertex, CustomOrderedSet< Vertex > > getAllDominated () const
 Returns a map containing, for each Vertex, a set formed by all the vertices dominated by it (all the dominator relationships, not only the direct one are considered). More...
 
const CustomUnorderedMapStable< Vertex, Vertex > & get_dominator_map () const
 Return the dominators tree as a map between Vertex and its immediate dominator. More...
 

Private Types

using Vertex = typename boost::graph_traits< const GraphObj >::vertex_descriptor
 Definition of Vertex. More...
 
using Vertex_iterator = typename boost::graph_traits< const GraphObj >::vertex_iterator
 Vertex_iterator definition. More...
 

Private Attributes

enum cdi_direction dom_dir
 This variable store the direction for which the calculus is done. More...
 
enum dom_state dom_computed
 Whether the dominators and the postdominators are available. */. More...
 
const GraphObj & g
 Flow graph reference. More...
 
const Vertex en_block
 Start block (ENTRY_BLOCK_PTR for forward problem, EXIT_BLOCK for backward problem). More...
 
const Vertex ex_block
 Ending block. More...
 
CustomUnorderedMapStable< Vertex, Vertexdom
 After the algorithm is done, dom[x] contains the immediate dominator of x. More...
 
const ParameterConstRef param
 The set of input parameters. More...
 
int debug_level
 Debug level. More...
 

Friends

some friend classes
class loop_regions_computation
 
class add_loop_nop
 

Detailed Description

template<typename GraphObj>
class dominance< GraphObj >

Dominator o post-dominator data structure.

Definition at line 627 of file Dominance.hpp.

Member Typedef Documentation

◆ Vertex

template<typename GraphObj>
using dominance< GraphObj >::Vertex = typename boost::graph_traits<const GraphObj>::vertex_descriptor
private

Definition of Vertex.

Definition at line 657 of file Dominance.hpp.

◆ Vertex_iterator

template<typename GraphObj>
using dominance< GraphObj >::Vertex_iterator = typename boost::graph_traits<const GraphObj>::vertex_iterator
private

Vertex_iterator definition.

Definition at line 660 of file Dominance.hpp.

Member Enumeration Documentation

◆ cdi_direction

template<typename GraphObj>
enum dominance::cdi_direction

type of computation.

Enumerator
CDI_DOMINATORS 
CDI_POST_DOMINATORS 
CDI_NONE 

Definition at line 633 of file Dominance.hpp.

◆ dom_state

template<typename GraphObj>
enum dominance::dom_state

type of information stored in dom_info data structure

Enumerator
DOM_NONE 

Not computed at all.

DOM_NO_FAST_QUERY 

The data is OK, but the fast query data are not usable.

DOM_OK 

Everything is ok.

Definition at line 640 of file Dominance.hpp.

Constructor & Destructor Documentation

◆ dominance() [1/2]

template<typename GraphObj>
dominance< GraphObj >::dominance ( const dominance< GraphObj > &  )
delete

Deleted copy constructor for Weffc++.

◆ dominance() [2/2]

template<typename GraphObj>
dominance< GraphObj >::dominance ( const GraphObj &  _g,
const Vertex  _en_block,
const Vertex  _ex_block,
const ParameterConstRef  _param 
)
inline

Constructor for the dominance class.

Parameters
_gis the starting graph
_en_blockis the entry Vertex
_ex_blockis the exit_Vertex
dlis the debug_level

Definition at line 741 of file Dominance.hpp.

Member Function Documentation

◆ calculate_dominance_info()

template<typename GraphObj>
void dominance< GraphObj >::calculate_dominance_info ( enum dominance< GraphObj >::cdi_direction  dir)
inline

The main entry point into this module.

Parameters
diris set depending on whether we want to compute dominators or postdominators.

store the intermediate information used to compute dominator or post dominator information

store the intermediate information used to compute dominator or post dominator information

fast query not yet supported

Definition at line 701 of file Dominance.hpp.

Referenced by weak_dominance::calculate_weak_dominance_info(), Bit_Value::Initialize(), and eSSA::InternalExec().

Here is the caller graph for this function:

◆ get_dominator_map()

template<typename GraphObj>
const CustomUnorderedMapStable<Vertex, Vertex>& dominance< GraphObj >::get_dominator_map ( ) const
inline

Return the dominators tree as a map between Vertex and its immediate dominator.

Definition at line 806 of file Dominance.hpp.

Referenced by weak_dominance::calculate_weak_dominance_info().

Here is the caller graph for this function:

◆ get_immediate_dominator()

template<typename GraphObj>
Vertex dominance< GraphObj >::get_immediate_dominator ( Vertex  v) const
inline

Return the immediate dominator of a Vertex.

Parameters
vis the node considered.
Returns
the node of the immediate dominator.

Definition at line 757 of file Dominance.hpp.

Referenced by Loops::DetectLoops(), BBCdgComputation::InternalExec(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().

Here is the caller graph for this function:

◆ getAllDominated()

template<typename GraphObj>
const CustomUnorderedMapStable<Vertex, CustomOrderedSet<Vertex> > dominance< GraphObj >::getAllDominated ( ) const
inline

Returns a map containing, for each Vertex, a set formed by all the vertices dominated by it (all the dominator relationships, not only the direct one are considered).

Definition at line 767 of file Dominance.hpp.

Referenced by Loops::DetectLoops().

Here is the caller graph for this function:

◆ operator=()

template<typename GraphObj>
dominance<GraphObj> dominance< GraphObj >::operator= ( const dominance< GraphObj > &  )
delete

Deleted assignment operator for Weffc++.

Friends And Related Function Documentation

◆ add_loop_nop

template<typename GraphObj>
friend class add_loop_nop
friend

Definition at line 653 of file Dominance.hpp.

◆ loop_regions_computation

template<typename GraphObj>
friend class loop_regions_computation
friend

Definition at line 652 of file Dominance.hpp.

Field Documentation

◆ debug_level

template<typename GraphObj>
int dominance< GraphObj >::debug_level
private

Debug level.

Definition at line 685 of file Dominance.hpp.

◆ dom

template<typename GraphObj>
CustomUnorderedMapStable<Vertex, Vertex> dominance< GraphObj >::dom
private

After the algorithm is done, dom[x] contains the immediate dominator of x.

Definition at line 679 of file Dominance.hpp.

◆ dom_computed

template<typename GraphObj>
enum dom_state dominance< GraphObj >::dom_computed
private

Whether the dominators and the postdominators are available. */.

Definition at line 668 of file Dominance.hpp.

◆ dom_dir

template<typename GraphObj>
enum cdi_direction dominance< GraphObj >::dom_dir
private

This variable store the direction for which the calculus is done.

Definition at line 665 of file Dominance.hpp.

◆ en_block

template<typename GraphObj>
const Vertex dominance< GraphObj >::en_block
private

Start block (ENTRY_BLOCK_PTR for forward problem, EXIT_BLOCK for backward problem).

Definition at line 674 of file Dominance.hpp.

◆ ex_block

template<typename GraphObj>
const Vertex dominance< GraphObj >::ex_block
private

Ending block.

Definition at line 676 of file Dominance.hpp.

◆ g

template<typename GraphObj>
const GraphObj& dominance< GraphObj >::g
private

Flow graph reference.

Definition at line 671 of file Dominance.hpp.

◆ param

template<typename GraphObj>
const ParameterConstRef dominance< GraphObj >::param
private

The set of input parameters.

Definition at line 682 of file Dominance.hpp.


The documentation for this class was generated from the following file:

Generated on Mon Feb 12 2024 13:03:50 for PandA-2024.02 by doxygen 1.8.13