PandA-2024.02
|
#include <function_behavior.hpp>
Public Types | |
enum | graph_type { CFG, ECFG, FCFG, CDG, FCDG, DFG, FDFG, ADG, FADG, ODG, FODG, FLG, SDG, FSDG, SAODG, FSAODG, FLSAODG, FLSAODDG, FFLSAODG, FLAODDG, FFLAODDG, SG, AGG_VIRTUALG } |
Declaration of enum representing the type of graph. More... | |
enum | bb_graph_type { BB, FBB, EBB, CDG_BB, DOM_TREE, POST_DOM_TREE, PPG, DJ } |
Declaration of enum representing the type of bb_graph. More... | |
Public Member Functions | |
FunctionBehavior (const application_managerConstRef AppM, const BehavioralHelperRef _helper, const ParameterConstRef parameters) | |
Constructor. More... | |
FunctionBehavior (const FunctionBehavior &)=delete | |
~FunctionBehavior () | |
Destructor. More... | |
BehavioralHelperRef | GetBehavioralHelper () |
Returns the helper associated with the function. More... | |
const BehavioralHelperConstRef | CGetBehavioralHelper () const |
Returns the helper associated with the function. More... | |
CustomOrderedSet< unsigned int > | get_local_variables (const application_managerConstRef AppM) const |
Returns the set of local variables. More... | |
const std::deque< vertex > & | get_levels () const |
Return the vector of vertex index sorted in topological order. More... | |
const std::deque< vertex > & | get_bb_levels () const |
Return the vector of bb vertex index sorted in topological order. More... | |
const std::map< vertex, unsigned int > & | get_map_levels () const |
Return the map of vertex index sorted in topological order. More... | |
const std::map< vertex, unsigned int > & | get_bb_map_levels () const |
Return the map of bb vertex index sorted in topological order. More... | |
OpGraphRef | GetOpGraph (FunctionBehavior::graph_type gt) |
This method returns the operation graphs. More... | |
const OpGraphConstRef | CGetOpGraph (FunctionBehavior::graph_type gt) const |
This method returns the operation graphs. More... | |
const OpGraphConstRef | CGetOpGraph (FunctionBehavior::graph_type gt, const OpVertexSet &statements) const |
This method returns the operation graph having as vertices the vertices of subset. More... | |
BBGraphRef | GetBBGraph (FunctionBehavior::bb_graph_type gt=FunctionBehavior::BB) |
This method returns the basic block graphs. More... | |
const BBGraphConstRef | CGetBBGraph (FunctionBehavior::bb_graph_type gt=FunctionBehavior::BB) const |
This method returns the basic block graphs. More... | |
void | print (std::ostream &os) const |
Function that prints the class behavioral_manager. More... | |
void | set_epp (EdgeDescriptor e, unsigned long long value) |
Set epp associated with an edges. More... | |
const LoopsConstRef | CGetLoops () const |
Return the loops. More... | |
const LoopsRef | GetLoops () const |
Return the loops. More... | |
void | add_parm_decl_copied (unsigned int node_id) |
Adds an identifier to the set of memory variables. More... | |
void | add_parm_decl_loaded (unsigned int node_id) |
add an actual parameter that has to be loaded into the formal parameter More... | |
void | add_parm_decl_stored (unsigned int node_id) |
add a formal parameter that has to be initialized from the actual value More... | |
void | add_function_mem (unsigned int node_id) |
Adds a memory variable to the function. More... | |
void | add_dynamic_address (unsigned int node_id) |
Add the node_id to the set of object for which a dynamic address computation could be used. More... | |
void | clean_dynamic_address () |
remove all variables from the dynamic address set More... | |
bool | is_variable_mem (unsigned int node_id) const |
Checks if a variable has been allocated in memory. More... | |
const CustomOrderedSet< unsigned int > & | get_function_mem () const |
Returns the set of memory variables. More... | |
void | clean_function_mem () |
clean the function mem data structure More... | |
const CustomOrderedSet< unsigned int > & | get_dynamic_address () const |
Returns the set of variables for which a dynamic address computation maybe required. More... | |
const CustomOrderedSet< unsigned int > & | get_parm_decl_copied () const |
Returns the set of parameters to be copied. More... | |
void | clean_parm_decl_copied () |
clean_parm_decl_copied clean parm_decl_copied data structure More... | |
const CustomOrderedSet< unsigned int > & | get_parm_decl_loaded () const |
Returns the set of the actual parameters that has to be loaded into the formal parameter. More... | |
void | clean_parm_decl_loaded () |
clean_parm_decl_loaded clean parm_decl_loaded data structure More... | |
const CustomOrderedSet< unsigned int > & | get_parm_decl_stored () const |
Returns the set of the formal parameters that has to be stored into the formal parameter. More... | |
void | clean_parm_decl_stored () |
clean_parm_decl_stored clean parm_decl_stored data structure More... | |
void | set_dereference_unknown_addr (bool f) |
Set the use of dereference of unknown address. More... | |
bool | get_dereference_unknown_addr () const |
Return true if the function has dereference of unknown address. More... | |
void | set_unaligned_accesses (bool f) |
Set if LOADs or STOREs perform unaligned accesses. More... | |
bool | get_unaligned_accesses () const |
Return true if a LOADs or STOREs perform unaligned accesses. More... | |
void | set_has_globals (bool f) |
set if there are or not externally visible global variables More... | |
bool | get_has_globals () const |
helper for global variables property More... | |
void | set_has_undefined_function_receiveing_pointers (bool f) |
set if there are or not undefined functions called and which has pointers passed More... | |
bool | get_has_undefined_function_receiving_pointers () const |
helper for has_undefined_function_receiveing_pointers variables property More... | |
void | add_state_variable (unsigned int node_id) |
Add a state variable: static, global or volatile variable. More... | |
bool | is_a_state_variable (unsigned int node_id) const |
return true if a variable is a state variable or not More... | |
void | clean_state_variable () |
clean_state_variable initialize the state variable data structure More... | |
const CustomOrderedSet< unsigned int > & | get_state_variables () |
get_state_variables More... | |
void | set_packed_vars (bool packed) |
update the the packed variables status More... | |
bool | has_packed_vars () const |
bool | is_pipeline_enabled () const |
bool | is_simple_pipeline () const |
int | get_initiation_time () const |
bool | CheckReachability (const vertex first_operation, const vertex second_operation) const |
Check if a path from first_operation to second_operation exists in control flow graph (without feedback) More... | |
bool | CheckBBReachability (const vertex first_basic_block, const vertex second_basic_block) const |
Check if a path from the first basic block to the second basic block exists in control flow graph (without feedback) More... | |
bool | CheckFeedbackReachability (const vertex first_operation, const vertex second_operation) const |
Check if a path from first_operation to second_operation exists in control flow graph with feedback. More... | |
bool | CheckBBFeedbackReachability (const vertex first_basic_block, const vertex second_basic_block) const |
Check if a path from the first basic block to the second basic block exists in control flow graph with feedback. More... | |
unsigned int | GetBBVersion () const |
Return the version of the basic block intermediate representation. More... | |
unsigned int | UpdateBBVersion () |
Update the version of the basic block intermediate representation. More... | |
unsigned int | GetBitValueVersion () const |
Return the version of the bitvalue information. More... | |
unsigned int | UpdateBitValueVersion () |
Update the version of the bitvalue information. More... | |
unsigned int | GetChannelsNumber () const |
void | SetChannelsNumber (unsigned int val) |
MemoryAllocation_ChannelsType | GetChannelsType () const |
void | SetChannelsType (MemoryAllocation_ChannelsType val) |
MemoryAllocation_Policy | GetMemoryAllocationPolicy () const |
void | SetMemoryAllocationPolicy (MemoryAllocation_Policy val) |
Data Fields | |
CustomUnorderedMapStable< vertex, CustomUnorderedSet< vertex > > | bb_reachability |
Mutual exclusion between basic blocks (based on control flow graph with flow edges) More... | |
CustomUnorderedMapStable< vertex, CustomUnorderedSet< vertex > > | feedback_bb_reachability |
Reachability between basic blocks based on control flow graph with feedback. More... | |
const operations_graph_constructorRef | ogc |
reference to the operations graph constructor More... | |
const BasicBlocksGraphConstructorRef | bbgc |
reference to the basic block graph constructor More... | |
const level_constructorRef | lm |
reference to the level constructor More... | |
const level_constructorRef | bb_lm |
reference to the level constructor More... | |
dominance< BBGraph > * | dominators |
This class stores dominator information. More... | |
dominance< BBGraph > * | post_dominators |
This class stores post-dominator information. More... | |
std::map< unsigned int, memory_accessRef > | memory_info |
map between node id and the corresponding memory allocation More... | |
bool | packed_vars |
True when there access to packed data. More... | |
Private Attributes | |
const BehavioralHelperRef | helper |
Behavioral helper associated with this behavioral_graph_manager. More... | |
const BBGraphsCollectionRef | bb_graphs_collection |
Global graph storing CFG, dominators and post-dominators. The nodes of this graph are basic blocks. More... | |
const OpGraphsCollectionRef | op_graphs_collection |
Global graph storing CFG, DFG, FCFG, FDFG, SDG, FSDG, CDG. The nodes of this graph are operations. More... | |
const BBGraphRef | bb |
The basic block CFG. More... | |
const BBGraphRef | extended_bb |
The basic block Control Flow Graph extended with edges that impose that basic block inside a loop are executed before what follows the loop. More... | |
const BBGraphRef | cdg_bb |
The control dependence graph among basic blocks. More... | |
const BBGraphRef | dj |
The dj graph (used for loop computation) More... | |
const BBGraphRef | dt |
The dominator tree of the CFG on basic blocks. More... | |
const BBGraphRef | fbb |
The basic block CFG with feedback. More... | |
const BBGraphRef | pdt |
The post-dominator tree of the CFG on basic blocks. More... | |
const BBGraphRef | ppg |
The support basic block graph for path profiling. More... | |
const OpGraphRef | cfg |
The control flow graph. More... | |
const OpGraphRef | extended_cfg |
The extended control flow graph. More... | |
const OpGraphRef | fcfg |
The control flow graph with feedback. More... | |
const OpGraphRef | adg |
The anti-dependencies graph. More... | |
const OpGraphRef | fadg |
The anti-dependencies graph with feedback. More... | |
const OpGraphRef | cdg |
The control dependence graph. More... | |
const OpGraphRef | fcdg |
The control dependence graph with feedback. More... | |
const OpGraphRef | dfg |
The data flow graph. More... | |
const OpGraphRef | fdfg |
The data flow graph with feedback. More... | |
const OpGraphRef | flg |
The flow edge operation graph. More... | |
const OpGraphRef | odg |
The output-dependencies flow graph. More... | |
const OpGraphRef | fodg |
The output-dependencies flow graph with feedback. More... | |
const OpGraphRef | flaoddg |
The anti-dependence + data dependence + output dependence + flow graph. More... | |
const OpGraphRef | fflaoddg |
The anti-dependence + data dependence + output dependence + flow graph with freedback. More... | |
const OpGraphRef | flsaodg |
The system dependence, antidependence, output dependence and flow graph. More... | |
const OpGraphRef | flsaoddg |
The system dependence, antidependence, output dependence, flow and debug graph. More... | |
const OpGraphRef | fflsaodg |
The system dependence, antidependence, output dependence and flow graph with feedback;. More... | |
const OpGraphRef | saodg |
The system dependence, antidependence and output dependence graph. More... | |
const OpGraphRef | fsaodg |
The system dependence, antidependence and output dependence graph with feedback. More... | |
const OpGraphRef | sdg |
The system dependence graph. More... | |
const OpGraphRef | fsdg |
The system dependence graph with feedback. More... | |
const OpGraphRef | sg |
The speculation graph. More... | |
const OpGraphRef | agg_virtualg |
Anti + Data flow graph on aggregates. More... | |
std::map< vertex, unsigned int > | map_levels |
Map operation vertex to position in topological order in control flow graph; in the sorting then part vertices come before else part ones. More... | |
std::map< vertex, unsigned int > | bb_map_levels |
Map basic block vertex to position in topological order in control flow graph; in the sorting then part vertices come before else part ones. More... | |
std::deque< vertex > | deque_levels |
list of operations vertices sorted by topological order in control flow graph; in the sorting then part vertices come before else part ones More... | |
std::deque< vertex > | bb_deque_levels |
list of operations vertices sorted by topological order in control flow graph; in the sorting then part vertices come before else part ones More... | |
LoopsRef | loops |
Loops of the function. More... | |
CustomOrderedSet< unsigned int > | mem_nodeID |
this set represents the memory variables accessed by the function More... | |
CustomOrderedSet< unsigned int > | dynamic_address |
store memory objects which can be indirectly addressed through a dynamic address computation More... | |
CustomOrderedSet< unsigned int > | parm_decl_copied |
this set represents the parameters that have to be copied from the caller More... | |
CustomOrderedSet< unsigned int > | parm_decl_loaded |
this set represents the actual parameters that has to be loaded into the formal parameter from the actual parameter More... | |
CustomOrderedSet< unsigned int > | parm_decl_stored |
this set represents the formal parameters that has to be stored into the formal parameter from the actual parameter More... | |
const ParameterConstRef | parameters |
The set of input parameters. More... | |
bool | dereference_unknown_address |
the function dereference a pointer initialized with constant address. More... | |
bool | unaligned_accesses |
unsigned int | bb_version |
The version of basic block intermediate representation. More... | |
unsigned int | bitvalue_version |
Version of the bitvalue information. More... | |
bool | has_globals |
when true at least one global variable is used More... | |
bool | has_undefined_function_receiveing_pointers |
function calls undefined function passing pointers More... | |
CustomOrderedSet< unsigned int > | state_variables |
set of global variables More... | |
bool | pipeline_enabled |
true when pipelining is enabled for the function More... | |
bool | simple_pipeline |
true when the requested pipeline does not include unbounded functions More... | |
int | initiation_time |
used only for stallable pipelines More... | |
unsigned int | _channels_number |
Function scope channels number. More... | |
MemoryAllocation_ChannelsType | _channels_type |
Function scope channels type. More... | |
MemoryAllocation_Policy | _allocation_policy |
Friends | |
std::ostream & | operator<< (std::ostream &os, const FunctionBehavior &s) |
Friend definition of the << operator. More... | |
std::ostream & | operator<< (std::ostream &os, const FunctionBehaviorRef &s) |
Friend definition of the << operator. More... | |
some friend classes | |
class | BasicBlocksProfiling |
class | BBCdgComputation |
class | OpCdgComputation |
class | hpp_profiling |
class | loops_computation |
class | instr_sequences_detection |
struct | loop_regions_computation |
class | LoopsProfiling |
class | probability_path |
class | HostProfiling |
class | read_profiling_data |
class | tp_profiling |
class | BBOrderComputation |
class | OpOrderComputation |
class | BasicBlocksCfgComputation |
Definition at line 177 of file function_behavior.hpp.
Declaration of enum representing the type of bb_graph.
Definition at line 438 of file function_behavior.hpp.
Declaration of enum representing the type of graph.
Definition at line 406 of file function_behavior.hpp.
FunctionBehavior::FunctionBehavior | ( | const application_managerConstRef | AppM, |
const BehavioralHelperRef | _helper, | ||
const ParameterConstRef | parameters | ||
) |
Constructor.
AppM | is the application manager |
_helper | is the helper associated with the function |
parameters | is the set of input parameters |
Definition at line 92 of file function_behavior.cpp.
References tree_helper::GetMangledFunctionName(), INDENT_OUT_MEX, initiation_time, OUTPUT_LEVEL_MINIMUM, pipeline_enabled, simple_pipeline, SplitString(), STR, and THROW_ASSERT.
|
delete |
FunctionBehavior::~FunctionBehavior | ( | ) |
Destructor.
Definition at line 242 of file function_behavior.cpp.
References dominators, and post_dominators.
void FunctionBehavior::add_dynamic_address | ( | unsigned int | node_id | ) |
Add the node_id to the set of object for which a dynamic address computation could be used.
node_id | is the object stored in memory |
the object may be written once you have the address
Definition at line 575 of file function_behavior.cpp.
References dynamic_address.
void FunctionBehavior::add_function_mem | ( | unsigned int | node_id | ) |
Adds a memory variable to the function.
Definition at line 570 of file function_behavior.cpp.
References mem_nodeID.
void FunctionBehavior::add_parm_decl_copied | ( | unsigned int | node_id | ) |
Adds an identifier to the set of memory variables.
Definition at line 592 of file function_behavior.cpp.
References dynamic_address, and parm_decl_copied.
void FunctionBehavior::add_parm_decl_loaded | ( | unsigned int | node_id | ) |
add an actual parameter that has to be loaded into the formal parameter
Definition at line 598 of file function_behavior.cpp.
References dynamic_address, and parm_decl_loaded.
void FunctionBehavior::add_parm_decl_stored | ( | unsigned int | node_id | ) |
add a formal parameter that has to be initialized from the actual value
Definition at line 604 of file function_behavior.cpp.
References dynamic_address, and parm_decl_stored.
|
inline |
Add a state variable: static, global or volatile variable.
Definition at line 755 of file function_behavior.hpp.
const BBGraphConstRef FunctionBehavior::CGetBBGraph | ( | FunctionBehavior::bb_graph_type | gt = FunctionBehavior::BB | ) | const |
This method returns the basic block graphs.
gt | is the type of the bb_graph to be returned |
Definition at line 495 of file function_behavior.cpp.
References bb, BB, cdg_bb, CDG_BB, dj, DJ, DOM_TREE, dt, EBB, extended_bb, fbb, FBB, pdt, POST_DOM_TREE, ppg, PPG, and THROW_UNREACHABLE.
Referenced by pragma_manager::CheckAddOmpFor(), CWriter::compute_phi_nodes(), SDCScheduling::Initialize(), FSM_NI_SSA_liveness::InternalExec(), SDCScheduling::InternalExec(), parametric_list_based::InternalExec(), EdgeCWriter::writeRoutineInstructions(), CWriter::writeRoutineInstructions(), and EdgeCWriter::writeRoutineInstructions_rec().
const BehavioralHelperConstRef FunctionBehavior::CGetBehavioralHelper | ( | ) | const |
Returns the helper associated with the function.
Definition at line 375 of file function_behavior.cpp.
References helper.
Referenced by ControllerCreatorBaseStep::add_command_ports(), classic_datapath::add_ports(), Schedule::CanBeMoved(), CWriter::compute_phi_nodes(), top_entity_parallel_cs::connect_loop_iter(), datapath_parallel_cs::connect_module_kernel(), ModuleGeneratorManager::create_generic_module(), VcdSignalSelection::CrossPropagateAddrSsa(), mux_connection_binding::determine_connection(), Evaluation::Exec(), ModuleGeneratorManager::getDataType(), SDCScheduling::Initialize(), pipeline_controller::InternalExec(), FSM_NI_SSA_liveness::InternalExec(), fsm_controller::InternalExec(), TasteInterfaceGeneration::InternalExec(), top_entity_parallel_cs::InternalExec(), ControlFlowChecker::InternalExec(), port_swapping::InternalExec(), SDCScheduling::InternalExec(), parametric_list_based::InternalExec(), cdfc_module_binding::InternalExec(), VcdSignalSelection::PropagateAddrParamToSsa(), VcdSignalSelection::SelectAddrSsa(), VcdSignalSelection::SelectInitialSsa(), ModuleGeneratorManager::specialize_fu(), InstructionWriter::write(), CWriter::WriteFunctionBody(), DiscrepancyAnalysisCWriter::writePostInstructionInfo(), EdgeCWriter::writeRoutineInstructions(), CWriter::writeRoutineInstructions(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().
const LoopsConstRef FunctionBehavior::CGetLoops | ( | ) | const |
Return the loops.
Definition at line 553 of file function_behavior.cpp.
References loops.
Referenced by top_entity_parallel_cs::BW_loop_iter(), top_entity_parallel_cs::connect_loop_iter(), SDCScheduling::InternalExec(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().
const OpGraphConstRef FunctionBehavior::CGetOpGraph | ( | FunctionBehavior::graph_type | gt | ) | const |
This method returns the operation graphs.
gt | is the type of the graph to be returned |
Definition at line 312 of file function_behavior.cpp.
References adg, ADG, agg_virtualg, AGG_VIRTUALG, cdg, CDG, cfg, CFG, dfg, DFG, ECFG, extended_cfg, fadg, FADG, fcdg, FCDG, fcfg, FCFG, fdfg, FDFG, fflaoddg, FFLAODDG, fflsaodg, FFLSAODG, flaoddg, FLAODDG, flg, FLG, flsaoddg, FLSAODDG, flsaodg, FLSAODG, fodg, FODG, fsaodg, FSAODG, fsdg, FSDG, odg, ODG, saodg, SAODG, sdg, SDG, sg, SG, and THROW_UNREACHABLE.
Referenced by conn_binding::add_command_ports(), CWriter::compute_phi_nodes(), VcdSignalSelection::CrossPropagateAddrSsa(), CWriter::DeclareLocalVariables(), VcdSignalSelection::DetectInvalidReturns(), estimate_muxes(), HLS_manager::get_required_values(), application_manager::GetProducedValue(), StorageValueInformation::Initialize(), SDCScheduling::Initialize(), Scheduling::Initialize(), Schedule::Initialize(), parametric_list_based::Initialize(), cdfc_module_binding::initialize_connection_relation(), OmpAllocation::IntegrateTechnologyLibraries(), pipeline_controller::InternalExec(), unique_binding::InternalExec(), FSM_NI_SSA_liveness::InternalExec(), sched_based_chaining_computation::InternalExec(), port_swapping::InternalExec(), SDCScheduling::InternalExec(), parametric_list_based::InternalExec(), cdfc_module_binding::InternalExec(), VcdSignalSelection::PropagateAddrParamToSsa(), VcdSignalSelection::SelectInitialSsa(), InstructionWriter::write(), CWriter::WriteFunctionBody(), DiscrepancyAnalysisCWriter::writePostInstructionInfo(), DiscrepancyAnalysisCWriter::writePreInstructionInfo(), EdgeCWriter::writeRoutineInstructions(), CWriter::writeRoutineInstructions(), and EdgeCWriter::writeRoutineInstructions_rec().
const OpGraphConstRef FunctionBehavior::CGetOpGraph | ( | FunctionBehavior::graph_type | gt, |
const OpVertexSet & | statements | ||
) | const |
This method returns the operation graph having as vertices the vertices of subset.
optimization in case the subset is equal to the whole set of vertices is possible
gt | is the type of the graph to be returned |
subset | is the set of subgraph vertices |
This "transformation" is necessary because of graph constructor
Definition at line 381 of file function_behavior.cpp.
References ADG, ADG_AGG_SELECTOR, ADG_SELECTOR, AGG_VIRTUALG, CDG, CDG_SELECTOR, CFG, CFG_SELECTOR, DEBUG_SELECTOR, DFG, DFG_AGG_SELECTOR, DFG_SELECTOR, ECFG, ECFG_SELECTOR, FADG, FADG_SELECTOR, FB_ADG_SELECTOR, FCDG, FCDG_SELECTOR, FCFG, FCFG_SELECTOR, FDFG, FDFG_SELECTOR, FFLAODDG, FFLSAODG, FLAODDG, FLG, FLG_SELECTOR, FLSAODDG, FLSAODG, FODG, FODG_SELECTOR, FSAODG, FSDG, FSDG_SELECTOR, ODG, ODG_SELECTOR, op_graphs_collection, SAODG, SAODG_SELECTOR, SDG, SDG_SELECTOR, SG, SG_SELECTOR, and THROW_UNREACHABLE.
bool FunctionBehavior::CheckBBFeedbackReachability | ( | const vertex | first_basic_block, |
const vertex | second_basic_block | ||
) | const |
Check if a path from the first basic block to the second basic block exists in control flow graph with feedback.
first_basic_block | is the first basic block to be considered |
second_basic_block | is the second operation to be considered |
Definition at line 699 of file function_behavior.cpp.
References CheckBBReachability(), and feedback_bb_reachability.
Referenced by CheckFeedbackReachability().
bool FunctionBehavior::CheckBBReachability | ( | const vertex | first_basic_block, |
const vertex | second_basic_block | ||
) | const |
Check if a path from the first basic block to the second basic block exists in control flow graph (without feedback)
first_basic_block | is the first basic block to be considered |
second_basic_block | is the second operation to be considered |
Definition at line 685 of file function_behavior.cpp.
References bb_reachability.
Referenced by CheckBBFeedbackReachability(), and CheckReachability().
bool FunctionBehavior::CheckFeedbackReachability | ( | const vertex | first_operation, |
const vertex | second_operation | ||
) | const |
Check if a path from first_operation to second_operation exists in control flow graph with feedback.
first_operation | is the first operation to be considered |
second_operation | is the second operation to be considered |
Definition at line 744 of file function_behavior.cpp.
References bb, cfg, and CheckBBFeedbackReachability().
bool FunctionBehavior::CheckReachability | ( | const vertex | first_operation, |
const vertex | second_operation | ||
) | const |
Check if a path from first_operation to second_operation exists in control flow graph (without feedback)
first_operation | is the first operation to be considered |
second_operation | is the second operation to be considered |
Definition at line 718 of file function_behavior.cpp.
References bb, cfg, CheckBBReachability(), GET_NAME, map_levels, and THROW_ASSERT.
Referenced by SDCScheduling::InternalExec().
void FunctionBehavior::clean_dynamic_address | ( | ) |
remove all variables from the dynamic address set
Definition at line 582 of file function_behavior.cpp.
References dynamic_address.
void FunctionBehavior::clean_function_mem | ( | ) |
clean the function mem data structure
Definition at line 615 of file function_behavior.cpp.
References mem_nodeID.
void FunctionBehavior::clean_parm_decl_copied | ( | ) |
clean_parm_decl_copied clean parm_decl_copied data structure
Definition at line 630 of file function_behavior.cpp.
References parm_decl_copied.
void FunctionBehavior::clean_parm_decl_loaded | ( | ) |
clean_parm_decl_loaded clean parm_decl_loaded data structure
Definition at line 640 of file function_behavior.cpp.
References parm_decl_loaded.
void FunctionBehavior::clean_parm_decl_stored | ( | ) |
clean_parm_decl_stored clean parm_decl_stored data structure
Definition at line 650 of file function_behavior.cpp.
References parm_decl_stored.
|
inline |
clean_state_variable initialize the state variable data structure
Definition at line 772 of file function_behavior.hpp.
const std::deque< vertex > & FunctionBehavior::get_bb_levels | ( | ) | const |
Return the vector of bb vertex index sorted in topological order.
Definition at line 533 of file function_behavior.cpp.
References bb_deque_levels.
Return the map of bb vertex index sorted in topological order.
Definition at line 543 of file function_behavior.cpp.
References bb_map_levels.
Referenced by SDCScheduling::InternalExec().
|
inline |
Return true if the function has dereference of unknown address.
Definition at line 695 of file function_behavior.hpp.
const CustomOrderedSet< unsigned int > & FunctionBehavior::get_dynamic_address | ( | ) | const |
Returns the set of variables for which a dynamic address computation maybe required.
Definition at line 620 of file function_behavior.cpp.
References dynamic_address.
const CustomOrderedSet< unsigned int > & FunctionBehavior::get_function_mem | ( | ) | const |
Returns the set of memory variables.
Definition at line 610 of file function_behavior.cpp.
References mem_nodeID.
Referenced by LoadOpNode::opCtorGenerator().
|
inline |
helper for global variables property
Definition at line 729 of file function_behavior.hpp.
|
inline |
helper for has_undefined_function_receiveing_pointers variables property
Definition at line 747 of file function_behavior.hpp.
|
inline |
Definition at line 817 of file function_behavior.hpp.
References FunctionFrontendFlowStep::GetBitValueVersion(), and THROW_ASSERT.
const std::deque< vertex > & FunctionBehavior::get_levels | ( | ) | const |
Return the vector of vertex index sorted in topological order.
Definition at line 528 of file function_behavior.cpp.
References deque_levels.
CustomOrderedSet< unsigned int > FunctionBehavior::get_local_variables | ( | const application_managerConstRef | AppM | ) | const |
Returns the set of local variables.
Definition at line 655 of file function_behavior.cpp.
Return the map of vertex index sorted in topological order.
Definition at line 538 of file function_behavior.cpp.
References map_levels.
const CustomOrderedSet< unsigned int > & FunctionBehavior::get_parm_decl_copied | ( | ) | const |
Returns the set of parameters to be copied.
Definition at line 625 of file function_behavior.cpp.
References parm_decl_copied.
const CustomOrderedSet< unsigned int > & FunctionBehavior::get_parm_decl_loaded | ( | ) | const |
Returns the set of the actual parameters that has to be loaded into the formal parameter.
Definition at line 635 of file function_behavior.cpp.
References parm_decl_loaded.
const CustomOrderedSet< unsigned int > & FunctionBehavior::get_parm_decl_stored | ( | ) | const |
Returns the set of the formal parameters that has to be stored into the formal parameter.
Definition at line 645 of file function_behavior.cpp.
References parm_decl_stored.
|
inline |
get_state_variables
Definition at line 781 of file function_behavior.hpp.
|
inline |
Return true if a LOADs or STOREs perform unaligned accesses.
Definition at line 711 of file function_behavior.hpp.
BBGraphRef FunctionBehavior::GetBBGraph | ( | FunctionBehavior::bb_graph_type | gt = FunctionBehavior::BB | ) |
This method returns the basic block graphs.
gt | is the type of the bb_graph to be returned |
Definition at line 469 of file function_behavior.cpp.
References bb, BB, cdg_bb, CDG_BB, dj, DJ, DOM_TREE, dt, EBB, extended_bb, fbb, FBB, pdt, POST_DOM_TREE, ppg, PPG, and THROW_UNREACHABLE.
unsigned int FunctionBehavior::GetBBVersion | ( | ) | const |
Return the version of the basic block intermediate representation.
Definition at line 754 of file function_behavior.cpp.
References bb_version.
Referenced by HLSFunctionStep::Exec(), and HLSFunctionStep::HasToBeExecuted().
BehavioralHelperRef FunctionBehavior::GetBehavioralHelper | ( | ) |
Returns the helper associated with the function.
Definition at line 370 of file function_behavior.cpp.
References helper.
unsigned int FunctionBehavior::GetBitValueVersion | ( | ) | const |
Return the version of the bitvalue information.
Definition at line 765 of file function_behavior.cpp.
References bitvalue_version.
Referenced by HLSFunctionStep::Exec(), and HLSFunctionStep::HasToBeExecuted().
unsigned int FunctionBehavior::GetChannelsNumber | ( | ) | const |
Definition at line 776 of file function_behavior.cpp.
References _channels_number.
Referenced by ModuleGeneratorManager::create_generic_module(), and ModuleGeneratorManager::specialize_fu().
MemoryAllocation_ChannelsType FunctionBehavior::GetChannelsType | ( | ) | const |
Definition at line 786 of file function_behavior.cpp.
References _channels_type.
const LoopsRef FunctionBehavior::GetLoops | ( | ) | const |
MemoryAllocation_Policy FunctionBehavior::GetMemoryAllocationPolicy | ( | ) | const |
Definition at line 796 of file function_behavior.cpp.
References _allocation_policy.
OpGraphRef FunctionBehavior::GetOpGraph | ( | FunctionBehavior::graph_type | gt | ) |
This method returns the operation graphs.
gt | is the type of the graph to be returned |
Definition at line 254 of file function_behavior.cpp.
References adg, ADG, agg_virtualg, AGG_VIRTUALG, cdg, CDG, cfg, CFG, dfg, DFG, ECFG, extended_cfg, fadg, FADG, fcdg, FCDG, fcfg, FCFG, fdfg, FDFG, fflaoddg, FFLAODDG, fflsaodg, FFLSAODG, flaoddg, FLAODDG, flg, FLG, flsaoddg, FLSAODDG, flsaodg, FLSAODG, fodg, FODG, fsaodg, FSAODG, fsdg, FSDG, odg, ODG, saodg, SAODG, sdg, SDG, sg, SG, and THROW_UNREACHABLE.
|
inline |
Definition at line 798 of file function_behavior.hpp.
|
inline |
return true if a variable is a state variable or not
node_id | is the node id of the variable |
Definition at line 764 of file function_behavior.hpp.
|
inline |
Definition at line 803 of file function_behavior.hpp.
|
inline |
Definition at line 808 of file function_behavior.hpp.
References THROW_ASSERT.
bool FunctionBehavior::is_variable_mem | ( | unsigned int | node_id | ) | const |
Checks if a variable has been allocated in memory.
Definition at line 587 of file function_behavior.cpp.
References mem_nodeID.
Referenced by mux_connection_binding::determine_connection().
void FunctionBehavior::print | ( | std::ostream & | os | ) | const |
Function that prints the class behavioral_manager.
Definition at line 521 of file function_behavior.cpp.
References helper.
|
inline |
Set the use of dereference of unknown address.
Definition at line 687 of file function_behavior.hpp.
void FunctionBehavior::set_epp | ( | EdgeDescriptor | e, |
unsigned long long | value | ||
) |
Set epp associated with an edges.
e | is the edges |
value | is the value |
Definition at line 548 of file function_behavior.cpp.
References ppg.
|
inline |
set if there are or not externally visible global variables
f | boolean value specifying if there exist at least one externally visible global variable |
Definition at line 720 of file function_behavior.hpp.
|
inline |
set if there are or not undefined functions called and which has pointers passed
f | boolean value specifying if there are such functions |
Definition at line 738 of file function_behavior.hpp.
|
inline |
update the the packed variables status
packed | is true when there is at least one packed variables |
Definition at line 790 of file function_behavior.hpp.
|
inline |
Set if LOADs or STOREs perform unaligned accesses.
Definition at line 703 of file function_behavior.hpp.
void FunctionBehavior::SetChannelsNumber | ( | unsigned int | val | ) |
Definition at line 781 of file function_behavior.cpp.
References _channels_number.
void FunctionBehavior::SetChannelsType | ( | MemoryAllocation_ChannelsType | val | ) |
Definition at line 791 of file function_behavior.cpp.
References _channels_type.
void FunctionBehavior::SetMemoryAllocationPolicy | ( | MemoryAllocation_Policy | val | ) |
Definition at line 801 of file function_behavior.cpp.
References _allocation_policy.
unsigned int FunctionBehavior::UpdateBBVersion | ( | ) |
Update the version of the basic block intermediate representation.
Definition at line 759 of file function_behavior.cpp.
References bb_version.
unsigned int FunctionBehavior::UpdateBitValueVersion | ( | ) |
Update the version of the bitvalue information.
Definition at line 770 of file function_behavior.cpp.
References bitvalue_version.
|
friend |
Definition at line 198 of file function_behavior.hpp.
|
friend |
Definition at line 184 of file function_behavior.hpp.
|
friend |
Definition at line 185 of file function_behavior.hpp.
|
friend |
Definition at line 196 of file function_behavior.hpp.
|
friend |
Definition at line 193 of file function_behavior.hpp.
|
friend |
Definition at line 187 of file function_behavior.hpp.
|
friend |
Definition at line 189 of file function_behavior.hpp.
|
friend |
Definition at line 190 of file function_behavior.hpp.
|
friend |
Definition at line 188 of file function_behavior.hpp.
|
friend |
Definition at line 191 of file function_behavior.hpp.
|
friend |
Definition at line 186 of file function_behavior.hpp.
|
friend |
Friend definition of the << operator.
os | is the output stream |
Definition at line 568 of file function_behavior.hpp.
|
friend |
Friend definition of the << operator.
Pointer version.
os | is the output stream |
Definition at line 578 of file function_behavior.hpp.
|
friend |
Definition at line 197 of file function_behavior.hpp.
|
friend |
Definition at line 192 of file function_behavior.hpp.
|
friend |
Definition at line 194 of file function_behavior.hpp.
|
friend |
Definition at line 195 of file function_behavior.hpp.
|
private |
Definition at line 385 of file function_behavior.hpp.
Referenced by GetMemoryAllocationPolicy(), and SetMemoryAllocationPolicy().
|
private |
Function scope channels number.
Definition at line 380 of file function_behavior.hpp.
Referenced by GetChannelsNumber(), and SetChannelsNumber().
|
private |
Function scope channels type.
Definition at line 383 of file function_behavior.hpp.
Referenced by GetChannelsType(), and SetChannelsType().
|
private |
The anti-dependencies graph.
Definition at line 245 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
Anti + Data flow graph on aggregates.
Definition at line 304 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The basic block CFG.
Definition at line 211 of file function_behavior.hpp.
Referenced by CGetBBGraph(), CheckFeedbackReachability(), CheckReachability(), and GetBBGraph().
|
private |
list of operations vertices sorted by topological order in control flow graph; in the sorting then part vertices come before else part ones
Definition at line 325 of file function_behavior.hpp.
Referenced by get_bb_levels().
|
private |
Global graph storing CFG, dominators and post-dominators. The nodes of this graph are basic blocks.
Definition at line 205 of file function_behavior.hpp.
const level_constructorRef FunctionBehavior::bb_lm |
reference to the level constructor
Definition at line 467 of file function_behavior.hpp.
Map basic block vertex to position in topological order in control flow graph; in the sorting then part vertices come before else part ones.
Definition at line 317 of file function_behavior.hpp.
Referenced by get_bb_map_levels().
CustomUnorderedMapStable<vertex, CustomUnorderedSet<vertex> > FunctionBehavior::bb_reachability |
Mutual exclusion between basic blocks (based on control flow graph with flow edges)
Definition at line 452 of file function_behavior.hpp.
Referenced by CheckBBReachability().
|
private |
The version of basic block intermediate representation.
Definition at line 356 of file function_behavior.hpp.
Referenced by GetBBVersion(), and UpdateBBVersion().
const BasicBlocksGraphConstructorRef FunctionBehavior::bbgc |
reference to the basic block graph constructor
Definition at line 461 of file function_behavior.hpp.
|
private |
Version of the bitvalue information.
Definition at line 359 of file function_behavior.hpp.
Referenced by GetBitValueVersion(), and UpdateBitValueVersion().
|
private |
The control dependence graph.
Definition at line 251 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The control dependence graph among basic blocks.
Definition at line 218 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
|
private |
The control flow graph.
Definition at line 236 of file function_behavior.hpp.
Referenced by CGetOpGraph(), CheckFeedbackReachability(), CheckReachability(), get_local_variables(), and GetOpGraph().
|
private |
list of operations vertices sorted by topological order in control flow graph; in the sorting then part vertices come before else part ones
Definition at line 321 of file function_behavior.hpp.
Referenced by get_levels().
|
private |
the function dereference a pointer initialized with constant address.
Definition at line 351 of file function_behavior.hpp.
|
private |
The data flow graph.
Definition at line 257 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The dj graph (used for loop computation)
Definition at line 221 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
This class stores dominator information.
Definition at line 470 of file function_behavior.hpp.
Referenced by EdgeCWriter::writeRoutineInstructions(), CWriter::writeRoutineInstructions(), and ~FunctionBehavior().
|
private |
The dominator tree of the CFG on basic blocks.
Definition at line 224 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
|
private |
store memory objects which can be indirectly addressed through a dynamic address computation
Definition at line 334 of file function_behavior.hpp.
Referenced by add_dynamic_address(), add_parm_decl_copied(), add_parm_decl_loaded(), add_parm_decl_stored(), clean_dynamic_address(), and get_dynamic_address().
|
private |
The basic block Control Flow Graph extended with edges that impose that basic block inside a loop are executed before what follows the loop.
Definition at line 215 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
|
private |
The extended control flow graph.
Definition at line 239 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The anti-dependencies graph with feedback.
Definition at line 248 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The basic block CFG with feedback.
Definition at line 227 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
|
private |
The control dependence graph with feedback.
Definition at line 254 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The control flow graph with feedback.
Definition at line 242 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The data flow graph with feedback.
Definition at line 260 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
CustomUnorderedMapStable<vertex, CustomUnorderedSet<vertex> > FunctionBehavior::feedback_bb_reachability |
Reachability between basic blocks based on control flow graph with feedback.
Definition at line 455 of file function_behavior.hpp.
Referenced by CheckBBFeedbackReachability().
|
private |
The anti-dependence + data dependence + output dependence + flow graph with freedback.
Definition at line 275 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence, antidependence, output dependence and flow graph with feedback;.
Definition at line 286 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The anti-dependence + data dependence + output dependence + flow graph.
Definition at line 272 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The flow edge operation graph.
Definition at line 263 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence, antidependence, output dependence, flow and debug graph.
Definition at line 282 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence, antidependence, output dependence and flow graph.
Definition at line 278 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The output-dependencies flow graph with feedback.
Definition at line 269 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence, antidependence and output dependence graph with feedback.
Definition at line 292 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence graph with feedback.
Definition at line 298 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
when true at least one global variable is used
Definition at line 362 of file function_behavior.hpp.
|
private |
function calls undefined function passing pointers
Definition at line 365 of file function_behavior.hpp.
|
private |
Behavioral helper associated with this behavioral_graph_manager.
Definition at line 202 of file function_behavior.hpp.
Referenced by CGetBehavioralHelper(), get_local_variables(), GetBehavioralHelper(), and print().
|
private |
used only for stallable pipelines
Definition at line 377 of file function_behavior.hpp.
Referenced by FunctionBehavior().
const level_constructorRef FunctionBehavior::lm |
reference to the level constructor
Definition at line 464 of file function_behavior.hpp.
|
private |
Loops of the function.
Definition at line 328 of file function_behavior.hpp.
Referenced by CGetLoops(), and GetLoops().
Map operation vertex to position in topological order in control flow graph; in the sorting then part vertices come before else part ones.
Definition at line 313 of file function_behavior.hpp.
Referenced by CheckReachability(), and get_map_levels().
|
private |
this set represents the memory variables accessed by the function
Definition at line 331 of file function_behavior.hpp.
Referenced by add_function_mem(), clean_function_mem(), get_function_mem(), and is_variable_mem().
std::map<unsigned int, memory_accessRef> FunctionBehavior::memory_info |
map between node id and the corresponding memory allocation
Definition at line 476 of file function_behavior.hpp.
|
private |
The output-dependencies flow graph.
Definition at line 266 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
const operations_graph_constructorRef FunctionBehavior::ogc |
reference to the operations graph constructor
Definition at line 458 of file function_behavior.hpp.
Referenced by SDCScheduling::InternalExec().
|
private |
Global graph storing CFG, DFG, FCFG, FDFG, SDG, FSDG, CDG. The nodes of this graph are operations.
Definition at line 208 of file function_behavior.hpp.
Referenced by CGetOpGraph().
bool FunctionBehavior::packed_vars |
True when there access to packed data.
Definition at line 479 of file function_behavior.hpp.
|
private |
The set of input parameters.
Definition at line 348 of file function_behavior.hpp.
|
private |
this set represents the parameters that have to be copied from the caller
Definition at line 337 of file function_behavior.hpp.
Referenced by add_parm_decl_copied(), clean_parm_decl_copied(), and get_parm_decl_copied().
|
private |
this set represents the actual parameters that has to be loaded into the formal parameter from the actual parameter
Definition at line 341 of file function_behavior.hpp.
Referenced by add_parm_decl_loaded(), clean_parm_decl_loaded(), and get_parm_decl_loaded().
|
private |
this set represents the formal parameters that has to be stored into the formal parameter from the actual parameter
Definition at line 345 of file function_behavior.hpp.
Referenced by add_parm_decl_stored(), clean_parm_decl_stored(), and get_parm_decl_stored().
|
private |
The post-dominator tree of the CFG on basic blocks.
Definition at line 230 of file function_behavior.hpp.
Referenced by CGetBBGraph(), and GetBBGraph().
|
private |
true when pipelining is enabled for the function
Definition at line 371 of file function_behavior.hpp.
Referenced by FunctionBehavior().
This class stores post-dominator information.
Definition at line 473 of file function_behavior.hpp.
Referenced by EdgeCWriter::writeRoutineInstructions(), CWriter::writeRoutineInstructions(), and ~FunctionBehavior().
|
private |
The support basic block graph for path profiling.
Definition at line 233 of file function_behavior.hpp.
Referenced by CGetBBGraph(), GetBBGraph(), and set_epp().
|
private |
The system dependence, antidependence and output dependence graph.
Definition at line 289 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The system dependence graph.
Definition at line 295 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
The speculation graph.
Definition at line 301 of file function_behavior.hpp.
Referenced by CGetOpGraph(), and GetOpGraph().
|
private |
true when the requested pipeline does not include unbounded functions
Definition at line 374 of file function_behavior.hpp.
Referenced by FunctionBehavior().
|
private |
set of global variables
Definition at line 368 of file function_behavior.hpp.
|
private |
Definition at line 353 of file function_behavior.hpp.