public class StructuredGraph extends Graph implements JavaMethodContext
start
node. This
node is the start of the control flow of the graph.Modifier and Type | Class and Description |
---|---|
static class |
StructuredGraph.AllowAssumptions
Constants denoting whether or not
Assumptions.Assumption s can be made while processing a graph. |
static class |
StructuredGraph.GuardsStage
The different stages of the compilation of a
Graph regarding the status of
guards , deoptimizations and framestates . |
private static class |
StructuredGraph.UnsafeAccessState |
Graph.DuplicationReplacement, Graph.Mark, Graph.NodeEvent, Graph.NodeEventListener, Graph.NodeEventScope, Graph.Options
Modifier and Type | Field and Description |
---|---|
private jdk.internal.jvmci.meta.Assumptions |
assumptions
The assumptions made while constructing and transforming this graph.
|
private int |
entryBCI |
private long |
graphId |
private StructuredGraph.GuardsStage |
guardsStage |
private StructuredGraph.UnsafeAccessState |
hasUnsafeAccess |
private boolean |
hasValueProxies |
private Map<jdk.internal.jvmci.meta.ResolvedJavaMethod,Integer> |
inlinedMethods
Records the methods that were inlined while constructing this graph along with how many times
each method was inlined.
|
static long |
INVALID_GRAPH_ID |
private boolean |
isAfterFloatingReadPhase |
private jdk.internal.jvmci.meta.ResolvedJavaMethod |
method |
private jdk.internal.jvmci.meta.SpeculationLog |
speculationLog |
private StartNode |
start |
private static AtomicLong |
uniqueGraphIds |
COMPRESSION_THRESHOLD, MODIFICATION_COUNTS_ENABLED, name
Modifier | Constructor and Description |
---|---|
|
StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method,
int entryBCI,
StructuredGraph.AllowAssumptions allowAssumptions,
jdk.internal.jvmci.meta.SpeculationLog speculationLog) |
|
StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method,
StructuredGraph.AllowAssumptions allowAssumptions) |
|
StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method,
StructuredGraph.AllowAssumptions allowAssumptions,
jdk.internal.jvmci.meta.SpeculationLog speculationLog) |
private |
StructuredGraph(String name,
jdk.internal.jvmci.meta.ResolvedJavaMethod method,
long graphId,
int entryBCI,
StructuredGraph.AllowAssumptions allowAssumptions,
jdk.internal.jvmci.meta.SpeculationLog speculationLog) |
|
StructuredGraph(String name,
jdk.internal.jvmci.meta.ResolvedJavaMethod method,
StructuredGraph.AllowAssumptions allowAssumptions)
Creates a new Graph containing a single
AbstractBeginNode as the start node. |
|
StructuredGraph(String name,
jdk.internal.jvmci.meta.ResolvedJavaMethod method,
StructuredGraph.AllowAssumptions allowAssumptions,
jdk.internal.jvmci.meta.SpeculationLog speculationLog) |
|
StructuredGraph(StructuredGraph.AllowAssumptions allowAssumptions)
Creates a new Graph containing a single
AbstractBeginNode as the start node. |
Modifier and Type | Method and Description |
---|---|
void |
addAfterFixed(FixedWithNextNode node,
FixedNode newNode) |
void |
addBeforeFixed(FixedNode node,
FixedWithNextNode newNode) |
jdk.internal.jvmci.meta.JavaMethod |
asJavaMethod() |
protected Graph |
copy(String newName,
Consumer<Map<Node,Node>> duplicationMapCallback)
Creates a copy of this graph.
|
void |
disableInlinedMethodRecording()
Disables method inlining recording while constructing this graph.
|
void |
disableUnsafeAccessTracking() |
jdk.internal.jvmci.meta.Assumptions |
getAssumptions()
Gets the object for recording assumptions while constructing of this graph.
|
int |
getBytecodeSize()
Gets the input bytecode size from which this
graph is constructed.
|
int |
getEntryBCI() |
StructuredGraph.GuardsStage |
getGuardsStage() |
Set<jdk.internal.jvmci.meta.ResolvedJavaMethod> |
getInlinedMethods()
Gets the methods that were inlined while constructing this graph.
|
Iterable<Invoke> |
getInvokes() |
ParameterNode |
getParameter(int index) |
Stamp |
getReturnStamp() |
jdk.internal.jvmci.meta.SpeculationLog |
getSpeculationLog() |
long |
graphId() |
boolean |
hasLoops() |
boolean |
hasUnsafeAccess() |
boolean |
hasValueProxies() |
boolean |
isAfterFloatingReadPhase() |
boolean |
isInlinedMethodRecordingEnabled() |
boolean |
isOSR() |
boolean |
isTrivial() |
boolean |
isUnsafeAccessTrackingEnabled() |
void |
markUnsafeAccess() |
jdk.internal.jvmci.meta.ResolvedJavaMethod |
method()
Gets the method from which this graph was built.
|
void |
recordInlinedMethod(jdk.internal.jvmci.meta.ResolvedJavaMethod inlinedMethod)
If method inlining recording has not been disabled, records that
inlinedMethod was inlined to this graph. |
void |
reduceDegenerateLoopBegin(LoopBeginNode begin) |
void |
reduceTrivialMerge(AbstractMergeNode merge) |
void |
removeFixed(FixedWithNextNode node)
Unlinks a node from all its control flow neighbors and then removes it from its graph.
|
void |
removeFloating(FloatingNode node) |
void |
removeSplit(ControlSplitNode node,
AbstractBeginNode survivingSuccessor) |
void |
removeSplitPropagate(ControlSplitNode node,
AbstractBeginNode survivingSuccessor) |
void |
removeSplitPropagate(ControlSplitNode node,
AbstractBeginNode survivingSuccessor,
SimplifierTool tool) |
void |
replaceFixed(FixedWithNextNode node,
Node replacement) |
void |
replaceFixedWithFixed(FixedWithNextNode node,
FixedWithNextNode replacement) |
void |
replaceFixedWithFloating(FixedWithNextNode node,
FloatingNode replacement) |
void |
replaceFloating(FloatingNode node,
Node replacement) |
void |
replaceSplit(ControlSplitNode node,
Node replacement,
AbstractBeginNode survivingSuccessor) |
void |
replaceSplitWithFixed(ControlSplitNode node,
FixedWithNextNode replacement,
AbstractBeginNode survivingSuccessor) |
void |
replaceSplitWithFloating(ControlSplitNode node,
FloatingNode replacement,
AbstractBeginNode survivingSuccessor) |
void |
setAfterFloatingReadPhase(boolean state) |
void |
setGuardsStage(StructuredGraph.GuardsStage guardsStage) |
void |
setHasValueProxies(boolean state) |
void |
setStart(StartNode start) |
StartNode |
start() |
String |
toString() |
void |
updateInlinedMethods(StructuredGraph other)
If method inlining recording has not been disabled, updates the inlined methods of this graph with
the inlined methods of another graph.
|
add, addDuplicates, addDuplicates, addOrUnique, addOrUniqueWithInputs, addWithoutUnique, addWithoutUniqueWithInputs, copy, copy, copy, createIterativeNodeWorkList, createNodeBitMap, createNodeFlood, createNodeMap, createNodeWorkList, findDuplicate, freeze, getCompressions, getMark, getNewNodes, getNode, getNodeCount, getNodes, getNodes, getNodesDeletedSinceLastCompression, getTotalNodesDeleted, hasNode, isFrozen, isNew, maybeCompress, reverseUsageOrder, trackNodeEvents, unique, verify
public static final long INVALID_GRAPH_ID
private static final AtomicLong uniqueGraphIds
private final jdk.internal.jvmci.meta.ResolvedJavaMethod method
private final long graphId
private final int entryBCI
private StructuredGraph.GuardsStage guardsStage
private boolean isAfterFloatingReadPhase
private boolean hasValueProxies
private final jdk.internal.jvmci.meta.Assumptions assumptions
private final jdk.internal.jvmci.meta.SpeculationLog speculationLog
private Map<jdk.internal.jvmci.meta.ResolvedJavaMethod,Integer> inlinedMethods
private StructuredGraph.UnsafeAccessState hasUnsafeAccess
public StructuredGraph(StructuredGraph.AllowAssumptions allowAssumptions)
AbstractBeginNode
as the start
node.public StructuredGraph(String name, jdk.internal.jvmci.meta.ResolvedJavaMethod method, StructuredGraph.AllowAssumptions allowAssumptions)
AbstractBeginNode
as the start
node.public StructuredGraph(String name, jdk.internal.jvmci.meta.ResolvedJavaMethod method, StructuredGraph.AllowAssumptions allowAssumptions, jdk.internal.jvmci.meta.SpeculationLog speculationLog)
public StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method, StructuredGraph.AllowAssumptions allowAssumptions)
public StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method, StructuredGraph.AllowAssumptions allowAssumptions, jdk.internal.jvmci.meta.SpeculationLog speculationLog)
public StructuredGraph(jdk.internal.jvmci.meta.ResolvedJavaMethod method, int entryBCI, StructuredGraph.AllowAssumptions allowAssumptions, jdk.internal.jvmci.meta.SpeculationLog speculationLog)
private StructuredGraph(String name, jdk.internal.jvmci.meta.ResolvedJavaMethod method, long graphId, int entryBCI, StructuredGraph.AllowAssumptions allowAssumptions, jdk.internal.jvmci.meta.SpeculationLog speculationLog)
public Stamp getReturnStamp()
public jdk.internal.jvmci.meta.ResolvedJavaMethod method()
public int getEntryBCI()
public boolean isOSR()
public long graphId()
protected Graph copy(String newName, Consumer<Map<Node,Node>> duplicationMapCallback)
public ParameterNode getParameter(int index)
public Iterable<Invoke> getInvokes()
public boolean hasLoops()
public void removeFloating(FloatingNode node)
public void replaceFloating(FloatingNode node, Node replacement)
public void removeFixed(FixedWithNextNode node)
node
- the node to be unlinked and removedpublic void replaceFixed(FixedWithNextNode node, Node replacement)
public void replaceFixedWithFixed(FixedWithNextNode node, FixedWithNextNode replacement)
public void replaceFixedWithFloating(FixedWithNextNode node, FloatingNode replacement)
public void removeSplit(ControlSplitNode node, AbstractBeginNode survivingSuccessor)
public void removeSplitPropagate(ControlSplitNode node, AbstractBeginNode survivingSuccessor)
public void removeSplitPropagate(ControlSplitNode node, AbstractBeginNode survivingSuccessor, SimplifierTool tool)
public void replaceSplit(ControlSplitNode node, Node replacement, AbstractBeginNode survivingSuccessor)
public void replaceSplitWithFixed(ControlSplitNode node, FixedWithNextNode replacement, AbstractBeginNode survivingSuccessor)
public void replaceSplitWithFloating(ControlSplitNode node, FloatingNode replacement, AbstractBeginNode survivingSuccessor)
public void addAfterFixed(FixedWithNextNode node, FixedNode newNode)
public void addBeforeFixed(FixedNode node, FixedWithNextNode newNode)
public void reduceDegenerateLoopBegin(LoopBeginNode begin)
public void reduceTrivialMerge(AbstractMergeNode merge)
public StructuredGraph.GuardsStage getGuardsStage()
public void setGuardsStage(StructuredGraph.GuardsStage guardsStage)
public boolean isAfterFloatingReadPhase()
public void setAfterFloatingReadPhase(boolean state)
public boolean hasValueProxies()
public void setHasValueProxies(boolean state)
public jdk.internal.jvmci.meta.Assumptions getAssumptions()
null
if assumptions cannot be made for this graphpublic void disableInlinedMethodRecording()
public boolean isInlinedMethodRecordingEnabled()
public Set<jdk.internal.jvmci.meta.ResolvedJavaMethod> getInlinedMethods()
null
if method inlining recording has been
disabledpublic void recordInlinedMethod(jdk.internal.jvmci.meta.ResolvedJavaMethod inlinedMethod)
inlinedMethod
was inlined to this graph. Otherwise, this
method does nothing.public void updateInlinedMethods(StructuredGraph other)
public int getBytecodeSize()
public boolean isTrivial()
StartNode
and ReturnNode
public jdk.internal.jvmci.meta.JavaMethod asJavaMethod()
asJavaMethod
in interface JavaMethodContext
public boolean hasUnsafeAccess()
public void markUnsafeAccess()
public void disableUnsafeAccessTracking()
public boolean isUnsafeAccessTrackingEnabled()
public jdk.internal.jvmci.meta.SpeculationLog getSpeculationLog()