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 |
|---|---|
static class |
PEGraphDecoder.ExceptionPlaceholderNode |
static class |
PEGraphDecoder.Options |
protected class |
PEGraphDecoder.PEAppendGraphBuilderContext |
protected class |
PEGraphDecoder.PEMethodScope |
protected class |
PEGraphDecoder.PENonAppendGraphBuilderContext |
protected class |
PEGraphDecoder.PEPluginGraphBuilderContext |
static class |
PEGraphDecoder.SpecialCallTargetCacheKey |
SimplifyingGraphDecoder.PECanonicalizerToolGraphDecoder.InvokeData, GraphDecoder.LoopExplosionState, GraphDecoder.LoopScope, GraphDecoder.LoopScopeTrigger, GraphDecoder.MethodScope, GraphDecoder.ProxyPlaceholder| Modifier and Type | Field and Description |
|---|---|
protected boolean |
needsExplicitException |
protected SourceLanguagePositionProvider |
sourceLanguagePositionProvider |
canonicalizeReads, canonicalizerTool, providersarchitecture, debug, DUMP_DURING_FIXED_NODE_PROCESSING, graph, options| Constructor and Description |
|---|
PEGraphDecoder(Architecture architecture,
StructuredGraph graph,
CoreProviders providers,
LoopExplosionPlugin loopExplosionPlugin,
InvocationPlugins invocationPlugins,
InlineInvokePlugin[] inlineInvokePlugins,
ParameterPlugin parameterPlugin,
NodePlugin[] nodePlugins,
ResolvedJavaMethod peRootForInlining,
SourceLanguagePositionProvider sourceLanguagePositionProvider,
ConcurrentHashMap<PEGraphDecoder.SpecialCallTargetCacheKey,Object> specialCallTargetCache,
ConcurrentHashMap<ResolvedJavaMethod,Object> invocationPluginCache,
boolean needsExplicitException) |
addFloatingNode, allowLazyPhis, earlyCanonicalization, handleFixedNode, handleMergeNodeappendInvoke, createInitialLoopScope, decode, decode, decode, decodeFloatingNode, ensureNodeCreated, getNodeClass, handleLoopExplosionBegin, handleLoopExplosionEnd, handleLoopExplosionProxyNodes, handlePhiFunctions, handleProxyNodes, lookupNode, makeFixedNodeInputs, makeFloatingNodeInputs, makeStubNode, makeSuccessorStubs, processNextNode, readInvokeData, readObject, readOrderId, readProperties, registerNode, skipDirectEdge, verifyEdgesprotected final SourceLanguagePositionProvider sourceLanguagePositionProvider
protected final boolean needsExplicitException
public PEGraphDecoder(Architecture architecture,
StructuredGraph graph,
CoreProviders providers,
LoopExplosionPlugin loopExplosionPlugin,
InvocationPlugins invocationPlugins,
InlineInvokePlugin[] inlineInvokePlugins,
ParameterPlugin parameterPlugin,
NodePlugin[] nodePlugins,
ResolvedJavaMethod peRootForInlining,
SourceLanguagePositionProvider sourceLanguagePositionProvider,
ConcurrentHashMap<PEGraphDecoder.SpecialCallTargetCacheKey,Object> specialCallTargetCache,
ConcurrentHashMap<ResolvedJavaMethod,Object> invocationPluginCache,
boolean needsExplicitException)
protected IntrinsicContext getIntrinsic()
protected static LoopExplosionPlugin.LoopExplosionKind loopExplosionKind(ResolvedJavaMethod method, LoopExplosionPlugin loopExplosionPlugin)
public void decode(ResolvedJavaMethod method,
boolean isSubstitution,
boolean trackNodeSourcePosition)
protected PEGraphDecoder.PEMethodScope createMethodScope(StructuredGraph targetGraph, PEGraphDecoder.PEMethodScope caller, GraphDecoder.LoopScope callerLoopScope, EncodedGraph encodedGraph, ResolvedJavaMethod method, GraphDecoder.InvokeData invokeData, int inliningDepth, ValueNode[] arguments)
protected void cleanupGraph(GraphDecoder.MethodScope methodScope)
GraphDecodercleanupGraph in class SimplifyingGraphDecodermethodScope - The current method.protected void checkLoopExplosionIteration(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope)
GraphDecodercheckLoopExplosionIteration in class GraphDecoders - The current method.loopScope - The current loop.protected GraphDecoder.LoopScope handleInvoke(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData)
GraphDecoderInvoke 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.
The return value is the loop scope where decoding should continue. When method inlining
should be performed, the returned loop scope must be a new loop scope for the inlined method.
Without inlining, the original loop scope must be returned.handleInvoke in class GraphDecoderprotected void handleNonInlinedInvoke(GraphDecoder.MethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData)
protected MethodCallTargetNode trySimplifyCallTarget(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.InvokeData invokeData, MethodCallTargetNode callTarget)
protected GraphDecoder.LoopScope 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 GraphDecoder.LoopScope tryInline(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, MethodCallTargetNode callTarget)
protected GraphDecoder.LoopScope doInline(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, InlineInvokePlugin.InlineInfo inlineInfo, ValueNode[] arguments)
protected void afterMethodScope(GraphDecoder.MethodScope methodScope)
afterMethodScope in class GraphDecoderprotected void finishInlining(GraphDecoder.MethodScope is)
finishInlining in class GraphDecoderprotected FixedNode nodeAfterInvoke(PEGraphDecoder.PEMethodScope methodScope, GraphDecoder.LoopScope loopScope, GraphDecoder.InvokeData invokeData, BeginNode prevBegin)
protected abstract EncodedGraph lookupEncodedGraph(ResolvedJavaMethod method, BytecodeProvider intrinsicBytecodeProvider, boolean isSubstitution, boolean trackNodeSourcePosition)
protected Node canonicalizeFixedNode(GraphDecoder.MethodScope s, Node node)
SimplifyingGraphDecoderFixedNode but can already be
canonicalized (and therefore be a non-fixed node).canonicalizeFixedNode in class SimplifyingGraphDecoders - The current method.node - The node to be canonicalized.protected boolean pluginReplacementMustSucceed()
protected Node handleFloatingNodeBeforeAdd(GraphDecoder.MethodScope s, GraphDecoder.LoopScope loopScope, Node n)
GraphDecoderhandleFloatingNodeBeforeAdd in class SimplifyingGraphDecoders - The current method.loopScope - The current loop.n - 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)
GraphDecoderhandleFloatingNodeAfterAdd in class GraphDecoders - The current method.loopScope - The current loop.node - The node to be canonicalized.