public abstract class PEGraphDecoder extends SimplifyingGraphDecoder
GraphBuilderPhase
. However, not all callback methods defined in
GraphBuilderContext
are available since decoding is more limited than graph building.
The standard node canonicalization
interface is used to
canonicalize nodes during decoding. Additionally, branches
and
switches
with constant conditions are simplified.Modifier and Type | Class and Description |
---|---|
(package private) static class |
PEGraphDecoder.ExceptionPlaceholderNode |
static class |
PEGraphDecoder.Options |
protected class |
PEGraphDecoder.PEAppendGraphBuilderContext |
protected class |
PEGraphDecoder.PEMethodScope |
protected class |
PEGraphDecoder.PENonAppendGraphBuilderContext |
SimplifyingGraphDecoder.PECanonicalizerTool
GraphDecoder.InvokeData, GraphDecoder.LoopExplosionKind, GraphDecoder.LoopExplosionState, GraphDecoder.LoopScope, GraphDecoder.MethodScope
canonicalizeReads, constantReflection, metaAccess, stampProvider
architecture
Constructor and Description |
---|
PEGraphDecoder(MetaAccessProvider metaAccess,
ConstantReflectionProvider constantReflection,
StampProvider stampProvider,
Architecture architecture) |
addFloatingNode, allowLazyPhis, cleanupGraph
decode, decode, decodeFloatingNode, detectLoops, ensureNodeCreated, handleLoopExplosionBegin, handleLoopExplosionEnd, handleLoopExplosionProxyNodes, handlePhiFunctions, handleProxyNodes, instantiateNode, lookupNode, makeInputNodes, makeStubNode, makeSuccessorStubs, processNextNode, readObject, readOrderId, readProperties, registerNode, skipEdge, verifyEdges
public PEGraphDecoder(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, StampProvider stampProvider, Architecture architecture)
protected static GraphDecoder.LoopExplosionKind loopExplosionKind(ResolvedJavaMethod method, LoopExplosionPlugin loopExplosionPlugin)
public void decode(StructuredGraph targetGraph, ResolvedJavaMethod method, LoopExplosionPlugin loopExplosionPlugin, InvocationPlugins invocationPlugins, InlineInvokePlugin[] inlineInvokePlugins, ParameterPlugin parameterPlugin)
protected void checkLoopExplosionIteration(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope)
GraphDecoder
checkLoopExplosionIteration
in class GraphDecoder
s
- The current method.loopScope
- The current loop.protected void handleInvoke(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData)
GraphDecoder
Invoke
nodes do not have the CallTargetNode
, FrameState
, and
successors encoded. Instead, this information is provided separately to allow method inlining
without decoding and adding them to the graph upfront. For non-inlined methods, this method
restores the normal state. Subclasses can override it to perform method inlining.handleInvoke
in class GraphDecoder
protected boolean trySimplifyInvoke(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, MethodCallTargetNode callTarget)
protected boolean tryInvocationPlugin(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, MethodCallTargetNode callTarget)
protected boolean tryInline(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, MethodCallTargetNode callTarget)
protected boolean doInline(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, InlineInvokePlugin.InlineInfo inlineInfo, ValueNode[] arguments)
private static RuntimeException tooDeepInlining(PEGraphDecoder.PEMethodScope methodScope)
public FixedNode nodeAfterInvoke(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, AbstractBeginNode lastBlock)
private static void deleteInvoke(Invoke invoke)
protected abstract EncodedGraph lookupEncodedGraph(ResolvedJavaMethod method, boolean isIntrinsic)
protected void handleFixedNode(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, int nodeOrderId, FixedNode node)
GraphDecoder
handleFixedNode
in class SimplifyingGraphDecoder
s
- The current method.loopScope
- The current loop.nodeOrderId
- The orderId of the node.node
- The node to be simplified.protected Node handleFloatingNodeBeforeAdd(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, Node node)
GraphDecoder
handleFloatingNodeBeforeAdd
in class SimplifyingGraphDecoder
s
- The current method.loopScope
- The current loop.node
- The node to be canonicalized.protected void ensureOuterStateDecoded(PEGraphDecoder.PEMethodScope methodScope)
protected void ensureStateAfterDecoded(PEGraphDecoder.PEMethodScope methodScope)
protected void ensureExceptionStateDecoded(PEGraphDecoder.PEMethodScope methodScope)
protected Node handleFloatingNodeAfterAdd(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, Node node)
GraphDecoder
handleFloatingNodeAfterAdd
in class GraphDecoder
s
- The current method.loopScope
- The current loop.node
- The node to be canonicalized.