harpoon.Analysis
Class ReachingDefsCachingImpl

java.lang.Object
  |
  +--harpoon.Analysis.ReachingDefs
        |
        +--harpoon.Analysis.ReachingDefsAltImpl
              |
              +--harpoon.Analysis.ReachingDefsCachingImpl

public class ReachingDefsCachingImpl
extends ReachingDefsAltImpl

ReachingDefsCachingImpl is an extension of ReachingDefsImpl that keeps a BasicBlock local cache mapping Temp:t -> HCodeElement:h -> Set:s where s is the result of calling reachingDefs(h, t). This way repeated queries in the same BasicBlock as the last query don't have to iterate over all the statements in the BasicBlock again.

Version:
$Id: ReachingDefsCachingImpl.java,v 1.2 2002/02/25 20:56:10 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Field Summary
 
Fields inherited from class harpoon.Analysis.ReachingDefsAltImpl
bbf, bsf, cache, check_typecast, tempToAllDefs, ud
 
Fields inherited from class harpoon.Analysis.ReachingDefs
hc, TIME
 
Constructor Summary
ReachingDefsCachingImpl(HCode hc)
          Creates a ReachingDefsCachingImpl.
ReachingDefsCachingImpl(HCode hc, CFGrapher c)
          Creates a ReachingDefsCachingImpl.
ReachingDefsCachingImpl(HCode hc, CFGrapher c, UseDefer ud)
          Creates a ReachingDefsCachingImpl.
 
Method Summary
 Set reachingDefs(HCodeElement hce, Temp t)
          Returns the Set of HCodeElements providing definitions of Temp t which reach HCodeElement hce.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReachingDefsCachingImpl

public ReachingDefsCachingImpl(HCode hc)
Creates a ReachingDefsCachingImpl.


ReachingDefsCachingImpl

public ReachingDefsCachingImpl(HCode hc,
                               CFGrapher c)
Creates a ReachingDefsCachingImpl.


ReachingDefsCachingImpl

public ReachingDefsCachingImpl(HCode hc,
                               CFGrapher c,
                               UseDefer ud)
Creates a ReachingDefsCachingImpl.

Method Detail

reachingDefs

public Set reachingDefs(HCodeElement hce,
                        Temp t)
Returns the Set of HCodeElements providing definitions of Temp t which reach HCodeElement hce.

Overrides:
reachingDefs in class ReachingDefsAltImpl