public final class BasicBlockOrderUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BasicBlockOrderUtils.BlockList<T extends AbstractBlockBase<T>>
A data structure combining an append-only list of blocks and a bit set for efficiently
checking which blocks have been added.
|
static class |
BasicBlockOrderUtils.BlockOrderComparator<T extends AbstractBlockBase<T>>
Comparator for sorting blocks based on loop depth and probability.
|
| Constructor and Description |
|---|
BasicBlockOrderUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
checkOrder(BasicBlockOrderUtils.BlockList<? extends AbstractBlockBase<?>> order,
int expectedBlockCount)
Checks that the ordering contains the expected number of blocks.
|
protected static <T extends AbstractBlockBase<T>> |
checkStartBlock(BasicBlockOrderUtils.BlockList<T> order,
T startBlock)
Checks that the ordering starts with the expected start block.
|
protected static <T extends AbstractBlockBase<T>> |
enqueueSuccessors(T block,
PriorityQueue<T> worklist,
BitSet visitedBlocks)
Add successor blocks into the given work list if they are not already marked as visited.
|
protected static <T extends AbstractBlockBase<T>> |
findAndMarkMostLikelySuccessor(T block,
BasicBlockOrderUtils.BlockList<T> order,
BitSet visitedBlocks)
Find the highest likely unvisited successor block of a given block.
|
protected static <T extends AbstractBlockBase<T>> |
findAndMarkMostLikelySuccessor(T block,
BasicBlockOrderUtils.BlockList<T> order,
BitSet visitedBlocks,
CodeEmissionOrder.ComputationTime computationTime,
PriorityQueue<T> worklist) |
protected static <T extends AbstractBlockBase<T>> |
initializeWorklist(T startBlock,
BitSet visitedBlocks)
Initializes the priority queue used for the work list of blocks and adds the start block.
|
protected static <T extends AbstractBlockBase<T>> PriorityQueue<T> initializeWorklist(T startBlock, BitSet visitedBlocks)
protected static boolean checkOrder(BasicBlockOrderUtils.BlockList<? extends AbstractBlockBase<?>> order, int expectedBlockCount)
protected static <T extends AbstractBlockBase<T>> boolean checkStartBlock(BasicBlockOrderUtils.BlockList<T> order, T startBlock)
protected static <T extends AbstractBlockBase<T>> T findAndMarkMostLikelySuccessor(T block, BasicBlockOrderUtils.BlockList<T> order, BitSet visitedBlocks)
protected static <T extends AbstractBlockBase<T>> T findAndMarkMostLikelySuccessor(T block, BasicBlockOrderUtils.BlockList<T> order, BitSet visitedBlocks, CodeEmissionOrder.ComputationTime computationTime, PriorityQueue<T> worklist)
protected static <T extends AbstractBlockBase<T>> void enqueueSuccessors(T block, PriorityQueue<T> worklist, BitSet visitedBlocks)