harpoon.Analysis.Quads
Class MemoryOptimization
java.lang.Object
|
+--harpoon.Analysis.Transformation.MethodMutator
|
+--harpoon.Analysis.Quads.MemoryOptimization
- All Implemented Interfaces:
- Serializable
- public final class MemoryOptimization
- extends MethodMutator
MemoryOptimization
reduces the number of memory operations
by combining multiple loads/stores to the same field/array element.
It should be safe with respect to the revised Java memory model.
- Version:
- $Id: MemoryOptimization.java,v 1.3 2002/02/26 22:41:41 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- Serialized Form
Method Summary |
protected HCodeAndMaps |
cloneHCode(HCode hc,
HMethod newmethod)
Override this method if you do not want the mutatable HCode to be
a straight clone of the original HCode: for example, if the
input HCodes were QuadSSI and you wanted to
clone them into QuadRSSI s before mutating. |
protected String |
mutateCodeName(String codeName)
Override this method to change the codename which this
MethodMutator 's codefactory reports. |
protected HCode |
mutateHCode(HCodeAndMaps input)
Override this method to effect transformations on split
methods. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryOptimization
public MemoryOptimization(HCodeFactory parent,
ClassHierarchy ch,
CallGraph cg)
mutateHCode
protected HCode mutateHCode(HCodeAndMaps input)
- Description copied from class:
MethodMutator
- Override this method to effect transformations on split
methods.
- Overrides:
mutateHCode
in class MethodMutator
cloneHCode
protected HCodeAndMaps cloneHCode(HCode hc,
HMethod newmethod)
- Description copied from class:
MethodMutator
- Override this method if you do not want the mutatable HCode to be
a straight clone of the original HCode: for example, if the
input HCodes were
QuadSSI
and you wanted to
clone them into QuadRSSI
s before mutating.
By default, this method returns hc.clone(newmethod)
.
- Overrides:
cloneHCode
in class MethodMutator
mutateCodeName
protected String mutateCodeName(String codeName)
- Description copied from class:
MethodMutator
- Override this method to change the codename which this
MethodMutator
's codefactory reports.
- Overrides:
mutateCodeName
in class MethodMutator