risc::sg::SegmentGraph Class Reference

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

#include <segment_graph.h>

List of all members.

Public Types

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

Public Member Functions

 SegmentGraph (FunctionCallBoundarySet function_boundaries)
 SegmentGraph (CCxxKeywordsBoundarySet keyword_boundaries)
 SegmentGraph (FunctionCallBoundarySet function_boundaries, CCxxKeywordsBoundarySet keyword_boundaries)
void clean_graph ()
 This function deletes all duplicated nodes in each vertex of the graph.
void print_graph (std::string filename)
void print_graph_read_write_access (std::string filename)
void add_function (Function *function, bool duplicate_segments=false)
void read_write_analysis_of_segments ()
 The function determines which variables are read and written in the individual segments.
void set_all_segments_to_untouched ()
 This function sets the status of the flag helper_for_graph_algorithms for all nodes to 'Untouched'.

Public Attributes

Graph graph_
std::set< VertexDescriptorprecached_function_segments_

Private Member Functions

void handle_recursive_calls ()
 This function integrates the recursive function calls.
void separate_variable_declaration_and_initializer_on_demand (SgBasicBlock *&bb, bool duplicate_segments)
void decompose_expression_with_boundary_calls (SgExpression *expr, SgBasicBlock *&bb, bool duplicate_segments)
void create_temp_variable_for_expression (SgExpression *expr, SgBasicBlock *&bb)
std::string generate_unique_name (SgNode *node)
bool is_boundary_stmt (SgStatement const *const current_stmt)
SgFunctionCallExp * has_function_call_with_boundary (SgExpression *expr, bool duplicate_segments)
bool should_decompose_function (SgExpression *expr, bool duplicate_segments)
SgFunctionDeclaration * contains_function_call_expression (SgExpression *expr)
SegmentSet build_graph (SgStatement *current_stmt, SegmentSet current_segments, SegmentSet &break_segments, SegmentSet &continue_segments, bool duplicate_segments)
void add_expression_to_segment (SegmentSet segments, SgNode *expr)
CachedFunctionAstAttributesbuild_segment_graph_for_function (SgFunctionDefinition *func_def, bool duplicate_segments)
void insert_loop_edges (VertexDescriptor &loop_vertex, SegmentSet &current_segments, SegmentSet &continue_segments, SegmentSet &leaf_segments_of_loop)
FunctionAnnotationAttributesget_function_call_annotation (SgFunctionCallExp *func_call_exp)
CachedFunctionAstAttributescreate_cached_function_attribute_for_annotated_function (SgNode *boundary_node, WAIT_CONSTRUCT wait_type, SegmentSet incoming_segments)
void add_mapped_symbol_to_reference (SgFunctionCallExp *func_call, SgFunctionDefinition *func_def)
void forward_reference_function_parameters (SgFunctionCallExp *func_call_exp)
FunctionAnnotationanalyze_prepended_pragmas_for_annotation (SgFunctionDeclaration *func_decl)
SegmentSet duplicate_segments (SegmentSet segments)
SegmentSet duplicate_empty_segments (SegmentSet segments)

Private Attributes

bool static_analysis_
FunctionCallBoundarySet function_boundaries_
CCxxKeywordsBoundarySet keyword_boundaries_
std::set< VertexDescriptorrecursive_function_calls_

Static Private Attributes

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

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 ( FunctionCallBoundarySet  function_boundaries  ) 
risc::sg::SegmentGraph::SegmentGraph ( CCxxKeywordsBoundarySet  keyword_boundaries  ) 
risc::sg::SegmentGraph::SegmentGraph ( FunctionCallBoundarySet  function_boundaries,
CCxxKeywordsBoundarySet  keyword_boundaries 
)

Member Function Documentation

void risc::sg::SegmentGraph::add_expression_to_segment ( SegmentSet  segments,
SgNode *  expr 
) [private]
void risc::sg::SegmentGraph::add_function ( Function function,
bool  duplicate_segments = false 
)
void risc::sg::SegmentGraph::add_mapped_symbol_to_reference ( SgFunctionCallExp *  func_call,
SgFunctionDefinition *  func_def 
) [private]
FunctionAnnotation * risc::sg::SegmentGraph::analyze_prepended_pragmas_for_annotation ( SgFunctionDeclaration *  func_decl  )  [private]
risc::sg::SegmentGraph::SegmentSet risc::sg::SegmentGraph::build_graph ( SgStatement *  current_stmt,
SegmentSet  current_segments,
SegmentSet break_segments,
SegmentSet continue_segments,
bool  duplicate_segments 
) [private]
risc::sg::CachedFunctionAstAttributes * risc::sg::SegmentGraph::build_segment_graph_for_function ( SgFunctionDefinition *  func_def,
bool  duplicate_segments 
) [private]
risc::sg::SegmentGraph::clean_graph (  ) 

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

SgFunctionDeclaration * risc::sg::SegmentGraph::contains_function_call_expression ( SgExpression *  expr  )  [private]
risc::sg::CachedFunctionAstAttributes * risc::sg::SegmentGraph::create_cached_function_attribute_for_annotated_function ( SgNode *  boundary_node,
WAIT_CONSTRUCT  wait_type,
SegmentSet  incoming_segments 
) [private]
void risc::sg::SegmentGraph::create_temp_variable_for_expression ( SgExpression *  expr,
SgBasicBlock *&  bb 
) [private]
void risc::sg::SegmentGraph::decompose_expression_with_boundary_calls ( SgExpression *  expr,
SgBasicBlock *&  bb,
bool  duplicate_segments 
) [private]
risc::sg::SegmentGraph::SegmentSet risc::sg::SegmentGraph::duplicate_empty_segments ( SegmentSet  segments  )  [private]
risc::sg::SegmentGraph::SegmentSet risc::sg::SegmentGraph::duplicate_segments ( SegmentSet  segments  )  [private]
void risc::sg::SegmentGraph::forward_reference_function_parameters ( SgFunctionCallExp *  func_call_exp  )  [private]
std::string risc::sg::SegmentGraph::generate_unique_name ( SgNode *  node  )  [private]
risc::sg::FunctionAnnotationAttributes * risc::sg::SegmentGraph::get_function_call_annotation ( SgFunctionCallExp *  func_call_exp  )  [private]
risc::sg::SegmentGraph::handle_recursive_calls (  )  [private]

This function integrates the recursive function calls.

SgFunctionCallExp * risc::sg::SegmentGraph::has_function_call_with_boundary ( SgExpression *  expr,
bool  duplicate_segments 
) [private]
void risc::sg::SegmentGraph::insert_loop_edges ( VertexDescriptor loop_vertex,
SegmentSet current_segments,
SegmentSet continue_segments,
SegmentSet leaf_segments_of_loop 
) [private]
bool risc::sg::SegmentGraph::is_boundary_stmt ( SgStatement const *const   current_stmt  )  [private]
void risc::sg::SegmentGraph::print_graph ( std::string  filename  ) 
void risc::sg::SegmentGraph::print_graph_read_write_access ( std::string  filename  ) 
risc::sg::SegmentGraph::read_write_analysis_of_segments (  ) 

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

void risc::sg::SegmentGraph::separate_variable_declaration_and_initializer_on_demand ( SgBasicBlock *&  bb,
bool  duplicate_segments 
) [private]
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'.

bool risc::sg::SegmentGraph::should_decompose_function ( SgExpression *  expr,
bool  duplicate_segments 
) [private]

Member Data Documentation

int risc::sg::SegmentGraph::counter = 0 [static, private]

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 30 Sep 2016 by  doxygen 1.6.1