Class SSACache


  • public class SSACache
    extends Object
    A mapping from IMethod -> SSAOptions -> SoftReference -> Something This doesn't work very well ... GCs don't do such a great job with SoftReferences ... revamp it.
    • Constructor Detail

      • SSACache

        public SSACache​(IRFactory<IMethod> factory)
        Parameters:
        factory - a factory for creating IRs
    • Method Detail

      • findOrCreateIR

        public IR findOrCreateIR​(IMethod m,
                                 Context c,
                                 SSAOptions options)
        Parameters:
        m - a "normal" (bytecode-based) method
        options - options governing ssa construction
        Returns:
        an IR for m, built according to the specified options. null if m is abstract or native.
        Throws:
        IllegalArgumentException - if m is null
      • findOrCreateDU

        public DefUse findOrCreateDU​(IMethod m,
                                     Context c,
                                     SSAOptions options)
        Parameters:
        m - a method
        options - options governing ssa construction
        Returns:
        DefUse information for m, built according to the specified options. null if unavailable
        Throws:
        IllegalArgumentException - if m is null
      • wipe

        public void wipe()
        The existence of this is unfortunate.
      • invalidateIR

        public void invalidateIR​(IMethod method,
                                 Context c)
        Invalidate the cached IR for a pair
      • invalidateDU

        public void invalidateDU​(IMethod method,
                                 Context c)
        Invalidate the cached DefUse for a pair
      • invalidate

        public void invalidate​(IMethod method,
                               Context c)
        Invalidate all cached information for a pair