public abstract class EffectsClosure<BlockT extends EffectsBlockState<BlockT>> extends EffectsPhase.Closure<BlockT>
Modifier and Type | Class and Description |
---|---|
protected class |
EffectsClosure.MergeProcessor |
Modifier and Type | Field and Description |
---|---|
protected NodeMap<ValueNode> |
aliases |
protected BlockMap<GraphEffectList> |
blockEffects |
protected ControlFlowGraph |
cfg |
protected boolean |
changed |
private NodeBitMap |
hasScalarReplacedInputs |
private Map<LoopBeginNode,BlockT> |
loopEntryStates |
private Map<Loop<Block>,GraphEffectList> |
loopMergeEffects |
protected SchedulePhase |
schedule |
Constructor and Description |
---|
EffectsClosure(SchedulePhase schedule,
ControlFlowGraph cfg) |
cloneState, getInitialState
protected final ControlFlowGraph cfg
protected final SchedulePhase schedule
protected final BlockMap<GraphEffectList> blockEffects
private final Map<Loop<Block>,GraphEffectList> loopMergeEffects
private final Map<LoopBeginNode,BlockT extends EffectsBlockState<BlockT>> loopEntryStates
private final NodeBitMap hasScalarReplacedInputs
protected boolean changed
public EffectsClosure(SchedulePhase schedule, ControlFlowGraph cfg)
public boolean hasChanged()
hasChanged
in class EffectsPhase.Closure<BlockT extends EffectsBlockState<BlockT>>
public final void applyEffects()
applyEffects
in class EffectsPhase.Closure<BlockT extends EffectsBlockState<BlockT>>
protected BlockT processBlock(Block block, BlockT state)
processBlock
in class ReentrantBlockIterator.BlockIteratorClosure<BlockT extends EffectsBlockState<BlockT>>
private static boolean isSignificantNode(Node node)
protected abstract boolean processNode(Node node, BlockT state, GraphEffectList effects, FixedWithNextNode lastFixedNode)
true
if the effects include removing the node, false
otherwise.protected BlockT merge(Block merge, List<BlockT> states)
merge
in class ReentrantBlockIterator.BlockIteratorClosure<BlockT extends EffectsBlockState<BlockT>>
protected final List<BlockT> processLoop(Loop<Block> loop, BlockT initialState)
processLoop
in class ReentrantBlockIterator.BlockIteratorClosure<BlockT extends EffectsBlockState<BlockT>>
protected void processInitialLoopState(Loop<Block> loop, BlockT initialState)
private void doMergeWithoutDead(EffectsClosure.MergeProcessor mergeProcessor, List<BlockT> states)
private boolean assertExitStatesNonEmpty(Loop<Block> loop, ReentrantBlockIterator.LoopInfo<BlockT> info)
protected abstract void processLoopExit(LoopExitNode exitNode, BlockT initialState, BlockT exitState, GraphEffectList effects)
protected abstract EffectsClosure.MergeProcessor createMergeProcessor(Block merge)
public void addScalarAlias(ValueNode node, ValueNode alias)
protected final boolean hasScalarReplacedInputs(Node node)
public ValueNode getScalarAlias(ValueNode node)