|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.driver.CompilerPhase org.jikesrvm.compilers.opt.hir2lir.ExpandRuntimeServices
public final class ExpandRuntimeServices
As part of the expansion of HIR into LIR, this compile phase replaces all HIR operators that are implemented as calls to VM service routines with CALLs to those routines. For some (common and performance critical) operators, we may optionally inline expand the call (depending on the the values of the relevant compiler options and/or Controls). This pass is also responsible for inserting write barriers if we are using an allocator that requires them. Write barriers are always inline expanded.
Field Summary | |
---|---|
private Simple |
_os
Cache of simple optimizations if used to tidy up |
private BranchOptimizations |
branchOpts
Cache of branch optimizations if used to tidy up |
private static Constructor<CompilerPhase> |
constructor
Constructor for this compiler phase |
private boolean |
didSomething
Did we expand something? |
Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
---|
container |
Constructor Summary | |
---|---|
ExpandRuntimeServices()
|
Method Summary | |
---|---|
Constructor<CompilerPhase> |
getClassConstructor()
Get a constructor object for this compiler phase |
String |
getName()
|
private void |
inline(Instruction inst,
IR ir)
Inline a call instruction |
private void |
inline(Instruction inst,
IR ir,
boolean noCalleeExceptions)
Inline a call instruction |
void |
perform(IR ir)
Given an HIR, expand operators that are implemented as calls to runtime service methods. |
private void |
primitiveArrayStoreHelper(RVMMethod target,
Instruction inst,
Instruction next,
IR ir)
Helper method to generate call to primitive arrayStore write barrier |
private void |
primitiveObjectFieldStoreHelper(RVMMethod target,
Instruction inst,
Instruction next,
IR ir,
FieldReference fieldRef)
Helper method to generate call to primitive putfield write barrier |
void |
reportAdditionalStats()
Called when printing a measure compilation report to enable a phase to report additional phase-specific statistics. |
boolean |
shouldPerform(OptOptions options)
This method determines if the phase should be run, based on the Options object it is passed. |
Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
---|
dumpIR, dumpIR, getCompilerPhaseConstructor, getCompilerPhaseConstructor, newExecution, performPhase, printingEnabled, setContainer, verify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Simple _os
private BranchOptimizations branchOpts
private boolean didSomething
private static final Constructor<CompilerPhase> constructor
Constructor Detail |
---|
public ExpandRuntimeServices()
Method Detail |
---|
public Constructor<CompilerPhase> getClassConstructor()
getClassConstructor
in class CompilerPhase
public boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform
in class CompilerPhase
options
- the compiler options for the compilation
public String getName()
getName
in class CompilerPhase
public void reportAdditionalStats()
CompilerPhase
reportAdditionalStats
in class CompilerPhase
public void perform(IR ir)
perform
in class CompilerPhase
ir
- The HIR to expandprivate void inline(Instruction inst, IR ir)
private void inline(Instruction inst, IR ir, boolean noCalleeExceptions)
private void primitiveArrayStoreHelper(RVMMethod target, Instruction inst, Instruction next, IR ir)
target
- entry point for write barrier methodinst
- the current instructionnext
- the next instructionir
- the IRprivate void primitiveObjectFieldStoreHelper(RVMMethod target, Instruction inst, Instruction next, IR ir, FieldReference fieldRef)
target
- entry point for write barrier methodinst
- the current instructionnext
- the next instructionir
- the IR
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |