All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
risc::sg::SegmentGraph Class Reference

This class represents a segment graph for a process. More...

#include <segment_graph.h>

Collaboration diagram for risc::sg::SegmentGraph:
Collaboration graph

Public Types

typedef std::set
< SgFunctionDefinition * > 
FunctionCallBoundarySet
 
typedef std::set< VariantT > CCxxKeywordsBoundarySet
 
typedef std::set
< VertexDescriptor, SegmentCmp
SegmentSet
 

Public Member Functions

 SegmentGraph ()
 
 SegmentGraph (FunctionCallBoundarySet function_boundaries)
 
 SegmentGraph (CCxxKeywordsBoundarySet keyword_boundaries)
 
 SegmentGraph (FunctionCallBoundarySet function_boundaries, CCxxKeywordsBoundarySet keyword_boundaries)
 
void get_wait_and_notifying_events ()
 set the wait_events_ and notify_events_ for psg nodes under psg mode More...
 
void find_module_segments ()
 for loading PSG It adds simulation threads to module_definitions, and sets the corresponding starting_id_ of the thread. More...
 
void print_psg_file (std::string file_name)
 store the psg as .psg file on disk More...
 
void read_psg_from_file (std::string file_name)
 load the .psg file from disk reconstructs nodes and connections More...
 
void replace_partial_function_call_nodes ()
 for each partial function call node, calls integrate_psg_into_sg to replace the node with corresponding sub psg More...
 
void integrate_psg_into_sg (VertexDescriptor func_call_vertex_id, SgSymbol *func_sym)
 replace a partial function call node with its psg. If the partial function call is a port call, the integrated psg will be cloned, and set pcp More...
 
void remove_dangling_segments ()
 after integration of all the psgs, the segments that does not belong to simulation processes are removed More...
 
void clean_graph ()
 This function deletes all duplicated nodes in each vertex of the graph. More...
 
void print_graph (std::string filename)
 This function prints the graph in a dot file. The name of the file is user defined by argument. More...
 
void print_graph_read_write_access (std::string filename)
 This function prints all variables which have read or written in this segment. More...
 
void add_function (Thread *originating_thread, Function *function, bool duplicate_segments=false, bool is_simulation_process=true, std::string module_name="")
 This function analyzes the given function and creates a segment graph for it. The graph will be automatically inserted in the existing graph. The flag duplicate_segments will be used to generate an instance segement graph. is_simulation_process: if set to true, meaning the function is a simulation process, and it needs a segment id. More...
 
void add_function_method (Thread *originating_thread, Function *function, bool duplicate_segments=false, bool is_simulation_process=true, std::string module_name="")
 This function analyzes the given function and creates a segment graph for it. The graph will be automatically inserted in the existing graph. The flag duplicate_segments will be used to generate an instance segement graph. is_simulation_process: if set to true, meaning the function is a simulation process, and it needs a segment id. More...
 
void read_write_analysis_of_segments ()
 The function determines which variables are read and written in the individual segments. More...
 
void set_all_segments_to_untouched ()
 This function sets the status of the flag helper_for_graph_algorithms for all nodes to 'Untouched'. More...
 
void analyze_TLM2_container_final_mapping ()
 there may be nested b_transports, so, a reference typed gp (gp0) may refer to another reference typed gp (gp1), and gp1 refers to a real gp (gp2). The function would set gp0 referring to gp2 More...
 
bool has_transition (int seg_id_from, int seg_id_to)
 true, if there is a transition from 'from' to 'to' More...
 
VertexDescriptor id_to_vertex_descriptor (int seg_id)
 Returns a vertex descriptor of the segment with the id 'seg_id'. More...
 

Public Attributes

std::vector< std::string > channel_seg_id_array_names_
 we need to instrument set_upcoming_segment_id(var_array) before port calls var_array is defined in the top level channel_seg_id_array_names_ stores the names of all var_array. the names are passed to instrumentor to instrument the arrays in the top file. each name was stored in psg files and loaded back More...
 
std::set< VertexDescriptorport_call_seg_vertexs_
 stores the partial function call nodes that hold port calls. are used in PSG mode. More...
 
std::vector< std::pair
< VertexDescriptor, SgSymbol * > > 
vertexID_symbol_pairs_of_partialFuncCallNodes_
 pairs of VertexDescriptor of partial function call node and the function's symbol. used for replacing partial function call nodes with its subpsg More...
 
std::map< SgSymbol
*, std::vector
< VertexDescriptor > > 
func_symbols_and_entrance_segVertex_
 mapping of function symbol and its entrance segment vertexes, reconstructed after loading More...
 
std::map< SgSymbol
*, std::vector
< VertexDescriptor > > 
func_symbols_and_exit_segVertex_
 mapping of function symbol and its exit segment vertexes reconstructed after loading More...
 
int total_segment_nodes_
 for redaction of psg, we need to store the total number of segment nodes. The value is set in the main function More...
 
Graph graph_
 Internal data structure of the segment graph. More...
 
std::set< VertexDescriptorprecached_function_segments_
 This set stores segments from precached functions. These segments will be deleted later. More...
 
std::set< SgFunctionCallExp * > port_calls_
 This set stores all function calls which belong to a port. These segments will be deleted later. More...
 
bool is_succesfully_created_
 Is true if the segment graph is successfully created. More...
 
std::unordered_map
< SgFunctionDeclaration
*, std::vector< int > > 
func_socket_offset_mapping_
 used for instrumenting seg id offset in b_transport implementation functions. More...
 
std::unordered_map
< SgFunctionCallExp
*, std::vector< int > > 
bt_socket_offset_mapping_
 used for instrumenting seg id offset in b_transport implementation functions. More...
 
std::unordered_set
< SgFunctionCallExp * > 
b_transport_calls_
 
std::unordered_set
< SgVariableSymbol * > 
Tlm2_containers_
 including generic payload and dmi More...
 

Private Member Functions

void handle_recursive_calls ()
 This function integrates the recursive function calls. More...
 
void separate_variable_declaration_and_initializer_on_demand (SgBasicBlock *&bb, bool duplicate_segments, PortCallPath pcp)
 This function checks if a direct or indirect boundary call is in the initializer expression of the variable declaration. If yes, the declaration and initialization will be separated. Example: Input: int x = y + foo(); // foo() has a indirect boundary Output: int x; x = y + foo();. More...
 
void decompose_expression_with_boundary_calls (SgExpression *expr, SgBasicBlock *&bb, bool duplicate_segments, PortCallPath pcp, int stmt_type=0, SgStatement *parent=NULL, SgBasicBlock *body=NULL)
 This function decomposes an expression into multiple statements. Functions which call directly or indirectly a boundary will be separated and have temporally variables. Example: Input: x = y + foo(); // foo() has a indirect boundary Output: int temp_foo = foo(); int x = y + temp_foo();. More...
 
void create_temp_variable_for_expression (SgExpression *expr, SgBasicBlock *&bb, int stmt_type=0, SgStatement *parent=NULL, SgBasicBlock *body=NULL)
 This function creates a variable declaration of the type of the given expression. The variable will be inserted before the associated expression statement of the given expression. More...
 
std::string generate_unique_name (SgNode *node)
 Generates an unique name for a varible based on the given node. More...
 
std::string generate_unique_name (std::string)
 Generates an unique name for a varible based on the given string. More...
 
bool is_boundary_stmt (SgStatement const *const current_stmt)
 This function checks if a given statement is a potential boundary statement. More...
 
SgFunctionCallExp * has_function_call_with_boundary (SgExpression *expr, bool duplicate_segments, PortCallPath pcp)
 This function checks if in the given expression a function call occurs which calls a functon with a boundary statements. More...
 
bool should_decompose_function (SgExpression *expr, bool duplicate_segments, PortCallPath pcp, bool is_condition=false)
 This function determines if a expression should be decomposed. This is the case if expression has the following structure: var = somepointer->func(); var = somevariable.func(); var = func(); and var is a global, member, or static variable. More...
 
SgFunctionDeclaration * contains_function_call_expression (SgExpression *expr)
 In this function we look for expressions which contain a function call in the following style: foo(); this->foo(); var = foo(); var = this->foo(); The return value will be the function declaration of the called function. More...
 
SegmentSet build_graph (SgStatement *current_stmt, SegmentSet current_segments, SegmentSet &break_segments, SegmentSet &continue_segments, bool duplicate_segments, PortCallPath pcp)
 This function creates the segment graph. More...
 
void add_expression_to_segment (SegmentSet segments, SgNode *expr, PortCallPath pcp)
 This function adds to each segment the given expression. More...
 
CachedFunctionAstAttributesbuild_segment_graph_for_function (SgFunctionDefinition *func_def, bool duplicate_segments, PortCallPath pcp, bool is_registered_b_transport=false)
 This function generates a segment graph for a function. More...
 
void insert_loop_edges (VertexDescriptor &loop_vertex, SegmentSet &current_segments, SegmentSet &continue_segments, SegmentSet &leaf_segments_of_loop)
 This is a helper function for loop handling. More...
 
FunctionAnnotationAttributesget_function_call_annotation (SgFunctionCallExp *func_call_exp)
 This function takes a function call expression and checks if there is any function annotation at the declaration. If the function declaration has no annotation, there will be a check if a annotation must be created. More...
 
CachedFunctionAstAttributescreate_cached_function_attribute_for_annotated_function (SgNode *boundary_node, WAIT_CONSTRUCT wait_type, SegmentSet incoming_segments, bool is_conflict_free, PortCallPath pcp)
 This function creates a cached function annotation information for based on the cached function information. More...
 
void add_mapped_symbol_to_reference (SgFunctionCallExp *func_call, SgFunctionDefinition *func_def)
 Let's take a look at this example: void foo(int &ref, int value, in &ref2); foo(var, some_var, other_var); This function adds the symbol of "var" to the attribute "references" of the symbol "ref". The same happens for "ref2" and "other_var". More...
 
void set_socket_attribute_for_dmi_object (SgFunctionCallExp *func_call, SgVariableDefinition *socket)
 we need to know which module instance this dmi object connects to More...
 
void reference_analysis_hack_for_dmi_get_ptr (SgFunctionCallExp *func_call, SgFunctionDefinition *func_def, SgVariableDefinition *socket)
 get_dmi_ptr is a special case. In this case, the 2nd parameter is a reference referring to a dmi object. However, in the analysis, it should be the dmi object refering to the parameter More...
 
void reference_analysis_hack_for_b_transport (SgFunctionCallExp *func_call, SgFunctionDefinition *func_def, SgVariableDefinition *socket)
 we now also keep the pcp More...
 
void reference_analysis_hack_for_nb_transport (SgFunctionCallExp *func_call, SgFunctionDefinition *func_def, SgVariableDefinition *socket)
 we now also keep the pcp More...
 
void forward_reference_function_parameters (SgFunctionCallExp *func_call_exp)
 This function forwards the arguments which are passed by reference to the function parameters of the called function. Recursively, this function traverses through the body of the function definition and follow other function calls. More...
 
void mark_not_conflict_free_func_calls_in_segment (SgNode *stmt, SegmentSet segments)
 This function checks if there is a not-conflict-free function call in the expression. If so, all segments marked as in conflict. More...
 
FunctionAnnotationanalyze_prepended_pragmas_for_annotation (SgFunctionDeclaration *func_decl)
 This function checks if the function has any pragma. The results are in the return value. More...
 
SegmentSet duplicate_segments (SegmentSet segments)
 This function dupilcates a SegmentSet. the dulicated segments will have also incoming edges. More...
 
SegmentSet duplicate_empty_segments (SegmentSet segments)
 This function dupilcates a SegmentSet. The dulicated segments will have also incoming edges. Duplicated segments are not inlined_segment. More...
 
bool follow_function_call (SgFunctionDeclaration *func_decl)
 true, if the function be followed. More...
 
void set_socket_call_CachedFunctionAstAttributes (SgFunctionDeclaration *func_decl, bool duplicate_segments, PortCallPath pcp)
 set the CachedFunctionAstAttributes for registered b_transport functions More...
 

Private Attributes

bool static_analysis_
 determine if the compiler should perform static analysis or dynamic analysis More...
 
FunctionCallBoundarySet function_boundaries_
 Contains all boudaries (currently, wait statemens) More...
 
CCxxKeywordsBoundarySet keyword_boundaries_
 Currently not used. More...
 
std::set< VertexDescriptorrecursive_function_calls_
 Contains the entrance vertexes of recursive function calls. More...
 

Static Private Attributes

static int counter = 0
 This counter is used for generating variables names with unique names. More...
 

Detailed Description

This class represents a segment graph for a process.

Member Typedef Documentation

typedef std::set<SgFunctionDefinition*> risc::sg::SegmentGraph::FunctionCallBoundarySet

Constructor & Destructor Documentation

risc::sg::SegmentGraph::SegmentGraph ( )
risc::sg::SegmentGraph::SegmentGraph ( FunctionCallBoundarySet  function_boundaries)
risc::sg::SegmentGraph::SegmentGraph ( CCxxKeywordsBoundarySet  keyword_boundaries)
risc::sg::SegmentGraph::SegmentGraph ( FunctionCallBoundarySet  function_boundaries,
CCxxKeywordsBoundarySet  keyword_boundaries 
)

Member Function Documentation

risc::sg::SegmentGraph::add_expression_to_segment ( SegmentSet  segments,
SgNode *  expr,
PortCallPath  pcp 
)
private

This function adds to each segment the given expression.

Parameters
segmentsThese segments which will contain the given expression
exprThe expressions which will added to all segments
pcpadd the pcp information
risc::sg::SegmentGraph::add_function ( Thread originating_thread,
Function function,
bool  duplicate_segments = false,
bool  is_simulation_process = true,
std::string  module_name = "" 
)

This function analyzes the given function and creates a segment graph for it. The graph will be automatically inserted in the existing graph. The flag duplicate_segments will be used to generate an instance segement graph. is_simulation_process: if set to true, meaning the function is a simulation process, and it needs a segment id.

risc::sg::SegmentGraph::add_function_method ( Thread originating_thread,
Function function,
bool  duplicate_segments = false,
bool  is_simulation_process = true,
std::string  module_name = "" 
)

This function analyzes the given function and creates a segment graph for it. The graph will be automatically inserted in the existing graph. The flag duplicate_segments will be used to generate an instance segement graph. is_simulation_process: if set to true, meaning the function is a simulation process, and it needs a segment id.

risc::sg::SegmentGraph::add_mapped_symbol_to_reference ( SgFunctionCallExp *  func_call,
SgFunctionDefinition *  func_def 
)
private

Let's take a look at this example: void foo(int &ref, int value, in &ref2); foo(var, some_var, other_var); This function adds the symbol of "var" to the attribute "references" of the symbol "ref". The same happens for "ref2" and "other_var".

risc::sg::SegmentGraph::analyze_prepended_pragmas_for_annotation ( SgFunctionDeclaration *  func_decl)
private

This function checks if the function has any pragma. The results are in the return value.

risc::sg::SegmentGraph::analyze_TLM2_container_final_mapping ( )

there may be nested b_transports, so, a reference typed gp (gp0) may refer to another reference typed gp (gp1), and gp1 refers to a real gp (gp2). The function would set gp0 referring to gp2

risc::sg::SegmentGraph::build_graph ( SgStatement *  current_stmt,
SegmentSet  current_segments,
SegmentSet break_segments,
SegmentSet continue_segments,
bool  duplicate_segments,
PortCallPath  pcp 
)
private

This function creates the segment graph.

Parameters
current_stmtThe first statement of the sequence which will be analyzed
current_segmentsThe beginning segments
break_segmentsThe break segments
continue_segmentsThe continue segments
duplicate_segmentsclone or link
pcpThe pcp information
risc::sg::SegmentGraph::build_segment_graph_for_function ( SgFunctionDefinition *  func_def,
bool  duplicate_segments,
PortCallPath  pcp,
bool  is_registered_b_transport = false 
)
private

This function generates a segment graph for a function.

risc::sg::SegmentGraph::clean_graph ( )

This function deletes all duplicated nodes in each vertex of the graph.

risc::sg::SegmentGraph::contains_function_call_expression ( SgExpression *  expr)
private

In this function we look for expressions which contain a function call in the following style: foo(); this->foo(); var = foo(); var = this->foo(); The return value will be the function declaration of the called function.

risc::sg::SegmentGraph::create_cached_function_attribute_for_annotated_function ( SgNode *  boundary_node,
WAIT_CONSTRUCT  wait_type,
SegmentSet  incoming_segments,
bool  is_conflict_free,
PortCallPath  pcp 
)
private

This function creates a cached function annotation information for based on the cached function information.

risc::sg::SegmentGraph::create_temp_variable_for_expression ( SgExpression *  expr,
SgBasicBlock *&  bb,
int  stmt_type = 0,
SgStatement *  parent = NULL,
SgBasicBlock *  body = NULL 
)
private

This function creates a variable declaration of the type of the given expression. The variable will be inserted before the associated expression statement of the given expression.

risc::sg::SegmentGraph::decompose_expression_with_boundary_calls ( SgExpression *  expr,
SgBasicBlock *&  bb,
bool  duplicate_segments,
PortCallPath  pcp,
int  stmt_type = 0,
SgStatement *  parent = NULL,
SgBasicBlock *  body = NULL 
)
private

This function decomposes an expression into multiple statements. Functions which call directly or indirectly a boundary will be separated and have temporally variables. Example: Input: x = y + foo(); // foo() has a indirect boundary Output: int temp_foo = foo(); int x = y + temp_foo();.

risc::sg::SegmentGraph::duplicate_empty_segments ( SegmentSet  segments)
private

This function dupilcates a SegmentSet. The dulicated segments will have also incoming edges. Duplicated segments are not inlined_segment.

risc::sg::SegmentGraph::duplicate_segments ( SegmentSet  segments)
private

This function dupilcates a SegmentSet. the dulicated segments will have also incoming edges.

risc::sg::SegmentGraph::find_module_segments ( )

for loading PSG It adds simulation threads to module_definitions, and sets the corresponding starting_id_ of the thread.

risc::sg::SegmentGraph::follow_function_call ( SgFunctionDeclaration *  func_decl)
private

true, if the function be followed.

risc::sg::SegmentGraph::forward_reference_function_parameters ( SgFunctionCallExp *  func_call_exp)
private

This function forwards the arguments which are passed by reference to the function parameters of the called function. Recursively, this function traverses through the body of the function definition and follow other function calls.

risc::sg::SegmentGraph::generate_unique_name ( SgNode *  node)
private

Generates an unique name for a varible based on the given node.

risc::sg::SegmentGraph::generate_unique_name ( std::string  s)
private

Generates an unique name for a varible based on the given string.

risc::sg::SegmentGraph::get_function_call_annotation ( SgFunctionCallExp *  func_call_exp)
private

This function takes a function call expression and checks if there is any function annotation at the declaration. If the function declaration has no annotation, there will be a check if a annotation must be created.

FA: Function annoation CF: Cached function

               comment        no comment

definition FA (inlining) CF (linking) no defiition FA (inlining) FA (nothing, default: no-wait conflict-free)

risc::sg::SegmentGraph::get_wait_and_notifying_events ( )

set the wait_events_ and notify_events_ for psg nodes under psg mode

risc::sg::SegmentGraph::handle_recursive_calls ( )
private

This function integrates the recursive function calls.

risc::sg::SegmentGraph::has_function_call_with_boundary ( SgExpression *  expr,
bool  duplicate_segments,
PortCallPath  pcp 
)
private

This function checks if in the given expression a function call occurs which calls a functon with a boundary statements.

risc::sg::SegmentGraph::has_transition ( int  seg_id_from,
int  seg_id_to 
)

true, if there is a transition from 'from' to 'to'

risc::sg::SegmentGraph::id_to_vertex_descriptor ( int  seg_id)

Returns a vertex descriptor of the segment with the id 'seg_id'.

risc::sg::SegmentGraph::insert_loop_edges ( VertexDescriptor loop_vertex,
SegmentSet current_segments,
SegmentSet continue_segments,
SegmentSet leaf_segments_of_loop 
)
private

This is a helper function for loop handling.

risc::sg::SegmentGraph::integrate_psg_into_sg ( VertexDescriptor  func_call_vertex_id,
SgSymbol *  func_sym 
)

replace a partial function call node with its psg. If the partial function call is a port call, the integrated psg will be cloned, and set pcp

Parameters
func_call_vertex_idvertex descriptor of the function call node
func_symSymbol of the function call, used to locate the entrance and exit nodes of the sub psg
risc::sg::SegmentGraph::is_boundary_stmt ( SgStatement const *const  current_stmt)
private

This function checks if a given statement is a potential boundary statement.

Parameters
current_stmtThe statement which will be checked
risc::sg::SegmentGraph::mark_not_conflict_free_func_calls_in_segment ( SgNode *  stmt,
SegmentSet  segments 
)
private

This function checks if there is a not-conflict-free function call in the expression. If so, all segments marked as in conflict.

risc::sg::SegmentGraph::print_graph ( std::string  filename)

This function prints the graph in a dot file. The name of the file is user defined by argument.

Parameters
filenameThe name of the file
risc::sg::SegmentGraph::print_graph_read_write_access ( std::string  filename)

This function prints all variables which have read or written in this segment.

Parameters
filenameThe name of the file
risc::sg::SegmentGraph::print_psg_file ( std::string  file_name)

store the psg as .psg file on disk

Parameters
file_nameThe name of the file
risc::sg::SegmentGraph::read_psg_from_file ( std::string  file_name)

load the .psg file from disk reconstructs nodes and connections

Parameters
file_nameThe name of the file
risc::sg::SegmentGraph::read_write_analysis_of_segments ( )

The function determines which variables are read and written in the individual segments.

risc::sg::SegmentGraph::reference_analysis_hack_for_b_transport ( SgFunctionCallExp *  func_call,
SgFunctionDefinition *  func_def,
SgVariableDefinition *  socket 
)
private

we now also keep the pcp

risc::sg::SegmentGraph::reference_analysis_hack_for_dmi_get_ptr ( SgFunctionCallExp *  func_call,
SgFunctionDefinition *  func_def,
SgVariableDefinition *  socket 
)
private

get_dmi_ptr is a special case. In this case, the 2nd parameter is a reference referring to a dmi object. However, in the analysis, it should be the dmi object refering to the parameter

risc::sg::SegmentGraph::reference_analysis_hack_for_nb_transport ( SgFunctionCallExp *  func_call,
SgFunctionDefinition *  func_def,
SgVariableDefinition *  socket 
)
private

we now also keep the pcp

risc::sg::SegmentGraph::remove_dangling_segments ( )

after integration of all the psgs, the segments that does not belong to simulation processes are removed

risc::sg::SegmentGraph::replace_partial_function_call_nodes ( )

for each partial function call node, calls integrate_psg_into_sg to replace the node with corresponding sub psg

risc::sg::SegmentGraph::separate_variable_declaration_and_initializer_on_demand ( SgBasicBlock *&  bb,
bool  duplicate_segments,
PortCallPath  pcp 
)
private

This function checks if a direct or indirect boundary call is in the initializer expression of the variable declaration. If yes, the declaration and initialization will be separated. Example: Input: int x = y + foo(); // foo() has a indirect boundary Output: int x; x = y + foo();.

risc::sg::SegmentGraph::set_all_segments_to_untouched ( )

This function sets the status of the flag helper_for_graph_algorithms for all nodes to 'Untouched'.

risc::sg::SegmentGraph::set_socket_attribute_for_dmi_object ( SgFunctionCallExp *  func_call,
SgVariableDefinition *  socket 
)
private

we need to know which module instance this dmi object connects to

risc::sg::SegmentGraph::set_socket_call_CachedFunctionAstAttributes ( SgFunctionDeclaration *  func_decl,
bool  duplicate_segments,
PortCallPath  pcp 
)
private

set the CachedFunctionAstAttributes for registered b_transport functions

risc::sg::SegmentGraph::should_decompose_function ( SgExpression *  expr,
bool  duplicate_segments,
PortCallPath  pcp,
bool  is_condition = false 
)
private

This function determines if a expression should be decomposed. This is the case if expression has the following structure: var = somepointer->func(); var = somevariable.func(); var = func(); and var is a global, member, or static variable.

Member Data Documentation

std::unordered_set<SgFunctionCallExp*> risc::sg::SegmentGraph::b_transport_calls_
std::unordered_map<SgFunctionCallExp*, std::vector<int> > risc::sg::SegmentGraph::bt_socket_offset_mapping_

used for instrumenting seg id offset in b_transport implementation functions.

std::vector<std::string> risc::sg::SegmentGraph::channel_seg_id_array_names_

we need to instrument set_upcoming_segment_id(var_array) before port calls var_array is defined in the top level channel_seg_id_array_names_ stores the names of all var_array. the names are passed to instrumentor to instrument the arrays in the top file. each name was stored in psg files and loaded back

int risc::sg::SegmentGraph::counter = 0
staticprivate

This counter is used for generating variables names with unique names.

std::unordered_map<SgFunctionDeclaration*, std::vector<int> > risc::sg::SegmentGraph::func_socket_offset_mapping_

used for instrumenting seg id offset in b_transport implementation functions.

std::map< SgSymbol * , std::vector<VertexDescriptor> > risc::sg::SegmentGraph::func_symbols_and_entrance_segVertex_

mapping of function symbol and its entrance segment vertexes, reconstructed after loading

std::map< SgSymbol * , std::vector<VertexDescriptor> > risc::sg::SegmentGraph::func_symbols_and_exit_segVertex_

mapping of function symbol and its exit segment vertexes reconstructed after loading

FunctionCallBoundarySet risc::sg::SegmentGraph::function_boundaries_
private

Contains all boudaries (currently, wait statemens)

Graph risc::sg::SegmentGraph::graph_

Internal data structure of the segment graph.

bool risc::sg::SegmentGraph::is_succesfully_created_

Is true if the segment graph is successfully created.

CCxxKeywordsBoundarySet risc::sg::SegmentGraph::keyword_boundaries_
private

Currently not used.

std::set<VertexDescriptor> risc::sg::SegmentGraph::port_call_seg_vertexs_

stores the partial function call nodes that hold port calls. are used in PSG mode.

std::set<SgFunctionCallExp*> risc::sg::SegmentGraph::port_calls_

This set stores all function calls which belong to a port. These segments will be deleted later.

std::set<VertexDescriptor> risc::sg::SegmentGraph::precached_function_segments_

This set stores segments from precached functions. These segments will be deleted later.

std::set<VertexDescriptor> risc::sg::SegmentGraph::recursive_function_calls_
private

Contains the entrance vertexes of recursive function calls.

bool risc::sg::SegmentGraph::static_analysis_
private

determine if the compiler should perform static analysis or dynamic analysis

std::unordered_set<SgVariableSymbol*> risc::sg::SegmentGraph::Tlm2_containers_

including generic payload and dmi

int risc::sg::SegmentGraph::total_segment_nodes_

for redaction of psg, we need to store the total number of segment nodes. The value is set in the main function

std::vector<std::pair<VertexDescriptor, SgSymbol *> > risc::sg::SegmentGraph::vertexID_symbol_pairs_of_partialFuncCallNodes_

pairs of VertexDescriptor of partial function call node and the function's symbol. used for replacing partial function call nodes with its subpsg


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