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

CCode Class Reference

#include <nodes.h>

Inheritance diagram for CCode:

Inheritance graph
[legend]
List of all members.

Detailed Description

Node for storing code as a linked list of CInstr*'s.


Public Member Functions

 CCode ()
 CCode (char *name)
 CCode (const CCode &orig, CCDGNode &Parent)
 ~CCode ()
void Add_Instr_Frag (char *instr_frag)
void Add_Instr (CInstr *instr)
CInstr * Get_Instr ()
void Set_Instr (CInstr *instr)
CInstr * Get_Last_Instr ()
int Get_NumInstrs ()
void Set_NumInstrs ()
void Set_NumInstrs (int n)
void Inc_NumInstrs ()
CVarFind_Prev_Ref (int reg, CInstr *instr, bool local_instr, bool look_across_loop_back)
void Prepend_Instr (CInstr *instr)
void Make_Jump_Node (char *target, char *node_name_root)
CCDGNodeSplit (long when, bool when_is_offset=false)
CCodeSplit_After_Byte (int where)
CPredSplit_Off_Cond_Branch ()
CCodeSplit_Off_Uncond_Branch ()
bool Contains_Call (void)
CCallSplit_Off_Call (void)
void Set_Size (void)
CTimeRangeGet_Duration (bool include_unknown_loop_iter)
void Output_Code (ostream &stream)
void Output_VCG (ostream &stream)
void Make_Loop_Control_Var_Fuser (CLoop *guest_loop, CLoop *host_loop)
CCodeGet_Next_Pred (CCode *cur)
CCodeGet_Next_Succ (CCode *cur)
CCodeGet_Next_Succ (CCode *cur, bool value)
bool Add_Pred (CCode *p)
bool Add_Succ (CCode *p)
void Clear_Pred_Succ ()
void Set_Is_Infinite_Block ()
void Reset_Is_Infinite_Block ()
bool Is_Infinite_Block ()
void Set_Visited ()
void Reset_Visited ()
bool Is_Visited ()
bool Is_Succ_Empty ()
bool Is_Succ_Present (CCode *node)
 Checks if node is present in the successor list of the CCode block.

void Set_Node_List (CCDGNodeList *p_node_list)
CCDGNodeListGet_Node_List ()
bool Has_2_Succ ()
bool Has_Succ (CCode *node)
void DFS_Search (bool is_start)
 This function performs the DFS search of the CFG and marks the nodes which will be executed.

void Mark_Infinite_Blocks ()

Private Attributes

CInstr * Instr
 Linked list of instructions.

int NumInstrs
 Number of instructions in this.

CCodePred [MAX_PREDECESSORS]
 Predecessors and successors, used only for CFG.

CCodeSucc [MAX_SUCCESSORS]
 Predecessors and successors, used only for CFG.

CCDGNodeListnode_list
 Don't recall -- added by student.

bool Infinite_Block
 Is in infinite loop.

bool Visited
 Flag for traversal.


Constructor & Destructor Documentation

CCode::CCode  )  [inline]
 

CCode::CCode char *  name  )  [inline]
 

CCode::CCode const CCode orig,
CCDGNode Parent
 

CCode::~CCode  ) 
 


Member Function Documentation

void CCode::Add_Instr CInstr *  instr  ) 
 

void CCode::Add_Instr_Frag char *  instr_frag  ) 
 

bool CCode::Add_Pred CCode p  ) 
 

bool CCode::Add_Succ CCode p  ) 
 

void CCode::Clear_Pred_Succ  ) 
 

bool CCode::Contains_Call void   ) 
 

void CCode::DFS_Search bool  is_start  ) 
 

This function performs the DFS search of the CFG and marks the nodes which will be executed.

This function is used to eliminate deadcode.

Parameters:
is_start should be set to true when this fuction is first called.

CVar * CCode::Find_Prev_Ref int  reg,
CInstr *  instr,
bool  local_instr,
bool  look_across_loop_back
 

CTimeRange * CCode::Get_Duration bool  include_unknown_loop_iter  ) 
 

Reimplemented from CCDGNode.

CInstr* CCode::Get_Instr  )  [inline]
 

CInstr* CCode::Get_Last_Instr  )  [inline]
 

CCode * CCode::Get_Next_Pred CCode cur  ) 
 

CCode* CCode::Get_Next_Succ CCode cur,
bool  value
 

CCode * CCode::Get_Next_Succ CCode cur  ) 
 

CCDGNodeList* CCode::Get_Node_List  )  [inline]
 

int CCode::Get_NumInstrs  )  [inline]
 

Reimplemented from CCDGNode.

bool CCode::Has_2_Succ  )  [inline]
 

bool CCode::Has_Succ CCode node  )  [inline]
 

void CCode::Inc_NumInstrs  )  [inline]
 

bool CCode::Is_Infinite_Block  )  [inline]
 

bool CCode::Is_Succ_Empty  ) 
 

bool CCode::Is_Succ_Present CCode node  ) 
 

Checks if node is present in the successor list of the CCode block.

bool CCode::Is_Visited  )  [inline]
 

void CCode::Make_Jump_Node char *  target,
char *  node_name_root
 

void CCode::Make_Loop_Control_Var_Fuser CLoop guest_loop,
CLoop host_loop
 

void CCode::Mark_Infinite_Blocks  ) 
 

void CCode::Output_Code ostream &  stream  ) 
 

Reimplemented from CCDGNode.

void CCode::Output_VCG ostream &  stream  ) 
 

Reimplemented from CCDGNode.

void CCode::Prepend_Instr CInstr *  instr  )  [inline]
 

void CCode::Reset_Is_Infinite_Block  )  [inline]
 

void CCode::Reset_Visited  )  [inline]
 

void CCode::Set_Instr CInstr *  instr  )  [inline]
 

void CCode::Set_Is_Infinite_Block  )  [inline]
 

void CCode::Set_Node_List CCDGNodeList p_node_list  )  [inline]
 

void CCode::Set_NumInstrs int  n  )  [inline]
 

void CCode::Set_NumInstrs  ) 
 

void CCode::Set_Size void   )  [virtual]
 

Reimplemented from CCDGNode.

void CCode::Set_Visited  )  [inline]
 

CCDGNode * CCode::Split long  when,
bool  when_is_offset = false
 

CCode * CCode::Split_After_Byte int  where  ) 
 

CCall * CCode::Split_Off_Call void   ) 
 

CPred * CCode::Split_Off_Cond_Branch  ) 
 

CCode * CCode::Split_Off_Uncond_Branch  ) 
 


Member Data Documentation

bool CCode::Infinite_Block [private]
 

Is in infinite loop.

CInstr* CCode::Instr [private]
 

Linked list of instructions.

CCDGNodeList* CCode::node_list [private]
 

Don't recall -- added by student.

int CCode::NumInstrs [private]
 

Number of instructions in this.

CCode* CCode::Pred[MAX_PREDECESSORS] [private]
 

Predecessors and successors, used only for CFG.

Stale after CDG code motion begins.

CCode * CCode::Succ[MAX_SUCCESSORS] [private]
 

Predecessors and successors, used only for CFG.

Stale after CDG code motion begins.

bool CCode::Visited [private]
 

Flag for traversal.

Reimplemented from CCDGNode.


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