public abstract class SingleRunSubphase<C> extends BasePhase<C>
BasePhase whose instances may only be
applied once. An
error will be raised at runtime if a single instance of such a phase is applied more than once,
whether or not it is applied to the same graph as before.
Such phases are typically used as part of another phase, allocated and immediately applied like
this:
new SomeSubphase(some, context, information).apply(graph, options);or like this:
SomeSubphase mySubphase = new Subphase(some, context, information); mySubphase.apply(graph, options); mySubphase.getResults(); // process information computed by the phaseUnlike other subclasses of
BasePhase, such phases may retain internal state. Due to the
check for multiple applications, this state can only be used to communicate results to the
phase's client. It cannot be used to carry over state information to another run of the phase.BasePhase.ApplyScope, BasePhase.BasePhaseStatistics, BasePhase.PhaseOptions, BasePhase.SharedGlobalPhaseState| Constructor and Description |
|---|
SingleRunSubphase() |
| 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). |
apply, apply, codeSizeIncrease, contractorName, equals, getName, hashCode, run, shouldDumpAfterAtBasicLevel, shouldDumpBeforeAtBasicLevelclone, getClass, notify, notifyAll, toString, wait, wait, waitcheckContractprotected final BasePhase.ApplyScope applyScope(StructuredGraph graph, C context)
BasePhaseBasePhase.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>