harpoon.Analysis.PointerAnalysis
Class ODMAInfo

java.lang.Object
  |
  +--harpoon.Analysis.PointerAnalysis.ODMAInfo
All Implemented Interfaces:
AllocationInformation, Serializable

public class ODMAInfo
extends Object
implements AllocationInformation, Serializable

ODMAInfo

Version:
$Id: ODMAInfo.java,v 1.3 2002/02/26 22:41:20 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class harpoon.Analysis.Maps.AllocationInformation
AllocationInformation.AllocationProperties
 
Field Summary
static boolean DO_METHOD_INLINING
          Enabless the application of some method inlining to increase the effectiveness of the stack allocation.
static boolean DO_PREALLOCATION
          Enables the use of preallocation: if an object will be accessed only by a thread (ie it is created just to pass some parameters to a thread), it can be preallocated into the heap of that thread.
static int MAX_INLINING_SIZE
          Only methods that have less than MAX_INLINING_SIZE instructions can be inlined.
static boolean MEM_OPTIMIZATION
           
static boolean NO_TG
          Forces the allocation of ALL the threads on the stack.
static Map Nodes2Status
           
static int nStudiedNode
           
static boolean SYNC_ELIM
           
 
Constructor Summary
ODMAInfo(ODPointerAnalysis pa, HCodeFactory hcf, Set mms, boolean USE_INTER_THREAD, boolean DO_STACK_ALLOCATION, boolean DO_THREAD_ALLOCATION, boolean GEN_SYNC_FLAG)
          Creates a ODMAInfo.
 
Method Summary
 void analyze_call(MetaMethod mm, HMethod hole)
           
 void analyze_mm(MetaMethod mm)
           
 void analyze_mm(MetaMethod mm, PANode node, boolean tryThread)
          Only try to stack allocate the node given as second argument.
 void analyze_mm(MetaMethod mm, Set nodes)
           
 void analyze()
           
 boolean analyzeholes(ODParIntGraph pig, MetaMethod current_mmethod, PANode node)
           
 boolean captured(ODParIntGraph pig, MetaMethod current_mmethod, PANode node)
           
 boolean captured(ODParIntGraph pig, MetaMethod current_mmethod, PANode node, boolean methodcapture)
           
 boolean captured(ODParIntGraph pig, MetaMethod current_mmethod, PANode node, boolean methodcapture, boolean verbose)
           
static void do_additional_testing(HCodeFactory hcf)
           
 void do_the_inlining()
           
 void generate_inlining_hints(MetaMethod mm, Set candidates, Set winners, MetaMethod mcaller, CALL cs)
           
 HClass getAllocatedType(HCodeElement hce)
           
 MyAP getAPObj(Quad q)
           
 void prepareForSerialization()
          Nullifies some stuff to make the serialization possible.
 void print()
          Pretty printer for debug.
 AllocationInformation.AllocationProperties query(HCodeElement allocationSite)
          Returns the allocation policy for allocationSite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO_METHOD_INLINING

public static boolean DO_METHOD_INLINING
Enabless the application of some method inlining to increase the effectiveness of the stack allocation. Only inlinings that increase the effectiveness of the stack allocation are done. For the time being, only 1-level inlining is done.


MAX_INLINING_SIZE

public static int MAX_INLINING_SIZE
Only methods that have less than MAX_INLINING_SIZE instructions can be inlined. Just a simple way of preventing the code bloat.


DO_PREALLOCATION

public static boolean DO_PREALLOCATION
Enables the use of preallocation: if an object will be accessed only by a thread (ie it is created just to pass some parameters to a thread), it can be preallocated into the heap of that thread. For the moment, it is potentially dangerous so it is deactivated by default.


NO_TG

public static boolean NO_TG
Forces the allocation of ALL the threads on the stack. Of course, dummy and unsafe.


Nodes2Status

public static Map Nodes2Status

nStudiedNode

public static int nStudiedNode

SYNC_ELIM

public static boolean SYNC_ELIM

MEM_OPTIMIZATION

public static boolean MEM_OPTIMIZATION
Constructor Detail

ODMAInfo

public ODMAInfo(ODPointerAnalysis pa,
                HCodeFactory hcf,
                Set mms,
                boolean USE_INTER_THREAD,
                boolean DO_STACK_ALLOCATION,
                boolean DO_THREAD_ALLOCATION,
                boolean GEN_SYNC_FLAG)
Creates a ODMAInfo.

Method Detail

prepareForSerialization

public void prepareForSerialization()
Nullifies some stuff to make the serialization possible. This method MUST be called before serializing this object.


query

public AllocationInformation.AllocationProperties query(HCodeElement allocationSite)
Returns the allocation policy for allocationSite.

Specified by:
query in interface AllocationInformation

analyze

public void analyze()

getAllocatedType

public HClass getAllocatedType(HCodeElement hce)

analyze_mm

public final void analyze_mm(MetaMethod mm)

analyze_mm

public final void analyze_mm(MetaMethod mm,
                             Set nodes)

analyze_mm

public final void analyze_mm(MetaMethod mm,
                             PANode node,
                             boolean tryThread)
Only try to stack allocate the node given as second argument.


getAPObj

public MyAP getAPObj(Quad q)

print

public void print()
Pretty printer for debug.


do_additional_testing

public static void do_additional_testing(HCodeFactory hcf)

generate_inlining_hints

public void generate_inlining_hints(MetaMethod mm,
                                    Set candidates,
                                    Set winners,
                                    MetaMethod mcaller,
                                    CALL cs)

do_the_inlining

public void do_the_inlining()

captured

public boolean captured(ODParIntGraph pig,
                        MetaMethod current_mmethod,
                        PANode node)

analyzeholes

public boolean analyzeholes(ODParIntGraph pig,
                            MetaMethod current_mmethod,
                            PANode node)

captured

public boolean captured(ODParIntGraph pig,
                        MetaMethod current_mmethod,
                        PANode node,
                        boolean methodcapture)

captured

public boolean captured(ODParIntGraph pig,
                        MetaMethod current_mmethod,
                        PANode node,
                        boolean methodcapture,
                        boolean verbose)

analyze_call

public void analyze_call(MetaMethod mm,
                         HMethod hole)