public abstract class PostRunCanonicalizationPhase<C extends CoreProviders> extends BasePhase<C>
CanonicalizerPhase.applyIncremental(org.graalvm.compiler.nodes.StructuredGraph, org.graalvm.compiler.nodes.spi.CoreProviders, org.graalvm.compiler.graph.Graph.Mark)
to a graph after the phase has been applied if the graph changed.BasePhase.ApplyScope, BasePhase.BasePhaseStatistics, BasePhase.NotApplicable, BasePhase.PhaseOptions, BasePhase.SharedGlobalPhaseState
Modifier and Type | Field and Description |
---|---|
protected CanonicalizerPhase |
canonicalizer |
ALWAYS_APPLICABLE
Constructor and Description |
---|
PostRunCanonicalizationPhase(CanonicalizerPhase canonicalizer)
Primary constructor for incremental canonicalization.
|
Modifier and Type | Method and Description |
---|---|
protected BasePhase.ApplyScope |
applyScope(StructuredGraph graph,
C context)
Return an
BasePhase.ApplyScope which will surround all the work performed by the call to
BasePhase.run(org.graalvm.compiler.nodes.StructuredGraph, C) in BasePhase.apply(StructuredGraph, Object, boolean) . |
Optional<BasePhase.NotApplicable> |
canApply(GraphState graphState)
Checks if all the preconditions to
BasePhase.apply(StructuredGraph, Object, boolean) the phase
are met. |
void |
updateGraphState(GraphState graphState)
Applies all the changes on the
GraphState caused by
BasePhase.apply(StructuredGraph, Object, boolean) . |
apply, apply, codeSizeIncrease, contractorName, equals, getName, hashCode, mustApply, run, shouldDumpAfterAtBasicLevel, shouldDumpBeforeAtBasicLevel
clone, getClass, notify, notifyAll, toString, wait, wait, wait
checkContract
protected final CanonicalizerPhase canonicalizer
public PostRunCanonicalizationPhase(CanonicalizerPhase canonicalizer)
CanonicalizerPhase
protected BasePhase.ApplyScope applyScope(StructuredGraph graph, C context)
BasePhase
BasePhase.ApplyScope
which will surround all the work performed by the call to
BasePhase.run(org.graalvm.compiler.nodes.StructuredGraph, C)
in BasePhase.apply(StructuredGraph, Object, boolean)
. This allows subclaseses to
inject work which will performed before and after the application of this phase.applyScope
in class BasePhase<C extends CoreProviders>
public Optional<BasePhase.NotApplicable> canApply(GraphState graphState)
BasePhase
BasePhase.apply(StructuredGraph, Object, boolean)
the phase
are met.canApply
in class BasePhase<C extends CoreProviders>
graphState
- represents the state of the StructuredGraph
used for compilation
and contains the required information to determine if a phase can be applied.Optional.empty()
if all the checks pass, Optional#of(NotApplicable)
containing why this phase is not applicable on this graphState
otherwise.public void updateGraphState(GraphState graphState)
BasePhase
GraphState
caused by
BasePhase.apply(StructuredGraph, Object, boolean)
.updateGraphState
in class BasePhase<C extends CoreProviders>
graphState
- represents the state of the StructuredGraph
used for compilation.