public class ConstantTree extends PrintableDominatorOptimizationProblem<ConstantTree.Flags,ConstantTree.NodeCost>
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstantTree.Flags |
static class |
ConstantTree.NodeCost
Costs associated with a block.
|
| Modifier and Type | Field and Description |
|---|---|
private BlockMap<List<UseEntry>> |
blockMap |
| Constructor and Description |
|---|
ConstantTree(AbstractControlFlowGraph<?> cfg,
DefUseTree tree) |
| Modifier and Type | Method and Description |
|---|---|
void |
forEachPropertyPair(AbstractBlockBase<?> block,
BiConsumer<String,String> action)
Applies
action to all extra property pairs (name, value) of block. |
String |
getName(ConstantTree.Flags type)
Returns the name of a flag.
|
(package private) ConstantTree.NodeCost |
getOrInitCost(AbstractBlockBase<?> block)
Returns the cost object associated with
block. |
private List<UseEntry> |
getOrInitList(AbstractBlockBase<?> block) |
AbstractBlockBase<?> |
getStartBlock() |
List<UseEntry> |
getUsages(AbstractBlockBase<?> block) |
boolean |
isLeafBlock(AbstractBlockBase<?> block) |
boolean |
isMarked(AbstractBlockBase<?> block) |
void |
markBlocks() |
void |
setSolution(AbstractBlockBase<?> block) |
int |
size() |
long |
subTreeSize() |
void |
traverseTreeWhileTrue(AbstractBlockBase<?> block,
Predicate<AbstractBlockBase<?>> action) |
get, getBlockForId, getBlocks, getCost, getFlags, getFlagsForBlock, set, setCost, setDominatorPath, streamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlockspublic ConstantTree(AbstractControlFlowGraph<?> cfg, DefUseTree tree)
private List<UseEntry> getOrInitList(AbstractBlockBase<?> block)
public List<UseEntry> getUsages(AbstractBlockBase<?> block)
ConstantTree.NodeCost getOrInitCost(AbstractBlockBase<?> block)
block. If there is none, a new cost object is
created.public String getName(ConstantTree.Flags type)
DominatorOptimizationProblemgetName in class DominatorOptimizationProblem<ConstantTree.Flags,ConstantTree.NodeCost>public void forEachPropertyPair(AbstractBlockBase<?> block, BiConsumer<String,String> action)
PrintableCFGaction to all extra property pairs (name, value) of block.forEachPropertyPair in interface PrintableCFGforEachPropertyPair in class PrintableDominatorOptimizationProblem<ConstantTree.Flags,ConstantTree.NodeCost>block - a block from PrintableCFG.getBlocks().action - a consumer.public long subTreeSize()
public AbstractBlockBase<?> getStartBlock()
public void markBlocks()
public boolean isMarked(AbstractBlockBase<?> block)
public boolean isLeafBlock(AbstractBlockBase<?> block)
public void setSolution(AbstractBlockBase<?> block)
public int size()
public void traverseTreeWhileTrue(AbstractBlockBase<?> block, Predicate<AbstractBlockBase<?>> action)