public final class SmallLocalLiveness extends LocalLiveness
Modifier and Type | Field and Description |
---|---|
private long[] |
localsChangedInLoop |
private long[] |
localsLiveGen |
private long[] |
localsLiveIn |
private long[] |
localsLiveKill |
private long[] |
localsLiveOut |
private int |
maxLocals |
blocks
Constructor and Description |
---|
SmallLocalLiveness(BciBlockMapping.BciBlock[] blocks,
int maxLocals,
int loopCount) |
Modifier and Type | Method and Description |
---|---|
protected String |
debugLiveGen(int blockID)
Returns a string representation of the liveGen values of the given block.
|
protected String |
debugLiveIn(int blockID)
Returns a string representation of the liveIn values of the given block.
|
protected String |
debugLiveKill(int blockID)
Returns a string representation of the liveKill values of the given block.
|
protected String |
debugLiveOut(int blockID)
Returns a string representation of the liveOut values of the given block.
|
private String |
debugString(long value) |
protected int |
liveOutCardinality(int blockID)
Returns the number of live locals at the end of the given block.
|
protected void |
loadOne(int blockID,
int local)
Adds the local to liveGen if it wasn't already killed in this block.
|
boolean |
localIsChangedInLoop(int loopId,
int local)
Returns whether the local is set in the given loop.
|
boolean |
localIsLiveIn(BciBlockMapping.BciBlock block,
int local)
Returns whether the local is live at the beginning of the given block.
|
boolean |
localIsLiveOut(BciBlockMapping.BciBlock block,
int local)
Returns whether the local is live at the end of the given block.
|
protected void |
propagateLiveness(int blockID,
int successorID)
Adds all locals the are in the liveIn of the successor to the liveOut of the block.
|
protected void |
storeOne(int blockID,
int local)
Add this local to liveKill if it wasn't already generated in this block.
|
protected void |
updateLiveness(int blockID)
Calculates a new liveIn for the given block from liveOut, liveKill and liveGen.
|
compute, computeLiveness
private final long[] localsLiveIn
private final long[] localsLiveOut
private final long[] localsLiveGen
private final long[] localsLiveKill
private final long[] localsChangedInLoop
private final int maxLocals
public SmallLocalLiveness(BciBlockMapping.BciBlock[] blocks, int maxLocals, int loopCount)
private String debugString(long value)
protected String debugLiveIn(int blockID)
LocalLiveness
debugLiveIn
in class LocalLiveness
protected String debugLiveOut(int blockID)
LocalLiveness
debugLiveOut
in class LocalLiveness
protected String debugLiveGen(int blockID)
LocalLiveness
debugLiveGen
in class LocalLiveness
protected String debugLiveKill(int blockID)
LocalLiveness
debugLiveKill
in class LocalLiveness
protected int liveOutCardinality(int blockID)
LocalLiveness
liveOutCardinality
in class LocalLiveness
protected void propagateLiveness(int blockID, int successorID)
LocalLiveness
propagateLiveness
in class LocalLiveness
protected void updateLiveness(int blockID)
LocalLiveness
updateLiveness
in class LocalLiveness
protected void loadOne(int blockID, int local)
LocalLiveness
loadOne
in class LocalLiveness
protected void storeOne(int blockID, int local)
LocalLiveness
storeOne
in class LocalLiveness
public boolean localIsLiveIn(BciBlockMapping.BciBlock block, int local)
LocalLiveness
localIsLiveIn
in class LocalLiveness
public boolean localIsLiveOut(BciBlockMapping.BciBlock block, int local)
LocalLiveness
localIsLiveOut
in class LocalLiveness
public boolean localIsChangedInLoop(int loopId, int local)
LocalLiveness
localIsChangedInLoop
in class LocalLiveness