private static final class ConstantLoadOptimization.Optimization extends Object
Modifier and Type | Field and Description |
---|---|
private BlockMap<List<UseEntry>> |
blockMap |
private BitSet |
defined |
private BlockMap<LIRInsertionBuffer> |
insertionBuffers |
private LIR |
lir |
private LIRGeneratorTool |
lirGen |
private VariableMap<DefUseTree> |
map |
private BitSet |
phiConstants |
Modifier | Constructor and Description |
---|---|
private |
Optimization(LIR lir,
LIRGeneratorTool lirGen) |
Modifier and Type | Method and Description |
---|---|
private void |
addUsageToBlockMap(UseEntry entry) |
private void |
analyzeBlock(AbstractBlockBase<?> block)
Collects def-use information for a
block . |
private void |
apply() |
private void |
createConstantTree(DefUseTree tree)
Creates the dominator tree and searches for an solution.
|
private void |
createLoads(DefUseTree tree,
ConstantTree constTree,
AbstractBlockBase<?> startBlock) |
private void |
deleteInstruction(DefUseTree tree) |
private LIRInsertionBuffer |
getInsertionBuffer(AbstractBlockBase<?> block) |
private void |
insertLoad(JavaConstant constant,
LIRKind kind,
AbstractBlockBase<?> block,
List<UseEntry> usages) |
private static boolean |
isConstantLoad(LIRInstruction inst) |
private void |
rewriteBlock(AbstractBlockBase<?> block)
Inserts the constant loads created in
createConstantTree(com.oracle.graal.lir.constopt.DefUseTree) and deletes the
original definition. |
private boolean |
verifyStates() |
private void |
verifyStateUsage(DefUseTree tree) |
private final LIRGeneratorTool lirGen
private final VariableMap<DefUseTree> map
private final BitSet phiConstants
private final BlockMap<LIRInsertionBuffer> insertionBuffers
private Optimization(LIR lir, LIRGeneratorTool lirGen)
private void apply()
private boolean verifyStates()
private void verifyStateUsage(DefUseTree tree)
private static boolean isConstantLoad(LIRInstruction inst)
private void addUsageToBlockMap(UseEntry entry)
private void analyzeBlock(AbstractBlockBase<?> block)
block
.private void createConstantTree(DefUseTree tree)
private void createLoads(DefUseTree tree, ConstantTree constTree, AbstractBlockBase<?> startBlock)
private void insertLoad(JavaConstant constant, LIRKind kind, AbstractBlockBase<?> block, List<UseEntry> usages)
private void rewriteBlock(AbstractBlockBase<?> block)
createConstantTree(com.oracle.graal.lir.constopt.DefUseTree)
and deletes the
original definition.private void deleteInstruction(DefUseTree tree)
private LIRInsertionBuffer getInsertionBuffer(AbstractBlockBase<?> block)