PandA-2024.02
|
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>
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) | |
Data structures used to represent an edge in operation and basic block graphs.
Definition in file cdfg_edge_info.hpp.
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 161 of file cdfg_edge_info.hpp.
#define CDG_SELECTOR (1 << 3) |
Control dependence edge selector.
Definition at line 70 of file cdfg_edge_info.hpp.
Referenced by BasicBlocksGraphConstructor::add_bb_edge_info(), SDCScheduling::AddDelayConstraints(), Vectorize::AddGuards(), BBEdgeInfo::cdg_edge_F(), BBEdgeInfo::cdg_edge_T(), CdfgEdgeInfo::CdgEdgeF(), CdfgEdgeInfo::CdgEdgeT(), FunctionBehavior::CGetOpGraph(), Vectorize::ClassifyLoop(), BBCdgComputation::Initialize(), OpCdgComputation::Initialize(), OpCdgComputation::InternalExec(), BBCdgComputation::InternalExec(), SDCScheduling::InternalExec(), OpEdgeWriter::operator()(), BBEdgeWriter::operator()(), CdfgEdgeInfo::Switch(), and BBEdgeInfo::switch_p().
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 153 of file cdfg_edge_info.hpp.
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 177 of file cdfg_edge_info.hpp.
#define CFG_SELECTOR (1 << 1) |
Control flow graph edge selector.
Definition at line 63 of file cdfg_edge_info.hpp.
Referenced by BasicBlocksGraphConstructor::add_bb_edge_info(), BBEdgeInfo::cfg_edge_F(), BBEdgeInfo::cfg_edge_T(), CdfgEdgeInfo::CfgEdgeF(), CdfgEdgeInfo::CfgEdgeT(), FunctionBehavior::CGetOpGraph(), operations_cfg_computation::connect_start_nodes(), BasicBlocksGraphConstructor::connect_to_entry(), BasicBlocksGraphConstructor::connect_to_exit(), FunctionCallOpt::detect_loops(), Bit_Value::Initialize(), BB_based_stg::InternalExec(), OpCdgComputation::InternalExec(), BBCdgComputation::InternalExec(), BasicBlocksCfgComputation::InternalExec(), BuildVirtualPhi::InternalExec(), bb_feedback_edges_computation::InternalExec(), op_feedback_edges_computation::InternalExec(), eSSA::InternalExec(), simple_code_motion::InternalExec(), CSE::InternalExec(), multi_way_if::InternalExec(), rebuild_initialization2::look_for_ROMs(), OpEdgeWriter::operator()(), BBEdgeWriter::operator()(), CdfgEdgeInfo::Switch(), BBEdgeInfo::switch_p(), FunctionFrontendFlowStep::WriteBBGraphDot(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 169 of file cdfg_edge_info.hpp.
Referenced by OpOrderComputation::InternalExec().
#define default_COND (std::numeric_limits<unsigned int>::max() - 3) |
constant used to represent label "default" of a switch construct
Definition at line 86 of file cdfg_edge_info.hpp.
Referenced by operations_cfg_computation::build_operation_recursive(), fsm_controller::create_state_machine(), input_vector_to_string(), BB_based_stg::InternalExec(), BasicBlocksCfgComputation::InternalExec(), BehavioralHelper::PrintConstant(), CdfgEdgeInfo::PrintLabels(), BehavioralHelper::PrintVariable(), FunctionFrontendFlowStep::WriteBBGraphDot(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().
#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()().
#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.
data | is the graph. |
edge_index | is the index of the cdfg edge. |
type | is the type of wanted nodeID |
Definition at line 202 of file cdfg_edge_info.hpp.
#define F_COND (std::numeric_limits<unsigned int>::max() - 1) |
constant used to represent control edges representing a false edge of a conditional statement.
Definition at line 82 of file cdfg_edge_info.hpp.
Referenced by BBEdgeInfo::cdg_edge_F(), CdfgEdgeInfo::CdgEdgeF(), BBEdgeInfo::cfg_edge_F(), CdfgEdgeInfo::CfgEdgeF(), operations_cfg_computation::connect_start_nodes(), OpEdgeInfo::FlgEdgeF(), mux_connection_binding::input_logic(), BB_based_stg::InternalExec(), BasicBlocksCfgComputation::InternalExec(), and CdfgEdgeInfo::PrintLabels().
#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()().
#define FB_CFG_SELECTOR (1 << 2) |
Feedback control flow edge selector.
Definition at line 65 of file cdfg_edge_info.hpp.
Referenced by BasicBlocksGraphConstructor::add_bb_edge_info(), Vectorize::AddGuards(), BB_based_stg::InternalExec(), BuildVirtualPhi::InternalExec(), AddOpPhiFlowEdges::InternalExec(), op_feedback_edges_computation::InternalExec(), bb_feedback_edges_computation::InternalExec(), AddBbEcfgEdges::InternalExec(), MultipleEntryIfReduction::InternalExec(), OpEdgeWriter::operator()(), BBEdgeWriter::operator()(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().
#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()().
#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()().
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 193 of file cdfg_edge_info.hpp.
#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
data | is the graph. |
edge_index | is the index of the cdfg edge. |
Definition at line 185 of file cdfg_edge_info.hpp.
#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.
#define T_COND (std::numeric_limits<unsigned int>::max()) |
constant used to represent control edges representing a true edge of a conditional statement.
Definition at line 80 of file cdfg_edge_info.hpp.
Referenced by BBEdgeInfo::cdg_edge_T(), CdfgEdgeInfo::CdgEdgeT(), BBEdgeInfo::cfg_edge_T(), CdfgEdgeInfo::CfgEdgeT(), operations_cfg_computation::connect_start_nodes(), OpEdgeInfo::FlgEdgeT(), mux_conn::get_string(), mux_connection_binding::input_logic(), BB_based_stg::InternalExec(), BasicBlocksCfgComputation::InternalExec(), conn_binding::mux_allocation(), and CdfgEdgeInfo::PrintLabels().
#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.
CONSTREF_FORWARD_DECL | ( | BehavioralHelper | ) |