C-Breeze
C Compiler Infrastructure

[ Project home page]

udduChains Class Reference

Data structure to store ud and du chains. More...

#include <udduChains.h>

List of all members.

Public Types

typedef list< threeAddrNode * > threeAddr_list

Public Member Functions

 udduChains (void)
void add (exprNode *use, threeAddrNode *def, stmtNode *useSite=NULL)
 Adds an ud/du chain, togather with an optional use site.
threeAddr_list defs (exprNode *use) const
 Query all defs for a given use.
expr_list uses (threeAddrNode *def) const
 Query all uses for a given def.
stmt_list useSites (threeAddrNode *def) const
 Query all use sites for a given def.
void reset ()
 Clear all chains.

Private Attributes

map< exprNode *, threeAddr_listud_chain
map< threeAddrNode *, expr_listdu_chain
map< threeAddrNode *, stmt_listdu_site_chain


Detailed Description

Data structure to store ud and du chains.

This data structure provides a generic and simple way to represent ud and du chains. The data structure is almost symmetric, so that each ud chain corresponds to a du chain, and vice versa. Each def is represented by a threeAddrNode, and each use is represented either by idNode, or an operandNode. The use site, the statement where the use is, is optionally stored as well.

The exception to the above invariant is when the data structure is used to store reaching defintiions, where an ambiguous definition is represented by a NULL threeAddrNode.

Definition at line 57 of file udduChains.h.


Member Typedef Documentation

typedef list<threeAddrNode*> udduChains::threeAddr_list
 

Definition at line 59 of file udduChains.h.


Constructor & Destructor Documentation

udduChains::udduChains void   )  [inline]
 

Definition at line 67 of file udduChains.h.


Member Function Documentation

void udduChains::add exprNode use,
threeAddrNode def,
stmtNode useSite = NULL
[inline]
 

Adds an ud/du chain, togather with an optional use site.

Definition at line 72 of file udduChains.h.

References contain, du_chain, du_site_chain, and ud_chain.

threeAddr_list udduChains::defs exprNode use  )  const [inline]
 

Query all defs for a given use.

Definition at line 83 of file udduChains.h.

References ud_chain.

void udduChains::reset  )  [inline]
 

Clear all chains.

Definition at line 104 of file udduChains.h.

References du_chain, du_site_chain, and ud_chain.

expr_list udduChains::uses threeAddrNode def  )  const [inline]
 

Query all uses for a given def.

Definition at line 90 of file udduChains.h.

References du_chain.

stmt_list udduChains::useSites threeAddrNode def  )  const [inline]
 

Query all use sites for a given def.

Definition at line 97 of file udduChains.h.

References du_site_chain.


Member Data Documentation

map<threeAddrNode*,expr_list> udduChains::du_chain [private]
 

Definition at line 63 of file udduChains.h.

Referenced by add(), reset(), and uses().

map<threeAddrNode*,stmt_list> udduChains::du_site_chain [private]
 

Definition at line 64 of file udduChains.h.

Referenced by add(), reset(), and useSites().

map<exprNode*,threeAddr_list> udduChains::ud_chain [private]
 

Definition at line 62 of file udduChains.h.

Referenced by add(), defs(), and reset().


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

Generated on February 1, 2006
Back to the C-Breeze home page