public class EscapeTransformations extends CompilerPhase
Modifier and Type | Field and Description |
---|---|
private static OptimizationPlanElement |
escapeCleanUp
Transforms to clean the IR prior to another round of escape transformations
|
container
Constructor and Description |
---|
EscapeTransformations() |
Modifier and Type | Method and Description |
---|---|
private AggregateReplacer |
getAggregateReplacer(Instruction inst,
IR ir)
Generate an object which will perform scalar replacement of
an aggregate allocated by a given instruction
PRECONDITION: objects returned by this allocation site do NOT escape
the current method
|
String |
getName() |
private UnsyncReplacer |
getUnsyncReplacer(Register reg,
Instruction inst,
IR ir)
Generate an object which transforms defs & uses of "synchronized"
objects to defs & uses of "unsynchronized" objects
PRECONDITION: objects pointed to by reg do NOT escape
|
CompilerPhase |
newExecution(IR ir)
Return this instance of this phase.
|
void |
perform(IR ir)
Perform the transformations
|
boolean |
printingEnabled(OptOptions options,
boolean before)
Returns true if the phase wants the IR dumped before and/or after it runs.
|
boolean |
shouldPerform(OptOptions options)
This method determines if the phase should be run, based on the
Options object it is passed.
|
private static boolean |
synchronizesOn(Register r)
Is there an instruction in this IR which causes synchronization
on an object pointed to by a particular register?
|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, reportAdditionalStats, setContainer, verify
private static final OptimizationPlanElement escapeCleanUp
public EscapeTransformations()
public CompilerPhase newExecution(IR ir)
newExecution
in class CompilerPhase
ir
- not usedpublic final boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform
in class CompilerPhase
options
- the compiler options for the compilationpublic final String getName()
getName
in class CompilerPhase
public final boolean printingEnabled(OptOptions options, boolean before)
CompilerPhase
printingEnabled
in class CompilerPhase
options
- the compiler options for the compilationbefore
- true when invoked before perform, false otherwise.public void perform(IR ir)
perform
in class CompilerPhase
ir
- IR for the target methodprivate UnsyncReplacer getUnsyncReplacer(Register reg, Instruction inst, IR ir)
PRECONDITION: objects pointed to by reg do NOT escape
reg
- the pointer whose defs and uses should be transformedinst
- the allocation siteir
- controlling irprivate static boolean synchronizesOn(Register r)
r
- the object's registerprivate AggregateReplacer getAggregateReplacer(Instruction inst, IR ir)
PRECONDITION: objects returned by this allocation site do NOT escape the current method
inst
- the allocation siteir
- controlling ir