public final class GraphState extends Object
StructuredGraph
state with respect to compilation.
This state is defined by fields which represent
GraphState.StageFlag
), which verification is performed by FrameState
s (see
GraphState.FrameStateVerification
))DeoptimizingNode
s can
be introduced (see GraphState.GuardsStage
), if the graph contains nodes that require a stage to be
applied on the graph (see GraphState.getFutureRequiredStages()
))Modifier and Type | Class and Description |
---|---|
static class |
GraphState.FrameStateVerification
The different stages of the compilation of a
Graph regarding the status of
FrameState verification of AbstractStateSplit state after. |
static class |
GraphState.FrameStateVerificationFeature
Different node types verified during GraphState.FrameStateVerification.
|
static class |
GraphState.GuardsStage
The different stages of the compilation of a
Graph regarding the status of
GuardNode s, DeoptimizingNode s and FrameState s. |
static class |
GraphState.MandatoryStages
Represents the necessary stages that must be applied to a
StructuredGraph for a
complete compilation depending on the compiler configuration chosen. |
static class |
GraphState.StageFlag
Different stages of the compilation regarding the status of various graph properties.
|
Modifier and Type | Field and Description |
---|---|
static EnumSet<GraphState.StageFlag> |
INITIAL_REQUIRED_STAGES
This set of
GraphState.StageFlag s represents the stages a StructuredGraph initially
requires to correctly pass all the other stages of the compilation. |
Constructor and Description |
---|
GraphState(GraphState.StageFlag currentStage,
boolean disabledFrameStateVerification,
boolean isSubstitution,
EnumSet<GraphState.StageFlag> futureRequiredStages,
GraphState.GuardsStage guardsStage,
SpeculationLog speculationLog,
EnumSet<GraphState.StageFlag> stageFlags)
Creates a
GraphState with the given fields. |
GraphState(GraphState.StageFlag currentStage,
boolean disabledFrameStateVerification,
GraphState.FrameStateVerification frameStateVerification,
EnumSet<GraphState.StageFlag> futureRequiredStages,
GraphState.GuardsStage guardsStage,
SpeculationLog speculationLog,
EnumSet<GraphState.StageFlag> stageFlags)
Creates a
GraphState with the given fields. |
public static final EnumSet<GraphState.StageFlag> INITIAL_REQUIRED_STAGES
GraphState.StageFlag
s represents the stages a StructuredGraph
initially
requires to correctly pass all the other stages of the compilation. (See
GraphState.getFutureRequiredStages()
)public GraphState(GraphState.StageFlag currentStage, boolean disabledFrameStateVerification, boolean isSubstitution, EnumSet<GraphState.StageFlag> futureRequiredStages, GraphState.GuardsStage guardsStage, SpeculationLog speculationLog, EnumSet<GraphState.StageFlag> stageFlags)
GraphState
with the given fields.isSubstitution
- determines this frame state
verification. GraphState.FrameStateVerification.NONE
is used if it is true
,
otherwise it is GraphState.FrameStateVerification.ALL
. If it is true
,
GraphState.isFrameStateVerificationDisabled()
will be true
.public GraphState(GraphState.StageFlag currentStage, boolean disabledFrameStateVerification, GraphState.FrameStateVerification frameStateVerification, EnumSet<GraphState.StageFlag> futureRequiredStages, GraphState.GuardsStage guardsStage, SpeculationLog speculationLog, EnumSet<GraphState.StageFlag> stageFlags)
GraphState
with the given fields.guardsStage
- the GraphState.GuardsStage
of this graph state,
GraphState.GuardsStage.FLOATING_GUARDS
if it is null
.public static GraphState defaultGraphState()
GraphState
with guards stage set to
GraphState.GuardsStage.FLOATING_GUARDS
, empty EnumSet
for stage flags and future required stages,
frame state verification set to
GraphState.FrameStateVerification.ALL
and null
for the other fields.public GraphState copy()
public GraphState copyWith(boolean isSubstitution, SpeculationLog speculationLogForCopy)
isSubstitution
- determines the copy's frame
state verification. (See
GraphState.GraphState(StageFlag, boolean, boolean, EnumSet, GuardsStage, SpeculationLog, EnumSet)
)public String toString(String prefix)
String
with this guards stage,
stage flags, frame
state verification and future required stages.prefix
- the string inserted at the beginning of each line of the resulting string.public String updateFromPreviousToString(GraphState previous)
String
representing the differences between this
guards stage, stage flags,
frame state verification and
future required stages and previous
's
respective fields. If this
GraphState.equals(java.lang.Object)
previous
, an empty string is
returned.public SpeculationLog getSpeculationLog()
SpeculationLog
used to perform speculative operations on this graph.public boolean isFrameStateVerificationDisabled()
true
if GraphState.forceDisableFrameStateVerification()
or
StructuredGraph.clearAllStateAfterForTestingOnly()
has been called or if this
graph was build as a substitution (see
GraphState.GraphState(StageFlag, boolean, boolean, EnumSet, GuardsStage, SpeculationLog, EnumSet)
).public GraphState.FrameStateVerification getFrameStateVerification()
FrameState
verification of AbstractStateSplit
state
after.public boolean canWeakenFrameStateVerification(GraphState.FrameStateVerification stage)
GraphState.FrameStateVerification
. Verification can only be relaxed over
the course of compilation.public void weakenFrameStateVerification(GraphState.FrameStateVerification newFrameStateVerification)
GraphState.FrameStateVerification
as this
frame state verification.public void forceDisableFrameStateVerification()
GraphState.weakenFrameStateVerification(FrameStateVerification)
to
progress through the standard stages of frame state verification. Calling this method is
not equivalent to calling weakenFrameStateVerification(NONE)
.public GraphState.GuardsStage getGuardsStage()
GraphState.GuardsStage
for this graph state.public void setGuardsStage(GraphState.GuardsStage guardsStage)
GraphState.GuardsStage
needs to indicate a progression in the compilation, not a regression.public void setAfterFSA()
GraphState.setGuardsStage(GuardsStage)
and
GraphState.setAfterStage(StageFlag)
)public boolean isBeforeStage(GraphState.StageFlag stage)
GraphState.isDuringStage(StageFlag)
) nor have been applied yet (see
GraphState.isAfterStage(StageFlag)
).public boolean isDuringStage(GraphState.StageFlag stage)
GraphState.isAfterStage(StageFlag)
may become true for a stage even if
GraphState.isDuringStage(StageFlag)
was never set for that stage.public boolean isAfterStage(GraphState.StageFlag stage)
public boolean isAfterStages(EnumSet<GraphState.StageFlag> stages)
public void setDuringStage(GraphState.StageFlag stage)
GraphState.currentStage
to indicate that a stage is in progress. This stage must not
have been applied yet.public void setAfterStage(GraphState.StageFlag stage)
public EnumSet<GraphState.StageFlag> getStageFlags()
GraphState.StageFlag
) that were applied to this graph.public boolean hasAllMandatoryStages(GraphState.MandatoryStages mandatoryStages)
GraphState.MandatoryStages
have been applied
to this graph.public int countMissingStages(EnumSet<GraphState.StageFlag> targetStages)
targetStages
but not in the
stage flags of this graph state.public void addFutureStageRequirement(GraphState.StageFlag stage)
GraphState.StageFlag
to the future
required stages of this graph state.public void removeRequirementToStage(GraphState.StageFlag stage)
GraphState.StageFlag
from this graph state.public boolean requiresFutureStage(GraphState.StageFlag stage)
GraphState.StageFlag
is contained in this graph state's
future required stages.public boolean requiresFutureStages()
GraphState.StageFlag
s requirements in
future required stages.public EnumSet<GraphState.StageFlag> getFutureRequiredStages()