public abstract class LocalLiveness extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BciBlockMapping.BciBlock[] |
blocks |
| Modifier | Constructor and Description |
|---|---|
protected |
LocalLiveness(BciBlockMapping mapping,
boolean asyncLiveness) |
| Modifier and Type | Method and Description |
|---|---|
static LocalLiveness |
compute(DebugContext debug,
BytecodeStream stream,
BciBlockMapping mapping,
int maxLocals,
int loopCount,
boolean asyncLiveness) |
protected abstract String |
debugLiveGen(int blockID)
Returns a string representation of the liveGen values of the given block.
|
protected abstract String |
debugLiveIn(int blockID)
Returns a string representation of the liveIn values of the given block.
|
protected abstract String |
debugLiveKill(int blockID)
Returns a string representation of the liveKill values of the given block.
|
protected abstract String |
debugLiveOut(int blockID)
Returns a string representation of the liveOut values of the given block.
|
protected abstract int |
liveAsyncCardinality(int blockID)
Returns the number of live async locals for the given block.
|
protected abstract int |
liveOutCardinality(int blockID)
Returns the number of live locals at the end of the given block.
|
protected abstract void |
loadOne(int blockID,
int local)
Adds the local to liveGen if it wasn't already killed in this block.
|
abstract boolean |
localIsChangedInLoop(int loopId,
int local)
Returns whether the local is set in the given loop.
|
abstract boolean |
localIsLiveIn(BciBlockMapping.BciBlock block,
int local)
Returns whether the local is live at the beginning of the given block.
|
abstract boolean |
localIsLiveOut(BciBlockMapping.BciBlock block,
int local)
Returns whether the local is live at the end of the given block.
|
protected abstract void |
propagateAsyncLiveness(int blockID,
int successorID)
Adds all locals that are in the liveIn of the successor to the liveAsync of the block.
|
protected abstract void |
propagateLiveness(int blockID,
int successorID)
Adds all locals that are in the liveIn of the successor to the liveOut of the block.
|
protected abstract void |
storeOne(int blockID,
int local)
Add this local to liveKill if it wasn't already generated in this block.
|
protected abstract void |
updateLiveness(int blockID)
Calculates a new liveIn for the given block from liveOut, liveKill, liveGen and liveAsync.
|
protected final BciBlockMapping.BciBlock[] blocks
protected LocalLiveness(BciBlockMapping mapping, boolean asyncLiveness)
public static LocalLiveness compute(DebugContext debug, BytecodeStream stream, BciBlockMapping mapping, int maxLocals, int loopCount, boolean asyncLiveness)
public abstract boolean localIsLiveIn(BciBlockMapping.BciBlock block, int local)
public abstract boolean localIsChangedInLoop(int loopId,
int local)
public abstract boolean localIsLiveOut(BciBlockMapping.BciBlock block, int local)
protected abstract String debugLiveIn(int blockID)
protected abstract String debugLiveOut(int blockID)
protected abstract String debugLiveGen(int blockID)
protected abstract String debugLiveKill(int blockID)
protected abstract int liveOutCardinality(int blockID)
protected abstract int liveAsyncCardinality(int blockID)
protected abstract void propagateLiveness(int blockID,
int successorID)
protected abstract void propagateAsyncLiveness(int blockID,
int successorID)
protected abstract void updateLiveness(int blockID)
protected abstract void loadOne(int blockID,
int local)
protected abstract void storeOne(int blockID,
int local)