public class FinalCanonicalizerPhase extends CanonicalizerPhase
CanonicalizerPhase
. After the application of this phase, no further
canonicalizations should be made to a StructuredGraph
. See
CanonicalizerTool.finalCanonicalization()
for more details.CanonicalizerPhase.CanonicalizerFeature, CanonicalizerPhase.CustomSimplification, CanonicalizerPhase.Tool
BasePhase.ApplyScope, BasePhase.BasePhaseStatistics, BasePhase.NotApplicable, BasePhase.PhaseOptions, BasePhase.SharedGlobalPhaseState
customSimplification, features, MAX_ITERATION_PER_NODE
ALWAYS_APPLICABLE
Modifier | Constructor and Description |
---|---|
protected |
FinalCanonicalizerPhase(CanonicalizerPhase.CustomSimplification customSimplification,
EnumSet<CanonicalizerPhase.CanonicalizerFeature> features) |
Modifier and Type | Method and Description |
---|---|
Optional<BasePhase.NotApplicable> |
canApply(GraphState graphState)
Checks if all the preconditions to
BasePhase.apply(StructuredGraph, Object, boolean) the phase
are met. |
FinalCanonicalizerPhase |
copyWithCustomSimplification(CanonicalizerPhase.CustomSimplification newSimplification) |
FinalCanonicalizerPhase |
copyWithoutGVN() |
FinalCanonicalizerPhase |
copyWithoutSimplification() |
static FinalCanonicalizerPhase |
createFromCanonicalizer(CanonicalizerPhase canonicalizer) |
protected boolean |
isFinalCanonicalizationPhase() |
void |
updateGraphState(GraphState graphState)
Applies all the changes on the
GraphState caused by
BasePhase.apply(StructuredGraph, Object, boolean) . |
applyIncremental, applyIncremental, checkContract, create, createWithoutCFGSimplification, createWithoutGVN, createWithoutReadCanonicalization, equals, getCanonicalizeReads, hashCode, mustApply, processWorkSet, run, tryCanonicalize, tryGlobalValueNumbering
apply, apply, applyScope, codeSizeIncrease, contractorName, getName, shouldDumpAfterAtBasicLevel, shouldDumpBeforeAtBasicLevel
protected FinalCanonicalizerPhase(CanonicalizerPhase.CustomSimplification customSimplification, EnumSet<CanonicalizerPhase.CanonicalizerFeature> features)
protected boolean isFinalCanonicalizationPhase()
isFinalCanonicalizationPhase
in class CanonicalizerPhase
public FinalCanonicalizerPhase copyWithCustomSimplification(CanonicalizerPhase.CustomSimplification newSimplification)
copyWithCustomSimplification
in class CanonicalizerPhase
public FinalCanonicalizerPhase copyWithoutGVN()
copyWithoutGVN
in class CanonicalizerPhase
public FinalCanonicalizerPhase copyWithoutSimplification()
copyWithoutSimplification
in class CanonicalizerPhase
public static FinalCanonicalizerPhase createFromCanonicalizer(CanonicalizerPhase canonicalizer)
public Optional<BasePhase.NotApplicable> canApply(GraphState graphState)
BasePhase
BasePhase.apply(StructuredGraph, Object, boolean)
the phase
are met.canApply
in class CanonicalizerPhase
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 CanonicalizerPhase
graphState
- represents the state of the StructuredGraph
used for compilation.