harpoon.Analysis.Quads
Class MemoryOptimization
java.lang.Object
harpoon.Analysis.Transformation.MethodMutator<Quad>
harpoon.Analysis.Quads.MemoryOptimization
- All Implemented Interfaces:
- Serializable
public final class MemoryOptimization
- extends MethodMutator<Quad>
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.7 2004/02/08 05:09:40 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- Serialized Form
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<Quad> mutateHCode(HCodeAndMaps<Quad> input)
- Description copied from class:
MethodMutator
- Override this method to effect transformations on split
methods.
- Overrides:
mutateHCode
in class MethodMutator<Quad>
cloneHCode
protected HCodeAndMaps<Quad> cloneHCode(HCode<Quad> 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<Quad>
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<Quad>