coins.ssa
Class SsaSymTab

java.lang.Object
  extended bycoins.ssa.SsaSymTab

class SsaSymTab
extends java.lang.Object

The symbol table of SSA variables.


Field Summary
static java.lang.String DUMMY_FUNC
           
(package private)  int nPhyRegs
           
(package private)  EnumRegVars rn
           
 
Constructor Summary
(package private) SsaSymTab(SsaEnvironment e, Function f)
          Constructor
Create a new symbol table in the SSA form.
 
Method Summary
(package private)  int compare(Symbol s1, Symbol s2)
          Compare the specified two symbols.
(package private)  Symbol currentAddressSymbol(Symbol s)
          Get the current symbol of the FRAME or the STATIC node.
 boolean isPhyReg(Symbol s)
           
(package private)  Symbol newAddressSymbol(Symbol s)
          Get a new symbol of the FRAME node or the STATIC node.
(package private)  Symbol newGlobalSymbol(java.lang.String name)
           
(package private)  Symbol newSsaSymbol(java.lang.String name, int type)
          Get a new symbol of the SSA variable.
(package private)  Symbol newSsaSymbol(Symbol s)
          Get a new symbol of the SSA variable.
(package private)  Symbol newSsaSymbol1(Symbol s)
          Called from TranslateToSsa.
(package private)  Symbol orgSym(Symbol s)
          Get the original symbol of the specified symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rn

EnumRegVars rn

nPhyRegs

int nPhyRegs

DUMMY_FUNC

public static final java.lang.String DUMMY_FUNC
See Also:
Constant Field Values
Constructor Detail

SsaSymTab

SsaSymTab(SsaEnvironment e,
          Function f)
Constructor
Create a new symbol table in the SSA form. Initialize all local variables in the current function.

Parameters:
e - The environment of the SSA module
f - The current function
Method Detail

compare

int compare(Symbol s1,
            Symbol s2)
Compare the specified two symbols.

Parameters:
s1 - The first specified symbol
s2 - The second specified symbol
Returns:
If s1 and s2 are the same, return 0. If s1 has the large suffix number, then return 1. Otherwise return -1.

orgSym

Symbol orgSym(Symbol s)
Get the original symbol of the specified symbol.

Parameters:
s - The specified symbol
Returns:
Original symbol of the specified one

newAddressSymbol

Symbol newAddressSymbol(Symbol s)
Get a new symbol of the FRAME node or the STATIC node.

Parameters:
s - The old symbol
Returns:
A new symbol

currentAddressSymbol

Symbol currentAddressSymbol(Symbol s)
Get the current symbol of the FRAME or the STATIC node.

Parameters:
s - The specified symbol
Returns:
The current symbol for the specified symbol

newSsaSymbol

Symbol newSsaSymbol(Symbol s)
Get a new symbol of the SSA variable.

Parameters:
s - The old symbol
Returns:
A new symbol of the SSA variable

newSsaSymbol1

Symbol newSsaSymbol1(Symbol s)
Called from TranslateToSsa. Get a new symbol of the SSA variable.

Parameters:
s - The old symbol
Returns:
A new symbol of the SSA variable

isPhyReg

public boolean isPhyReg(Symbol s)

newGlobalSymbol

Symbol newGlobalSymbol(java.lang.String name)

newSsaSymbol

Symbol newSsaSymbol(java.lang.String name,
                    int type)
Get a new symbol of the SSA variable.

Parameters:
name - The base name of the symbol
type - The type of the symbol
Returns:
A new symbol of the SSA variable