coins.backend.ana
Class LiveVariableBitMap

java.lang.Object
  extended bycoins.backend.ana.DataFlowAnalysis
      extended bycoins.backend.ana.LiveVariableBitMap
All Implemented Interfaces:
LiveVariableAnalysis, LocalAnalysis

public class LiveVariableBitMap
extends DataFlowAnalysis
implements LiveVariableAnalysis

Live variable analysis. Set information is represented by bitmap vectors.


Field Summary
static coins.backend.ana.LiveVariableBitMap.Analyzer analyzer
          Factory singleton.
 
Fields inherited from class coins.backend.ana.DataFlowAnalysis
function, isForward, timeStamp
 
Method Summary
 void addLiveInSet(NumberSet x, BasicBlk blk)
          Add set of live variable numbers at entry to NumberSet x.
 void addLiveOutSet(NumberSet x, BasicBlk blk)
          Add set of live variable numbers at exit of block blk to NumberSet x.
(package private)  void confluence(BasicBlk blk)
          Supply confluence operator (=join at here) for block blk.
 void getLiveInSet(NumberSet x, BasicBlk blk)
          Copy set of live variable numbers at entry to NumberSet x.
 void getLiveOutSet(NumberSet x, BasicBlk blk)
          Copy set of live variable numbers at exit of block blk to NumberSet x.
(package private)  void initialize()
          Initialize problem-oriented data structure.
 boolean isLiveAtEntry(int regvar, BasicBlk blk)
          Return true if variable regvar is live at entry of blk.
 boolean isLiveAtEntry(Symbol regvar, BasicBlk blk)
          Return true if variable regvar is live at entry of blk.
 boolean isLiveAtExit(int regvar, BasicBlk blk)
          Return true if variable regvar is live at exit of blk.
 boolean isLiveAtExit(Symbol regvar, BasicBlk blk)
          Return true if variable regvar is live at exit of blk.
 BiList liveIn(BasicBlk blk)
          Return the list of live variables at entry of basic block blk.
 NumberSet liveInSet(BasicBlk blk)
          Return set of live variable numbers at entry of basic block.
 BiList liveOut(BasicBlk blk)
          Return the list of live variables at exit of basic block blk.
 NumberSet liveOutSet(BasicBlk blk)
          Return set of live variable numbers at exit of basic block.
 void printAfterBlock(BasicBlk blk, java.io.PrintWriter output)
          Called after each Basic Block.
 void printAfterFunction(java.io.PrintWriter output)
          Called after function body.
 void printAfterStmt(LirNode stmt, java.io.PrintWriter output)
          Called after each statement.
 void printBeforeBlock(BasicBlk blk, java.io.PrintWriter output)
          Called before each Basic Block.
 void printBeforeFunction(java.io.PrintWriter output)
          Debug print entries required by interface.
 void printBeforeStmt(LirNode stmt, java.io.PrintWriter output)
          Called before each statement.
(package private)  boolean transfer(BasicBlk blk)
          Supply transfer function for block blk.
(package private)  void windUp()
          Finalization.
 
Methods inherited from class coins.backend.ana.DataFlowAnalysis
isUpToDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface coins.backend.LocalAnalysis
isUpToDate
 

Field Detail

analyzer

public static final coins.backend.ana.LiveVariableBitMap.Analyzer analyzer
Factory singleton.

Method Detail

isLiveAtEntry

public boolean isLiveAtEntry(Symbol regvar,
                             BasicBlk blk)
Return true if variable regvar is live at entry of blk.

Specified by:
isLiveAtEntry in interface LiveVariableAnalysis

isLiveAtEntry

public boolean isLiveAtEntry(int regvar,
                             BasicBlk blk)
Return true if variable regvar is live at entry of blk.

Specified by:
isLiveAtEntry in interface LiveVariableAnalysis

isLiveAtExit

public boolean isLiveAtExit(Symbol regvar,
                            BasicBlk blk)
Return true if variable regvar is live at exit of blk.

Specified by:
isLiveAtExit in interface LiveVariableAnalysis

isLiveAtExit

public boolean isLiveAtExit(int regvar,
                            BasicBlk blk)
Return true if variable regvar is live at exit of blk.

Specified by:
isLiveAtExit in interface LiveVariableAnalysis

liveOut

public BiList liveOut(BasicBlk blk)
Return the list of live variables at exit of basic block blk.

Specified by:
liveOut in interface LiveVariableAnalysis

liveIn

public BiList liveIn(BasicBlk blk)
Return the list of live variables at entry of basic block blk.

Specified by:
liveIn in interface LiveVariableAnalysis

liveInSet

public NumberSet liveInSet(BasicBlk blk)
Return set of live variable numbers at entry of basic block.

Specified by:
liveInSet in interface LiveVariableAnalysis

liveOutSet

public NumberSet liveOutSet(BasicBlk blk)
Return set of live variable numbers at exit of basic block.

Specified by:
liveOutSet in interface LiveVariableAnalysis

getLiveOutSet

public void getLiveOutSet(NumberSet x,
                          BasicBlk blk)
Copy set of live variable numbers at exit of block blk to NumberSet x.

Specified by:
getLiveOutSet in interface LiveVariableAnalysis

addLiveOutSet

public void addLiveOutSet(NumberSet x,
                          BasicBlk blk)
Add set of live variable numbers at exit of block blk to NumberSet x.

Specified by:
addLiveOutSet in interface LiveVariableAnalysis

getLiveInSet

public void getLiveInSet(NumberSet x,
                         BasicBlk blk)
Copy set of live variable numbers at entry to NumberSet x.

Specified by:
getLiveInSet in interface LiveVariableAnalysis

addLiveInSet

public void addLiveInSet(NumberSet x,
                         BasicBlk blk)
Add set of live variable numbers at entry to NumberSet x.

Specified by:
addLiveInSet in interface LiveVariableAnalysis

initialize

void initialize()
Initialize problem-oriented data structure.

Specified by:
initialize in class DataFlowAnalysis

confluence

void confluence(BasicBlk blk)
Supply confluence operator (=join at here) for block blk.

Specified by:
confluence in class DataFlowAnalysis

transfer

boolean transfer(BasicBlk blk)
Supply transfer function for block blk.

Specified by:
transfer in class DataFlowAnalysis

windUp

void windUp()
Finalization.

Specified by:
windUp in class DataFlowAnalysis

printBeforeFunction

public void printBeforeFunction(java.io.PrintWriter output)
Debug print entries required by interface.

Specified by:
printBeforeFunction in interface LocalAnalysis

printBeforeBlock

public void printBeforeBlock(BasicBlk blk,
                             java.io.PrintWriter output)
Description copied from interface: LocalAnalysis
Called before each Basic Block.

Specified by:
printBeforeBlock in interface LocalAnalysis

printAfterBlock

public void printAfterBlock(BasicBlk blk,
                            java.io.PrintWriter output)
Description copied from interface: LocalAnalysis
Called after each Basic Block.

Specified by:
printAfterBlock in interface LocalAnalysis

printBeforeStmt

public void printBeforeStmt(LirNode stmt,
                            java.io.PrintWriter output)
Description copied from interface: LocalAnalysis
Called before each statement.

Specified by:
printBeforeStmt in interface LocalAnalysis

printAfterStmt

public void printAfterStmt(LirNode stmt,
                           java.io.PrintWriter output)
Description copied from interface: LocalAnalysis
Called after each statement.

Specified by:
printAfterStmt in interface LocalAnalysis

printAfterFunction

public void printAfterFunction(java.io.PrintWriter output)
Description copied from interface: LocalAnalysis
Called after function body.

Specified by:
printAfterFunction in interface LocalAnalysis