coins.backend.ana
Class LiveVariableSlotwise

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

public class LiveVariableSlotwise
extends java.lang.Object
implements LocalAnalysis, LiveVariableAnalysis

Yet another live variable analysis. Analysis done by slotwise (each variables separately)


Field Summary
static coins.backend.ana.LiveVariableSlotwise.Analyzer analyzer
          Factory singleton.
 
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.
 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.
 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.
 boolean isUpToDate()
          Return true if this analysis is up to date.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

analyzer

public static final coins.backend.ana.LiveVariableSlotwise.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

isUpToDate

public boolean isUpToDate()
Return true if this analysis is up to date.

Specified by:
isUpToDate in interface LocalAnalysis

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