public final class TraceBuilder<T extends AbstractBlockBase<T>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TraceBuilder.TraceBuilderResult<T extends AbstractBlockBase<T>> |
Modifier and Type | Field and Description |
---|---|
private int[] |
blocked
Contains the number of unprocessed predecessors for every
block . |
private int[] |
blockToTrace |
private BitSet |
processed |
private PriorityQueue<T> |
worklist |
Modifier | Constructor and Description |
---|---|
private |
TraceBuilder(List<T> blocks) |
Modifier and Type | Method and Description |
---|---|
private TraceBuilder.TraceBuilderResult<T> |
build(T startBlock) |
protected ArrayList<List<T>> |
buildTraces(T startBlock) |
private static <T extends AbstractBlockBase<T>> |
compare(T a,
T b) |
static <T extends AbstractBlockBase<T>> |
computeTraces(T startBlock,
List<T> blocks)
Build traces of sequentially executed blocks.
|
private boolean |
processed(T b) |
private T |
selectNext(T currentBlock) |
private List<T> |
startTrace(T block,
int traceNumber)
Build a new trace starting at
block . |
private void |
unblock(T currentBlock)
Decrease the
blocked count for all predecessors and add them to the worklist once
the count reaches 0. |
private boolean |
verify(ArrayList<List<T>> traces) |
private final PriorityQueue<T extends AbstractBlockBase<T>> worklist
private final int[] blocked
block
.private final int[] blockToTrace
private TraceBuilder(List<T> blocks)
public static <T extends AbstractBlockBase<T>> TraceBuilder.TraceBuilderResult<T> computeTraces(T startBlock, List<T> blocks)
private static <T extends AbstractBlockBase<T>> int compare(T a, T b)
private TraceBuilder.TraceBuilderResult<T> build(T startBlock)
protected ArrayList<List<T>> buildTraces(T startBlock)
private List<T> startTrace(T block, int traceNumber)
block
.private void unblock(T currentBlock)
blocked
count for all predecessors and add them to the worklist once
the count reaches 0.private T selectNext(T currentBlock)
null
.