harpoon.Analysis.DataFlow
Class CachingLiveTemps

java.lang.Object
  extended by harpoon.Analysis.BasicBlockInterfVisitor
      extended by harpoon.Analysis.DataFlow.DataFlowBasicBlockVisitor
          extended by harpoon.Analysis.DataFlow.BackwardDataFlowBasicBlockVisitor
              extended by harpoon.Analysis.DataFlow.LiveVars.BBVisitor
                  extended by harpoon.Analysis.DataFlow.LiveTemps
                      extended by harpoon.Analysis.DataFlow.CachingLiveTemps

public class CachingLiveTemps
extends LiveTemps

CachingLiveTemps is an extension of LiveTemps that keeps a cache of the recent results that it calculated. The cache keeps the last few basic blocks accessed, along with the results of liveness analysis on all of the statements in the basic blocks.

Version:
$Id: CachingLiveTemps.java,v 1.4 2004/02/08 01:51:05 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor
LiveVars.BBVisitor.LiveVarInfo
 
Field Summary
 
Fields inherited from class harpoon.Analysis.DataFlow.LiveTemps
mySetFactory, ud
 
Fields inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor
bbFact
 
Constructor Summary
CachingLiveTemps(BasicBlock.Factory bbf, Set liveOnExit)
          Creates a CachingLiveTemps.
CachingLiveTemps(BasicBlock.Factory bbf, Set liveOnExit, SetFactory tempSetFact, UseDefer ud)
           
CachingLiveTemps(BasicBlock.Factory bbf, Set liveOnExit, UseDefer ud)
           
 
Method Summary
 String cachePerformance()
           
 Set getLiveAfter(HCodeElement hce)
          Returns the Set of Temps that are live on exit from hce.
static LiveTemps make(HCode code, Set liveOnExit)
           
 
Methods inherited from class harpoon.Analysis.DataFlow.LiveTemps
dumpElems, findUniverse, getLiveBefore, make, makeUseDef, solve
 
Methods inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor
dump, dump, getLiveOnEntry, getLiveOnExit, initializeBBtoLVI, merge, visit
 
Methods inherited from class harpoon.Analysis.DataFlow.BackwardDataFlowBasicBlockVisitor
addSuccessors
 
Methods inherited from class harpoon.Analysis.DataFlow.DataFlowBasicBlockVisitor
db, visit
 
Methods inherited from class harpoon.Analysis.BasicBlockInterfVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingLiveTemps

public CachingLiveTemps(BasicBlock.Factory bbf,
                        Set liveOnExit)
Creates a CachingLiveTemps.


CachingLiveTemps

public CachingLiveTemps(BasicBlock.Factory bbf,
                        Set liveOnExit,
                        UseDefer ud)

CachingLiveTemps

public CachingLiveTemps(BasicBlock.Factory bbf,
                        Set liveOnExit,
                        SetFactory tempSetFact,
                        UseDefer ud)
Method Detail

make

public static LiveTemps make(HCode code,
                             Set liveOnExit)

cachePerformance

public String cachePerformance()

getLiveAfter

public Set getLiveAfter(HCodeElement hce)
Description copied from class: LiveTemps
Returns the Set of Temps that are live on exit from hce.
requires: A DataFlow Equation Solver has been run to completion on the graph of BasicBlocks containing some block that contains hce, with this as the DataFlowBasicBlockVisitor.
effects: Returns a Set of Temps that are live on exit from hce.

Overrides:
getLiveAfter in class LiveTemps