|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.driver.CompilerPhase
org.jikesrvm.compilers.opt.ssa.PiNodes
public final class PiNodes
This pass inserts PI nodes (Effectively copies) on branch edges, to introduce new names for analysis
| Field Summary | |
|---|---|
(package private) static boolean |
CHECK_REF_PI
Should we insert PI nodes for array references after bounds-checks and null-checks? |
private static Constructor<CompilerPhase> |
constructor
Constructor for this compiler phase |
(package private) boolean |
insertion
Should we insert (true) or delete (false) PI nodes? |
(package private) boolean |
typeChecks
Are we adding pi nodes for type checks only? |
| Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
container |
| Constructor Summary | |
|---|---|
PiNodes(boolean insert)
Create the phase. |
|
PiNodes(boolean insert,
boolean typeChecks)
Create the phase. |
|
| Method Summary | |
|---|---|
(package private) static void |
cleanUp(IR ir)
Change all PI nodes to INT_MOVE instructions Side effect: invalidates SSA state |
Constructor<CompilerPhase> |
getClassConstructor()
Get a constructor object for this compiler phase |
static Instruction |
getGenerator(Instruction def)
Get the instruction a Pi node is linked to. |
String |
getName()
A String representation of this phase |
private void |
insertPiBcNodes(IR ir)
Insert Pi nodes for boundchecks. |
private void |
insertPiCheckCastNodes(IR ir)
Insert Pi nodes for checkcast operations. |
private void |
insertPiIfNodes(IR ir)
Insert PI nodes corresponding to compare operations. |
private void |
insertPiNullCheckNodes(IR ir)
Insert Pi nodes for null check operations. |
static boolean |
isBoundsCheckPi(Instruction def)
Is an instruction a Pi node linked to a bounds-check? |
static boolean |
isNotTakenPi(Instruction def)
Is an instruction a Pi node linked to the not taken edge of a conditional branch instruction? |
static boolean |
isNullCheckPi(Instruction def)
Is an instruction a Pi node linked to a null-check? |
static boolean |
isTakenPi(Instruction def)
Is an instruction a Pi node linked to the taken edge of a conditional branch instruction? |
void |
perform(IR ir)
Perform the transformation. |
boolean |
printingEnabled(OptOptions options,
boolean before)
Should we print the IR either before or after this phase? |
boolean |
shouldPerform(OptOptions options)
Should this phase be performed? |
| Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
dumpIR, dumpIR, getCompilerPhaseConstructor, getCompilerPhaseConstructor, newExecution, performPhase, reportAdditionalStats, setContainer, verify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final boolean CHECK_REF_PI
final boolean insertion
final boolean typeChecks
private static final Constructor<CompilerPhase> constructor
| Constructor Detail |
|---|
public PiNodes(boolean insert)
insert - If true, we insert PI nodes, If false, we remove them.
public PiNodes(boolean insert,
boolean typeChecks)
insert - If true, we insert PI nodes, If false, we remove them.typeChecks - If true, we insert PI nodes only for type checks.| Method Detail |
|---|
public boolean shouldPerform(OptOptions options)
shouldPerform in class CompilerPhaseoptions - controlling compiler options
public Constructor<CompilerPhase> getClassConstructor()
getClassConstructor in class CompilerPhasepublic String getName()
getName in class CompilerPhase
public boolean printingEnabled(OptOptions options,
boolean before)
printingEnabled in class CompilerPhaseoptions - controlling compiler optionsbefore - control for the query
public void perform(IR ir)
perform in class CompilerPhaseir - the IR to optimizeprivate void insertPiIfNodes(IR ir)
ir - the governing IRprivate void insertPiBcNodes(IR ir)
Each boundcheck Arr, Index will be followed by
PI Index, Index
ir - the governing IRprivate void insertPiNullCheckNodes(IR ir)
Each checkcast obj will be followed by
PI obj, obj
ir - the governing IRprivate void insertPiCheckCastNodes(IR ir)
Each checkcast obj will be followed by
ref_move obj, obj
ir - the governing IRstatic void cleanUp(IR ir)
Side effect: invalidates SSA state
ir - the governing IRpublic static Instruction getGenerator(Instruction def)
public static boolean isNotTakenPi(Instruction def)
public static boolean isTakenPi(Instruction def)
public static boolean isBoundsCheckPi(Instruction def)
public static boolean isNullCheckPi(Instruction def)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||