Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

CFG Class Reference

#include <cfg.h>

List of all members.

Public Member Functions

 CFG ()
 ~CFG ()
void set_root (Node_List *nl)
void set_entry (Node_List *nl)
void set_exit (Node_List *nl)
void set_proc_name (char *i)
Node_Listroot ()
char * proc_name ()
int node_count ()
Node_Listentry ()
Node_Listexit ()
void read_file ()
void build (legoProc *proc_ptr)
void recursive_build (legoProc *proc_ptr, legoRegion *region_ptr)
void build_one_block (legoProc *proc_ptr, legoRegion *region_ptr)
void print (FILE *f)
Node_Listfind_node (int node_id)
int edge_count ()
void dfs (int option)
void dfs_visit (Node_List *nl, int option)
void process_back_edge ()
Nodeadd_edge (Node_List *souce, Node_List *dest, int edge_id)
void add_edge_from_exit_to_entry ()
void print_dfs_tree ()
void print_edge_type (Edge_Type et)
void print_color (Color c)
void print_topological_list ()
void unhide_EXIT_edge ()
int assign_value ()
void event_counting (MST *mst)
void event_dfs (int events, Node_List *v, Node_List *e_nl, Node *e, MST *mst)
void print_eff_sum (MST *mst)
int event_dir (Node_List *e_nl, Node *e_n, Node_List *f_nl, Node *f_n)
void find_type_of_instrumentation (MST *mst)
int num_of_incoming_edge (Node_List *vertex)
void hide_ET_NEW_edge ()
void regenerate_path (FILE *ifp)
 CFG ()
 ~CFG ()
void set_root (Node_List *nl)
void set_entry (Node_List *nl)
void set_exit (Node_List *nl)
void set_proc_name (char *i)
Node_Listroot ()
char * proc_name ()
int node_count ()
Node_Listentry ()
Node_Listexit ()
void read_file ()
void build (legoProc *proc_ptr)
void recursive_build (legoProc *proc_ptr, legoRegion *region_ptr)
void build_one_block (legoProc *proc_ptr, legoRegion *region_ptr)
void print (FILE *f)
Node_Listfind_node (int node_id)
int edge_count ()
void dfs (int option)
void dfs_visit (Node_List *nl, int option)
void process_back_edge ()
Nodeadd_edge (Node_List *souce, Node_List *dest, int edge_id)
void add_edge_from_exit_to_entry ()
void print_dfs_tree ()
void print_edge_type (Edge_Type et)
void print_color (Color c)
void print_topological_list ()
void unhide_EXIT_edge ()
int assign_value ()
void event_counting (MST *mst)
void event_dfs (int events, Node_List *v, Node_List *e_nl, Node *e, MST *mst)
void print_eff_sum (MST *mst)
int event_dir (Node_List *e_nl, Node *e_n, Node_List *f_nl, Node *f_n)
void find_type_of_instrumentation (MST *mst)
int num_of_incoming_edge (Node_List *vertex)
void hide_ET_NEW_edge ()
void regenerate_path (FILE *ifp)

Private Attributes

Node_List_root
Node_List_entry
Node_List_exit
int _in_edge_count
int _out_edge_count
int _node_count
char * _proc_name
int _max_edge_id
int _last_to_exit_edge_id
int _time
int * _topological_list
int _index_of_topological_list
Node_List_root
Node_List_entry
Node_List_exit
char * _proc_name
int * _topological_list


Constructor & Destructor Documentation

CFG::CFG  )  [inline]
 

Definition at line 163 of file include/cfg.h.

References _entry, _exit, _in_edge_count, _last_to_exit_edge_id, _max_edge_id, _node_count, _out_edge_count, _root, _time, _topological_list, and LastToExitEdgeId.

CFG::~CFG  )  [inline]
 

Definition at line 165 of file include/cfg.h.

References _proc_name, _root, _topological_list, and Node_List::next_node_list().

CFG::CFG  )  [inline]
 

Definition at line 163 of file src/cfg.h.

References _entry, _exit, _in_edge_count, _last_to_exit_edge_id, _max_edge_id, _node_count, _out_edge_count, _root, _time, _topological_list, and LastToExitEdgeId.

CFG::~CFG  )  [inline]
 

Definition at line 165 of file src/cfg.h.

References _proc_name, _root, _topological_list, and Node_List::next_node_list().


Member Function Documentation

Node* CFG::add_edge Node_List souce,
Node_List dest,
int  edge_id
 

Node * CFG::add_edge Node_List souce,
Node_List dest,
int  edge_id
 

Definition at line 588 of file cfg.cpp.

References _in_edge_count, _out_edge_count, Cdb, ET_NEW, Node::next_node(), Node_List::node(), Node::node_id(), Node::set_direction(), Node::set_edge_id(), Node::set_edge_type(), and Node::set_next_node().

Referenced by process_back_edge().

void CFG::add_edge_from_exit_to_entry  ) 
 

void CFG::add_edge_from_exit_to_entry  ) 
 

Definition at line 236 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _out_edge_count, adj_list, ExitToEntryEdgeId, Node::next_node(), Node_List::node(), Node::node_id(), Node::set_direction(), Node::set_edge_id(), Node::set_next_node(), and Node::set_weight().

Referenced by build(), and read_file().

int CFG::assign_value  ) 
 

int CFG::assign_value  ) 
 

Definition at line 629 of file cfg.cpp.

References _exit, _index_of_topological_list, _topological_list, Cdb, Cdb_call, Node::direction(), Node::edge_id(), find_node(), Node::hidden(), i, Node::next_node(), Node_List::node(), Node::node_id(), Node::num_paths(), Node_List::num_paths(), Node::set_num_paths(), and Node_List::set_num_paths().

void CFG::build legoProc proc_ptr  ) 
 

void CFG::build legoProc proc_ptr  ) 
 

Definition at line 36 of file cfg.cpp.

References _exit, _in_edge_count, _node_count, _out_edge_count, _root, add_edge_from_exit_to_entry(), Cdb, ExitNodeId, legoPSet< void * >::GetCount(), legoProc::GetProcName(), proc_name(), recursive_build(), Node_List::set_node(), and set_proc_name().

Referenced by BB_Edge_Profile::doit().

void CFG::build_one_block legoProc proc_ptr,
legoRegion region_ptr
 

void CFG::build_one_block legoProc proc_ptr,
legoRegion region_ptr
 

Definition at line 108 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _last_to_exit_edge_id, _max_edge_id, _node_count, _out_edge_count, _root, Cdb, ExitNodeId, find_lego_block_with_op_id(), attrList::GetAttrValPtr(), intList::GetAttrValue(), opEdges::GetEdgeAttrListPtr(), edgeList::GetEdgeId(), edgeList::GetEdgePtr(), legoRegion::GetInEdgesPtr(), edgeList::GetNextListPtr(), legoRegion::GetOutEdgesPtr(), legoRegion::GetRegionId(), legoRegion::GetRegionType(), opEdges::GetToOpId(), edgeList::GetValid(), legoRegion::GetWeight(), Node::next_node(), regionTypes, RT_BB, RT_HB, RT_SB, Node::set_direction(), Node::set_edge_id(), Node::set_next_node(), Node_List::set_next_node_list(), Node_List::set_node(), and Node::set_weight().

Referenced by recursive_build().

void CFG::dfs int  option  ) 
 

void CFG::dfs int  option  ) 
 

Definition at line 318 of file cfg.cpp.

References _entry, _index_of_topological_list, _node_count, _root, _time, _topological_list, Cdb, Node_List::color(), dfs_visit(), Node_List::next_node_list(), Node_List::set_color(), Node_List::set_predecessor(), and WHITE.

void CFG::dfs_visit Node_List nl,
int  option
 

void CFG::dfs_visit Node_List nl,
int  option
 

Definition at line 358 of file cfg.cpp.

References _index_of_topological_list, _node_count, _time, _topological_list, BLACK, Cdb, Node_List::color(), Color, Node::direction(), Node::edge_id(), ET_BACK, ET_CROSS, ET_FORWARD, ET_SELFLOOP, ET_TREE, find_node(), GRAY, Node::hidden(), Node::next_node(), Node_List::node(), Node::node_id(), Node_List::set_color(), Node::set_edge_type(), Node_List::set_finish_time(), Node_List::set_predecessor(), Node_List::set_start_time(), Node_List::start_time(), and WHITE.

Referenced by dfs().

int CFG::edge_count  )  [inline]
 

Definition at line 204 of file src/cfg.h.

References _in_edge_count, and _out_edge_count.

int CFG::edge_count  )  [inline]
 

Definition at line 204 of file include/cfg.h.

References _in_edge_count, and _out_edge_count.

Referenced by MST::build(), Edge_Table::build(), and read_file().

Node_List* CFG::entry  )  [inline]
 

Definition at line 192 of file src/cfg.h.

References _entry.

Node_List* CFG::entry  )  [inline]
 

Definition at line 192 of file include/cfg.h.

References _entry.

Referenced by Node_Table::build(), and MST::build().

void CFG::event_counting MST mst  ) 
 

void CFG::event_counting MST mst  ) 
 

Definition at line 787 of file cfg.cpp.

References _entry, Cdb, Node::direction(), Node::edge_id(), Node::eff_sum(), event_dfs(), Node::hidden(), MST::is_mst(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::num_paths(), root(), and Node::set_eff_sum().

void CFG::event_dfs int  events,
Node_List v,
Node_List e_nl,
Node e,
MST mst
 

void CFG::event_dfs int  events,
Node_List v,
Node_List e_nl,
Node e,
MST mst
 

Definition at line 843 of file cfg.cpp.

References Cdb, Cdb_call, Node::direction(), Node::edge_id(), Node::eff_sum(), event_dir(), find_node(), Node::hidden(), MST::is_mst(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), Node::num_paths(), root(), and Node::set_eff_sum().

Referenced by event_counting().

int CFG::event_dir Node_List e_nl,
Node e_n,
Node_List f_nl,
Node f_n
 

int CFG::event_dir Node_List e_nl,
Node e_n,
Node_List f_nl,
Node f_n
 

Definition at line 973 of file cfg.cpp.

References Node_List::node(), and Node::node_id().

Referenced by event_dfs().

Node_List* CFG::exit  )  [inline]
 

Definition at line 193 of file src/cfg.h.

References _exit.

Node_List* CFG::exit  )  [inline]
 

Definition at line 193 of file include/cfg.h.

References _exit.

Referenced by Node_Table::build(), and MST::build().

Node_List* CFG::find_node int  node_id  ) 
 

Node_List * CFG::find_node int  node_id  ) 
 

Definition at line 297 of file cfg.cpp.

References fprintf(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), and root().

Referenced by assign_value(), MST::build(), dfs_visit(), event_dfs(), find_type_of_instrumentation(), MST::pq_update(), process_back_edge(), read_file(), and regenerate_path().

void CFG::find_type_of_instrumentation MST mst  ) 
 

void CFG::find_type_of_instrumentation MST mst  ) 
 

Definition at line 991 of file cfg.cpp.

References _entry, _node_count, Cdb, Cdb_call, Node::direction(), Node::edge_id(), find_node(), Node::hidden(), i, MST::is_mst(), Node::next_node(), Node_List::node(), Node::node_id(), and num_of_incoming_edge().

void CFG::hide_ET_NEW_edge  ) 
 

void CFG::hide_ET_NEW_edge  ) 
 

Definition at line 761 of file cfg.cpp.

References Cdb, Node::edge_type(), ET_NEW, Node::next_node(), Node_List::next_node_list(), Node_List::node(), root(), and Node::set_hidden().

int CFG::node_count  )  [inline]
 

Definition at line 191 of file src/cfg.h.

References _node_count.

int CFG::node_count  )  [inline]
 

Definition at line 191 of file include/cfg.h.

References _node_count.

Referenced by Node_Table::build(), and read_file().

int CFG::num_of_incoming_edge Node_List vertex  ) 
 

int CFG::num_of_incoming_edge Node_List vertex  ) 
 

Definition at line 1044 of file cfg.cpp.

References _root, Node::direction(), Node::hidden(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), and Node::node_id().

Referenced by find_type_of_instrumentation().

void CFG::print FILE *  f  ) 
 

void CFG::print FILE *  f  ) 
 

Definition at line 268 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _node_count, _out_edge_count, _proc_name, Node::direction(), Node::edge_id(), fprintf(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), root(), Node_List::visit(), and Node::weight().

Referenced by MST::pq_update().

void CFG::print_color Color  c  ) 
 

void CFG::print_color Color  c  ) 
 

Definition at line 500 of file cfg.cpp.

References BLACK, c, fprintf(), GRAY, and WHITE.

Referenced by print_dfs_tree().

void CFG::print_dfs_tree  ) 
 

void CFG::print_dfs_tree  ) 
 

Definition at line 451 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _max_edge_id, _node_count, _out_edge_count, _proc_name, Node_List::color(), Node::direction(), Node::edge_id(), Node::edge_type(), fprintf(), Node::hidden(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), Node::num_paths(), Node_List::num_paths(), print_color(), print_edge_type(), root(), and Node::weight().

void CFG::print_edge_type Edge_Type  et  ) 
 

void CFG::print_edge_type Edge_Type  et  ) 
 

Definition at line 480 of file cfg.cpp.

References ET_BACK, ET_CROSS, ET_FORWARD, ET_NEW, ET_SELFLOOP, ET_TREE, ET_UNDEFINED, and fprintf().

Referenced by print_dfs_tree(), and process_back_edge().

void CFG::print_eff_sum MST mst  ) 
 

void CFG::print_eff_sum MST mst  ) 
 

Definition at line 818 of file cfg.cpp.

References Cdb, Node::direction(), Node::edge_id(), Node::eff_sum(), fprintf(), Node::hidden(), MST::is_mst(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), and root().

void CFG::print_topological_list  ) 
 

void CFG::print_topological_list  ) 
 

Definition at line 441 of file cfg.cpp.

References _index_of_topological_list, _topological_list, fprintf(), and i.

char* CFG::proc_name  )  [inline]
 

Definition at line 190 of file src/cfg.h.

References _proc_name.

char* CFG::proc_name  )  [inline]
 

Definition at line 190 of file include/cfg.h.

References _proc_name.

Referenced by Node_Table::build(), Edge_Table::build(), and build().

void CFG::process_back_edge  ) 
 

void CFG::process_back_edge  ) 
 

Definition at line 517 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _max_edge_id, _node_count, _out_edge_count, _proc_name, add_edge(), Cdb, Cdb_call, Node::direction(), Node::edge_id(), Node::edge_type(), ET_BACK, ET_SELFLOOP, ExitToEntryEdgeId, find_node(), Node::hidden(), Node::next_node(), Node_List::next_node_list(), Node_List::node(), Node::node_id(), print_edge_type(), root(), Node::set_entry_to_dest(), Node::set_hidden(), and Node::set_src_to_exit().

void CFG::read_file  ) 
 

void CFG::read_file  ) 
 

Definition at line 671 of file cfg.cpp.

References _entry, _exit, _in_edge_count, _max_edge_id, _node_count, _out_edge_count, _root, add_edge_from_exit_to_entry(), edge_count(), find_node(), fopen(), fprintf(), fscanf(), i, node_count(), Node::set_edge_id(), Node::set_next_node(), Node_List::set_next_node_list(), Node_List::set_node(), and set_proc_name().

void CFG::recursive_build legoProc proc_ptr,
legoRegion region_ptr
 

void CFG::recursive_build legoProc proc_ptr,
legoRegion region_ptr
 

Definition at line 69 of file cfg.cpp.

References build_one_block(), fprintf(), legoPSet< void * >::GetCount(), legoPSet< void * >::GetItem(), legoRegion::GetRegionType(), i, regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, and RT_TREE.

Referenced by build().

void CFG::regenerate_path FILE *  ifp  ) 
 

void CFG::regenerate_path FILE *  ifp  ) 
 

Definition at line 1065 of file cfg.cpp.

References _entry, _exit, Cdb, Node::direction(), Node::edge_type(), ET_BACK, ET_SELFLOOP, find_node(), fprintf(), i, Node::next_node(), Node_List::node(), Node::node_id(), Node::num_paths(), and Node_List::num_paths().

Node_List* CFG::root  )  [inline]
 

Definition at line 189 of file src/cfg.h.

References _root.

Node_List* CFG::root  )  [inline]
 

Definition at line 189 of file include/cfg.h.

References _root.

Referenced by Node_Table::build(), Edge_Table::build(), event_counting(), event_dfs(), find_node(), hide_ET_NEW_edge(), MST::pq_update(), print(), print_dfs_tree(), print_eff_sum(), process_back_edge(), and unhide_EXIT_edge().

void CFG::set_entry Node_List nl  )  [inline]
 

Definition at line 180 of file src/cfg.h.

References _entry.

void CFG::set_entry Node_List nl  )  [inline]
 

Definition at line 180 of file include/cfg.h.

References _entry.

void CFG::set_exit Node_List nl  )  [inline]
 

Definition at line 181 of file src/cfg.h.

References _exit.

void CFG::set_exit Node_List nl  )  [inline]
 

Definition at line 181 of file include/cfg.h.

References _exit.

void CFG::set_proc_name char *  i  )  [inline]
 

Definition at line 183 of file src/cfg.h.

References _proc_name, i, strcpy(), and strlen().

void CFG::set_proc_name char *  i  )  [inline]
 

Definition at line 183 of file include/cfg.h.

References _proc_name, i, strcpy(), and strlen().

Referenced by build(), and read_file().

void CFG::set_root Node_List nl  )  [inline]
 

Definition at line 179 of file src/cfg.h.

References _root.

void CFG::set_root Node_List nl  )  [inline]
 

Definition at line 179 of file include/cfg.h.

References _root.

void CFG::unhide_EXIT_edge  ) 
 

void CFG::unhide_EXIT_edge  ) 
 

Definition at line 736 of file cfg.cpp.

References Cdb, Node::edge_id(), ExitToEntryEdgeId, Node::next_node(), Node_List::next_node_list(), Node_List::node(), root(), and Node::set_hidden().


Member Data Documentation

Node_List* CFG::_entry [private]
 

Definition at line 248 of file src/cfg.h.

Node_List* CFG::_entry [private]
 

Definition at line 248 of file include/cfg.h.

Referenced by add_edge_from_exit_to_entry(), build_one_block(), CFG(), dfs(), entry(), event_counting(), find_type_of_instrumentation(), print(), print_dfs_tree(), process_back_edge(), read_file(), regenerate_path(), and set_entry().

Node_List* CFG::_exit [private]
 

Definition at line 249 of file src/cfg.h.

Node_List* CFG::_exit [private]
 

Definition at line 249 of file include/cfg.h.

Referenced by add_edge_from_exit_to_entry(), assign_value(), build(), build_one_block(), CFG(), exit(), print(), print_dfs_tree(), process_back_edge(), read_file(), regenerate_path(), and set_exit().

int CFG::_in_edge_count [private]
 

Definition at line 250 of file src/cfg.h.

Referenced by add_edge(), add_edge_from_exit_to_entry(), build(), build_one_block(), CFG(), edge_count(), print(), print_dfs_tree(), process_back_edge(), and read_file().

int CFG::_index_of_topological_list [private]
 

Definition at line 266 of file src/cfg.h.

Referenced by assign_value(), dfs(), dfs_visit(), and print_topological_list().

int CFG::_last_to_exit_edge_id [private]
 

Definition at line 255 of file src/cfg.h.

Referenced by build_one_block(), and CFG().

int CFG::_max_edge_id [private]
 

Definition at line 254 of file src/cfg.h.

Referenced by build_one_block(), CFG(), print_dfs_tree(), process_back_edge(), and read_file().

int CFG::_node_count [private]
 

Definition at line 252 of file src/cfg.h.

Referenced by build(), build_one_block(), CFG(), dfs(), dfs_visit(), find_type_of_instrumentation(), node_count(), print(), print_dfs_tree(), process_back_edge(), and read_file().

int CFG::_out_edge_count [private]
 

Definition at line 251 of file src/cfg.h.

Referenced by add_edge(), add_edge_from_exit_to_entry(), build(), build_one_block(), CFG(), edge_count(), print(), print_dfs_tree(), process_back_edge(), and read_file().

char* CFG::_proc_name [private]
 

Definition at line 253 of file src/cfg.h.

char* CFG::_proc_name [private]
 

Definition at line 253 of file include/cfg.h.

Referenced by print(), print_dfs_tree(), proc_name(), process_back_edge(), set_proc_name(), and ~CFG().

Node_List* CFG::_root [private]
 

Definition at line 247 of file src/cfg.h.

Node_List* CFG::_root [private]
 

Definition at line 247 of file include/cfg.h.

Referenced by build(), build_one_block(), CFG(), dfs(), num_of_incoming_edge(), read_file(), root(), set_root(), and ~CFG().

int CFG::_time [private]
 

Definition at line 260 of file src/cfg.h.

Referenced by CFG(), dfs(), and dfs_visit().

int* CFG::_topological_list [private]
 

Definition at line 265 of file src/cfg.h.

int* CFG::_topological_list [private]
 

Definition at line 265 of file include/cfg.h.

Referenced by assign_value(), CFG(), dfs(), dfs_visit(), print_topological_list(), and ~CFG().


The documentation for this class was generated from the following files:
Generated on Mon Jul 21 20:30:55 2003 for TINKER LEGO DOC by doxygen 1.3.2