PandA-2024.02
Data Structures | Macros | Functions
cdfg_edge_info.hpp File Reference

Data structures used to represent an edge in operation and basic block graphs. More...

#include "custom_map.hpp"
#include "custom_set.hpp"
#include "edge_info.hpp"
#include "refcount.hpp"
#include <limits>
#include <string>
Include dependency graph for cdfg_edge_info.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CdfgEdgeInfo
 Information associated with an operation or basic block graph. More...
 

Macros

#define TRED_SELECTOR   (1 << 0)
 Constants identifying the type of the edges in both operation and basic block graphs. More...
 
#define CFG_SELECTOR   (1 << 1)
 Control flow graph edge selector. More...
 
#define FB_CFG_SELECTOR   (1 << 2)
 Feedback control flow edge selector. More...
 
#define FCFG_SELECTOR   (CFG_SELECTOR | FB_CFG_SELECTOR)
 Control flow graph with feedback edges. More...
 
#define CDG_SELECTOR   (1 << 3)
 Control dependence edge selector. More...
 
#define FB_CDG_SELECTOR   (1 << 4)
 Feedback control dependence edge selector. More...
 
#define FCDG_SELECTOR   (CDG_SELECTOR | FB_CDG_SELECTOR)
 Control dependence graph selector with feedback edges. More...
 
#define ECFG_SELECTOR   (1 << 5)
 Extended control flow graph selector. More...
 
#define T_COND   (std::numeric_limits<unsigned int>::max())
 constant used to represent control edges representing a true edge of a conditional statement. More...
 
#define F_COND   (std::numeric_limits<unsigned int>::max() - 1)
 constant used to represent control edges representing a false edge of a conditional statement. More...
 
#define NO_COND   (std::numeric_limits<unsigned int>::max() - 2)
 constant used to represent control edges representing a standard control edge. More...
 
#define default_COND   (std::numeric_limits<unsigned int>::max() - 3)
 constant used to represent label "default" of a switch construct More...
 
#define CDG_TRUE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CdgEdgeT()
 check if the edge is a then control dependence edge More...
 
#define CDG_FALSE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CdgEdgeF()
 check if the edge is a else control dependence edge More...
 
#define CFG_TRUE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CfgEdgeT()
 check if the edge is a then control flow edge More...
 
#define CFG_FALSE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CfgEdgeF()
 check if the edge is a else control flow edge More...
 
#define FLG_TRUE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->FlgEdgeT()
 check if the edge is a then flow edge More...
 
#define FLG_FALSE_CHECK(data, edge_index)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->FlgEdgeF()
 check if the edge is a else flow edge More...
 
#define EDGE_GET_NODEID(data, edge_index, type)   Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->get_nodeID(type)
 Helper macro returning the NodeID of a certain type associated with an edge. More...
 

Functions

 CONSTREF_FORWARD_DECL (BehavioralHelper)
 

Detailed Description

Data structures used to represent an edge in operation and basic block graphs.

Author
Marco Lattuada lattu.nosp@m.ada@.nosp@m.elet..nosp@m.poli.nosp@m.mi.it $Revision$ $Date$ Last modified by $Author$

Definition in file cdfg_edge_info.hpp.

Macro Definition Documentation

◆ CDG_FALSE_CHECK

#define CDG_FALSE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CdgEdgeF()

check if the edge is a else control dependence edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 161 of file cdfg_edge_info.hpp.

◆ CDG_SELECTOR

#define CDG_SELECTOR   (1 << 3)

◆ CDG_TRUE_CHECK

#define CDG_TRUE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CdgEdgeT()

check if the edge is a then control dependence edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 153 of file cdfg_edge_info.hpp.

◆ CFG_FALSE_CHECK

#define CFG_FALSE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CfgEdgeF()

check if the edge is a else control flow edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 177 of file cdfg_edge_info.hpp.

◆ CFG_SELECTOR

#define CFG_SELECTOR   (1 << 1)

◆ CFG_TRUE_CHECK

#define CFG_TRUE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->CfgEdgeT()

check if the edge is a then control flow edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 169 of file cdfg_edge_info.hpp.

Referenced by OpOrderComputation::InternalExec().

◆ default_COND

#define default_COND   (std::numeric_limits<unsigned int>::max() - 3)

◆ ECFG_SELECTOR

#define ECFG_SELECTOR   (1 << 5)

Extended control flow graph selector.

Definition at line 77 of file cdfg_edge_info.hpp.

Referenced by FunctionBehavior::CGetOpGraph(), AddBbEcfgEdges::InternalExec(), and BBEdgeWriter::operator()().

◆ EDGE_GET_NODEID

#define EDGE_GET_NODEID (   data,
  edge_index,
  type 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->get_nodeID(type)

Helper macro returning the NodeID of a certain type associated with an edge.

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.
typeis the type of wanted nodeID

Definition at line 202 of file cdfg_edge_info.hpp.

◆ F_COND

#define F_COND   (std::numeric_limits<unsigned int>::max() - 1)

◆ FB_CDG_SELECTOR

#define FB_CDG_SELECTOR   (1 << 4)

Feedback control dependence edge selector.

Definition at line 72 of file cdfg_edge_info.hpp.

Referenced by BasicBlocksGraphConstructor::add_bb_edge_info(), and OpEdgeWriter::operator()().

◆ FB_CFG_SELECTOR

#define FB_CFG_SELECTOR   (1 << 2)

◆ FCDG_SELECTOR

#define FCDG_SELECTOR   (CDG_SELECTOR | FB_CDG_SELECTOR)

Control dependence graph selector with feedback edges.

Definition at line 74 of file cdfg_edge_info.hpp.

Referenced by FunctionBehavior::CGetOpGraph(), OpEdgeWriter::operator()(), and BBEdgeWriter::operator()().

◆ FCFG_SELECTOR

#define FCFG_SELECTOR   (CFG_SELECTOR | FB_CFG_SELECTOR)

Control flow graph with feedback edges.

Definition at line 67 of file cdfg_edge_info.hpp.

Referenced by FunctionBehavior::CGetOpGraph(), OpEdgeWriter::operator()(), and BBEdgeWriter::operator()().

◆ FLG_FALSE_CHECK

#define FLG_FALSE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->FlgEdgeF()

check if the edge is a else flow edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 193 of file cdfg_edge_info.hpp.

◆ FLG_TRUE_CHECK

#define FLG_TRUE_CHECK (   data,
  edge_index 
)    Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data)) and Cget_edge_info<CdfgEdgeInfo>(edge_index, *(data))->FlgEdgeT()

check if the edge is a then flow edge

Parameters
datais the graph.
edge_indexis the index of the cdfg edge.

Definition at line 185 of file cdfg_edge_info.hpp.

◆ NO_COND

#define NO_COND   (std::numeric_limits<unsigned int>::max() - 2)

constant used to represent control edges representing a standard control edge.

Definition at line 84 of file cdfg_edge_info.hpp.

◆ T_COND

#define T_COND   (std::numeric_limits<unsigned int>::max())

◆ TRED_SELECTOR

#define TRED_SELECTOR   (1 << 0)

Constants identifying the type of the edges in both operation and basic block graphs.

Transitive reducted edge selector

Definition at line 60 of file cdfg_edge_info.hpp.

Function Documentation

◆ CONSTREF_FORWARD_DECL()

CONSTREF_FORWARD_DECL ( BehavioralHelper  )

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