Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CCDGNodeList Class Reference

#include <nodes.h>

List of all members.


Detailed Description

A doubly-linked list of CCDGNodes.

Each node holds a pointer to the corresponding node, and also has some locally stored information which has been copied from the node.


Public Member Functions

 CCDGNodeList ()
 Constructor.

 CCDGNodeList (CCDGNode *node, TRUTH_VALUE_TYPE tv, int trunc=0)
 Constructor which specifies node, execution condition and truncation.

 CCDGNodeList (char *name, NODE_TYPE type, TRUTH_VALUE_TYPE tv)
 Constructor which specifies node name and type, but leaves node pointer null.

 CCDGNodeList (CCDGNodeList *orig)
 Copy constructor.

CCDGNodeListCopy_Subgraph ()
 Create a copy of the subgraph rooted by this node.

CCDGNodeListAdd_Node (CCDGNode *p, TRUTH_VALUE_TYPE tv, int trunc=0)
 Append a node p to the end of this list.

CCDGNodeListAdd_Node (char *name, NODE_TYPE type, TRUTH_VALUE_TYPE tv)
CCDGNodeListAdd_Node (char *start, bool before)
CCDGNodeListAdd_NodeList (CCDGNodeList *nl)
CCDGNodeListInsert_Node (CCDGNode *new_node, CCDGNode *ref, bool before, TRUTH_VALUE_TYPE tv=TV_ANY)
CCDGNodeListAdvance_To_Next_Guest (CGuestInfo *cur_gst, GUEST_STATE_TYPE &which_guest, CCDGNode **nxt_gst_node, bool skip_all_preds, bool skip_ABL_pred)
void Set_Prev (CCDGNodeList *prev)
CCDGNodeListGet_Prev ()
CCDGNodeGet_Node ()
void Set_Node (CCDGNode *node)
char * Get_Name ()
CCDGNodeListGet_Last ()
NODE_TYPE Get_Type ()
TRUTH_VALUE_TYPE Get_TV ()
void Append_Suffix_To_Names (char *str)
 Append the suffix str to the name of each basic block in this list.

void Set_Trunc (int trunc)
int Get_Trunc ()
CInstr * MakeNormOp (int instrclass, long best, long worst, char *oper1=NULL, char *oper2=NULL, char *oper3=NULL)
 Used in the parser to build a CInstr object.

CCDGNodeListRemove_Node (int number)
CCDGNodeListRemove_Node (CCDGNode *p)
bool Already_Contains (CCDGNode *node)
CCDGNodeFind_Node (const char *name, NODE_TYPE type, bool dir_forward=true)
CCDGNodeFind_Nodes_Branching_Here (char *name, CCDGNodeList **nodelist, bool find_all)
CCDGNodeFind_Nodes_Branching_Here (CCDGNode *node, CCDGNodeList **nodelist, bool find_all)
int Num_Nodes_Branching_Here (char *name)
int Num_Nodes_Branching_Here (CCDGNode *node)
CCDGNodeProcess_Multiple_Merge_Points (CCDGNode *node)
CCDGNodeFind_Node_Before_Inc (const char *name, NODE_TYPE type, CCDGNodeList *end_lp)
CCDGNodeFind_Node_Skipping_Here (void)
void Extract_Dirs (char *asm_filename)
void Label_Nodes ()
void Find_Vars ()
void Virtualize_Registers ()
void Gen_Jitter_Plots (char *base_filename)
void Gen_Graphs ()
void Plot_Segments (char *base_filename)
void Gen_GnuPlot_Driver (char *orig_filename, PLOT_TYPE plot)
void Gen_Code (char *orig_filename)
bool Verify_Jumps_Can_Be_Ignored (CCDGNode *ret_node)
CCDGNodeListBuild_CDGs_From_Flat_Code ()
 This function builds the Control Flow Graph of the code which has been stored in the CCode/CCDGNodeList.

void Build_CFGs_From_Flat_Code ()
 this function builds the CFGs from the CCode list

void Add_Exit (CCDGNodeList *exit)
CCDGNodeListBuild_CDGs_via_CFGs () __attribute__((deprecated))
CCDGNodeFind_Common_Ancestor ()
void Do_STA (bool include_guest=TRUE)
void Find_Segments (long max_jitter)
void Pad_Jitter (bool pad_host, bool pad_guest)
void Find_Blocking_IO_Loops ()
void Pad_Leaving_Loop_Intact (long cocall_period, bool look_for_unique_loop, char *loop_name_passed)
void Prepare_Pad_And_Transform_Loop (CCDGNode *cur_node, long cocall_period, CPred *final_pred, bool loop_specific_code)
void Reallocate_Regs (REALLOC_TYPE realloc_method)
void Convert_PC_Relative_Branches ()
void Convert_Local_Labels_And_Branches ()
CCDGNodeListGuard (int reg, int bit, bool exec_condition)
CCDGNodeListNew_Guard (int reg, int bit, bool exec_condition)
CCDGNodeListAdd_NodeList (char *start, bool before)
void Pr_Info ()
void Pr_Name ()
void Pr_Type ()
void Output_Debug ()
void Output_Debug_Names ()
void Print_Directives ()
void Set_Visited (bool v)
long Count_Instrs ()
CCDGNodeListBuild_CDGs_via_CFGs (char *filename)
 Constructs a CDG by first building a CFG.

CCDGNodeGet_Node_With_Label (char *label)
void Handle_Start ()
 Performs the necessary steps to include the start node in the CFG.

void Handle_Default ()
void Set_Parent (CFG_Node *p_parent)
CFG_NodeGet_Parent ()
CFG_NodeBuild_CFG_Node_Tree (int *n, CFG_Node *parent, CFG_Node *prev)
 Performs the first step in the construction of the CDGs.

void Set_Name (char *p_name)
 Set the name of this node to p_name, unless it's a null pointer or too long.

void Fix_Call_Nodes ()
void Fix_Branch_Targets ()
void Fix_Short_Branches ()
void Open_CFG_VCG_File (char *CFG_VCG_filename)
void Add_To_CFG_VCG_File (char *CFG_VCG_filename)
void Close_CFG_VCG_File (char *CFG_VCG_filename)
void Build_CFG_VCG_File (int i, char *CFG_VCG_filename)
void Build_CFG_VCG_File (int i, bool f, char *CFG_VCG_filename)
 Counts the number of nodes written to the VCG file when generating the graphical representation of the CFG.

void Build_CFG_VCG (int i)
void Build_CFG_VCG (int i, bool f)
CCDGNodeListBuild_CDGs_for_Proc (CCDGNodeList *proc, CCDGNodeList *recent_nodes_end, CCDGNodeList *exit)
CCDGNodeListBuild_CFGs_and_CDGs (CCDGNodeList *recent_procs, char *source_filename)
 This method builds CFGs and then CDGs out of the nodes contained in this list.

CCDGNodeListAdd_Exit_Node ()
 Adds a CCode node to the CCode list to include the exit block.

char * Get_Function_Name ()
CCDGNodeListCompute_Code_End (bool begin)
void Fix_Infinite_Blocks (CCDGNodeList *start, CCDGNodeList *exit)
Infinite_NodesGet_Infinite_Nodes ()
void Reset_Infinite_Nodes ()
void Embed_CSource ()
void Set_Next (CCDGNodeList *next)
 Adds a node after this node.

CCDGNodeListGet_Next ()
 Gets the next CCDGNodeList in this list.

void Handle_Ctrans ()
 CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void Handle_Utrans ()
 CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void Handle_Skip ()
 CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void Handle_Utrans_Routine ()
 CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

CCDGNodeListHandle_Utrans_Return ()
 CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.


Private Attributes

CCDGNodeNode
 Pointer to the CCDGNode which this refers to.

char Name [STR_SIZE]
 Copy of Node's name.

NODE_TYPE Type
 What type Node is: CPred, CCode, etc.

CCDGNodeListNext
 Pointers for doubly-linked list.

CCDGNodeListPrev
 Pointers for doubly-linked list.

TRUTH_VALUE_TYPE TV
 Truth value (predicate) under which Node executes.

int Trunc
 Can't recall.

CFG_NodeParent
 Parent node, used during CFG formation but not afterwards.


Constructor & Destructor Documentation

CCDGNodeList::CCDGNodeList  )  [inline]
 

Constructor.

CCDGNodeList::CCDGNodeList CCDGNode node,
TRUTH_VALUE_TYPE  tv,
int  trunc = 0
 

Constructor which specifies node, execution condition and truncation.

CCDGNodeList::CCDGNodeList char *  name,
NODE_TYPE  type,
TRUTH_VALUE_TYPE  tv
 

Constructor which specifies node name and type, but leaves node pointer null.

CCDGNodeList::CCDGNodeList CCDGNodeList orig  ) 
 

Copy constructor.


Member Function Documentation

void CCDGNodeList::Add_Exit CCDGNodeList exit  ) 
 

CCDGNodeList * CCDGNodeList::Add_Exit_Node  ) 
 

Adds a CCode node to the CCode list to include the exit block.

CCDGNodeList * CCDGNodeList::Add_Node char *  start,
bool  before
 

CCDGNodeList * CCDGNodeList::Add_Node char *  name,
NODE_TYPE  type,
TRUTH_VALUE_TYPE  tv
 

CCDGNodeList * CCDGNodeList::Add_Node CCDGNode p,
TRUTH_VALUE_TYPE  tv,
int  trunc = 0
 

Append a node p to the end of this list.

If this is null, return this node as the head of the list.

Parameters:
p Node to add.
tv predicate (truth) condition of node.
trunc Don't recall.
Returns:
Head of list, potentially updated if this was null.

CCDGNodeList * CCDGNodeList::Add_NodeList char *  start,
bool  before
 

CCDGNodeList * CCDGNodeList::Add_NodeList CCDGNodeList nl  ) 
 

void CCDGNodeList::Add_To_CFG_VCG_File char *  CFG_VCG_filename  ) 
 

CCDGNodeList * CCDGNodeList::Advance_To_Next_Guest CGuestInfo cur_gst,
GUEST_STATE_TYPE which_guest,
CCDGNode **  nxt_gst_node,
bool  skip_all_preds,
bool  skip_ABL_pred
 

bool CCDGNodeList::Already_Contains CCDGNode node  ) 
 

void CCDGNodeList::Append_Suffix_To_Names char *  str  ) 
 

Append the suffix str to the name of each basic block in this list.

Parameters:
str string to be appended.

CCDGNodeList * CCDGNodeList::Build_CDGs_for_Proc CCDGNodeList proc,
CCDGNodeList recent_nodes_end,
CCDGNodeList exit
 

CCDGNodeList * CCDGNodeList::Build_CDGs_From_Flat_Code  ) 
 

This function builds the Control Flow Graph of the code which has been stored in the CCode/CCDGNodeList.

The resulting structure will be the CCode/CCDGNodeList blocks arranged in the form of a CFG.

CCDGNodeList * CCDGNodeList::Build_CDGs_via_CFGs char *  filename  ) 
 

Constructs a CDG by first building a CFG.

Parameters:
filename 
Returns:
Control Dependence Graph.

CCDGNodeList* CCDGNodeList::Build_CDGs_via_CFGs  ) 
 

CFG_Node * CCDGNodeList::Build_CFG_Node_Tree int *  n,
CFG_Node parent,
CFG_Node prev
 

Performs the first step in the construction of the CDGs.

it creates the DFS tree for the CFG formed and creates the CFG_Node s for the CCode nodes. computation is done using the CFG_Node s and the CCode nodes are not affected

void CCDGNodeList::Build_CFG_VCG int  i,
bool  f
 

void CCDGNodeList::Build_CFG_VCG int  i  ) 
 

void CCDGNodeList::Build_CFG_VCG_File int  i,
bool  f,
char *  CFG_VCG_filename
 

Counts the number of nodes written to the VCG file when generating the graphical representation of the CFG.

void CCDGNodeList::Build_CFG_VCG_File int  i,
char *  CFG_VCG_filename
 

CCDGNodeList * CCDGNodeList::Build_CFGs_and_CDGs CCDGNodeList latest_procs,
char *  source_filename
 

This method builds CFGs and then CDGs out of the nodes contained in this list.

It also generates CFG and CDG graph files (.vcg/.gdl) for visualization.

Returns:
a list of procedures in CDG form.

void CCDGNodeList::Build_CFGs_From_Flat_Code  ) 
 

this function builds the CFGs from the CCode list

Returns:
CCDGNodeList pointer

void CCDGNodeList::Close_CFG_VCG_File char *  CFG_VCG_filename  ) 
 

CCDGNodeList * CCDGNodeList::Compute_Code_End bool  begin  ) 
 

void CCDGNodeList::Convert_Local_Labels_And_Branches  ) 
 

void CCDGNodeList::Convert_PC_Relative_Branches  ) 
 

CCDGNodeList * CCDGNodeList::Copy_Subgraph  ) 
 

Create a copy of the subgraph rooted by this node.

Returns:
subgraph including this and all of its children.

long CCDGNodeList::Count_Instrs  ) 
 

void CCDGNodeList::Do_STA bool  include_guest = TRUE  ) 
 

void CCDGNodeList::Embed_CSource  ) 
 

void CCDGNodeList::Extract_Dirs char *  asm_filename  ) 
 

void CCDGNodeList::Find_Blocking_IO_Loops  ) 
 

CCDGNode * CCDGNodeList::Find_Common_Ancestor  ) 
 

CCDGNode * CCDGNodeList::Find_Node const char *  name,
NODE_TYPE  type,
bool  dir_forward = true
 

CCDGNode * CCDGNodeList::Find_Node_Before_Inc const char *  name,
NODE_TYPE  type,
CCDGNodeList end_lp
 

CCDGNode * CCDGNodeList::Find_Node_Skipping_Here void   ) 
 

CCDGNode * CCDGNodeList::Find_Nodes_Branching_Here CCDGNode node,
CCDGNodeList **  nodelist,
bool  find_all
 

CCDGNode * CCDGNodeList::Find_Nodes_Branching_Here char *  name,
CCDGNodeList **  nodelist,
bool  find_all
 

void CCDGNodeList::Find_Segments long  max_jitter  ) 
 

void CCDGNodeList::Find_Vars  ) 
 

void CCDGNodeList::Fix_Branch_Targets  ) 
 

void CCDGNodeList::Fix_Call_Nodes  ) 
 

void CCDGNodeList::Fix_Infinite_Blocks CCDGNodeList start,
CCDGNodeList exit
 

void CCDGNodeList::Fix_Short_Branches  ) 
 

void CCDGNodeList::Gen_Code char *  orig_filename  ) 
 

void CCDGNodeList::Gen_GnuPlot_Driver char *  orig_filename,
PLOT_TYPE  plot
 

void CCDGNodeList::Gen_Graphs  ) 
 

void CCDGNodeList::Gen_Jitter_Plots char *  base_filename  ) 
 

char * CCDGNodeList::Get_Function_Name  ) 
 

Infinite_Nodes * CCDGNodeList::Get_Infinite_Nodes  ) 
 

CCDGNodeList * CCDGNodeList::Get_Last  ) 
 

char* CCDGNodeList::Get_Name  )  [inline]
 

CCDGNodeList* CCDGNodeList::Get_Next  )  [inline]
 

Gets the next CCDGNodeList in this list.

CCDGNode* CCDGNodeList::Get_Node  )  [inline]
 

CCDGNode * CCDGNodeList::Get_Node_With_Label char *  label  ) 
 

CFG_Node* CCDGNodeList::Get_Parent  )  [inline]
 

CCDGNodeList* CCDGNodeList::Get_Prev  )  [inline]
 

int CCDGNodeList::Get_Trunc  )  [inline]
 

TRUTH_VALUE_TYPE CCDGNodeList::Get_TV  )  [inline]
 

NODE_TYPE CCDGNodeList::Get_Type  )  [inline]
 

CCDGNodeList* CCDGNodeList::Guard int  reg,
int  bit,
bool  exec_condition
 

void CCDGNodeList::Handle_Ctrans  ) 
 

CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void CCDGNodeList::Handle_Default  ) 
 

void CCDGNodeList::Handle_Skip  ) 
 

CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void CCDGNodeList::Handle_Start  ) 
 

Performs the necessary steps to include the start node in the CFG.

void CCDGNodeList::Handle_Utrans  ) 
 

CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

CCDGNodeList * CCDGNodeList::Handle_Utrans_Return  ) 
 

CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

void CCDGNodeList::Handle_Utrans_Routine  ) 
 

CFG to CDG functions called to handle the steps for Uncondtional transfers, Skip instructions, Subroutine calls, Subroutine returns and Conditional transfers.

CCDGNodeList * CCDGNodeList::Insert_Node CCDGNode new_node,
CCDGNode ref,
bool  before,
TRUTH_VALUE_TYPE  tv = TV_ANY
 

void CCDGNodeList::Label_Nodes  ) 
 

CInstr * CCDGNodeList::MakeNormOp int  instrclass,
long  best,
long  worst,
char *  oper1 = NULL,
char *  oper2 = NULL,
char *  oper3 = NULL
 

Used in the parser to build a CInstr object.

CCDGNodeList * CCDGNodeList::New_Guard int  reg,
int  bit,
bool  exec_condition
 

int CCDGNodeList::Num_Nodes_Branching_Here CCDGNode node  ) 
 

int CCDGNodeList::Num_Nodes_Branching_Here char *  name  ) 
 

void CCDGNodeList::Open_CFG_VCG_File char *  CFG_VCG_filename  ) 
 

void CCDGNodeList::Output_Debug  ) 
 

void CCDGNodeList::Output_Debug_Names  ) 
 

void CCDGNodeList::Pad_Jitter bool  pad_host,
bool  pad_guest
 

void CCDGNodeList::Pad_Leaving_Loop_Intact long  cocall_period,
bool  look_for_unique_loop,
char *  loop_name_passed
 

void CCDGNodeList::Plot_Segments char *  base_filename  ) 
 

void CCDGNodeList::Pr_Info  ) 
 

void CCDGNodeList::Pr_Name  ) 
 

void CCDGNodeList::Pr_Type  ) 
 

void CCDGNodeList::Prepare_Pad_And_Transform_Loop CCDGNode cur_node,
long  cocall_period,
CPred final_pred,
bool  loop_specific_code
 

void CCDGNodeList::Print_Directives  ) 
 

CCDGNode * CCDGNodeList::Process_Multiple_Merge_Points CCDGNode node  ) 
 

void CCDGNodeList::Reallocate_Regs REALLOC_TYPE  realloc_method  ) 
 

CCDGNodeList * CCDGNodeList::Remove_Node CCDGNode p  ) 
 

CCDGNodeList * CCDGNodeList::Remove_Node int  number  ) 
 

void CCDGNodeList::Reset_Infinite_Nodes  ) 
 

void CCDGNodeList::Set_Name char *  p_name  ) 
 

Set the name of this node to p_name, unless it's a null pointer or too long.

void CCDGNodeList::Set_Next CCDGNodeList next  )  [inline]
 

Adds a node after this node.

NOTE: If the Next pointer has already been set for this node, that value will be lost.

Parameters:
next The node list to add after this node list.

void CCDGNodeList::Set_Node CCDGNode node  )  [inline]
 

void CCDGNodeList::Set_Parent CFG_Node p_parent  )  [inline]
 

void CCDGNodeList::Set_Prev CCDGNodeList prev  )  [inline]
 

void CCDGNodeList::Set_Trunc int  trunc  )  [inline]
 

void CCDGNodeList::Set_Visited bool  v  ) 
 

bool CCDGNodeList::Verify_Jumps_Can_Be_Ignored CCDGNode ret_node  ) 
 

void CCDGNodeList::Virtualize_Registers  ) 
 


Member Data Documentation

char CCDGNodeList::Name[STR_SIZE] [private]
 

Copy of Node's name.

CCDGNodeList* CCDGNodeList::Next [private]
 

Pointers for doubly-linked list.

CCDGNode* CCDGNodeList::Node [private]
 

Pointer to the CCDGNode which this refers to.

CFG_Node* CCDGNodeList::Parent [private]
 

Parent node, used during CFG formation but not afterwards.

CCDGNodeList * CCDGNodeList::Prev [private]
 

Pointers for doubly-linked list.

int CCDGNodeList::Trunc [private]
 

Can't recall.

TRUTH_VALUE_TYPE CCDGNodeList::TV [private]
 

Truth value (predicate) under which Node executes.

NODE_TYPE CCDGNodeList::Type [private]
 

What type Node is: CPred, CCode, etc.


The documentation for this class was generated from the following files:
Generated on Sat May 8 14:08:58 2004 for Thrint by doxygen 1.3.6