public class SimplifyingGraphDecoder extends GraphDecoder
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 |
|---|---|
protected class |
SimplifyingGraphDecoder.PECanonicalizerTool |
GraphDecoder.InvokeData, GraphDecoder.LoopExplosionState, GraphDecoder.LoopScope, GraphDecoder.LoopScopeTrigger, GraphDecoder.MethodScope, GraphDecoder.ProxyPlaceholder| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canonicalizeReads |
protected CanonicalizerTool |
canonicalizerTool |
protected CoreProviders |
providers |
architecture, debug, DUMP_DURING_FIXED_NODE_PROCESSING, graph, options| Constructor and Description |
|---|
SimplifyingGraphDecoder(Architecture architecture,
StructuredGraph graph,
CoreProviders providers,
boolean canonicalizeReads) |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
addFloatingNode(GraphDecoder.MethodScope methodScope,
Node node) |
protected boolean |
allowLazyPhis() |
protected Node |
canonicalizeFixedNode(GraphDecoder.MethodScope methodScope,
Node node)
Canonicalizes the provided node, which was originally a
FixedNode but can already be
canonicalized (and therefore be a non-fixed node). |
protected void |
cleanupGraph(GraphDecoder.MethodScope methodScope)
Removes unnecessary nodes from the graph after decoding.
|
protected boolean |
earlyCanonicalization(GraphDecoder.MethodScope methodScope,
GraphDecoder.LoopScope loopScope,
int nodeOrderId,
FixedNode node)
Hook for subclasses for early canonicalization of IfNodes and IntegerSwitchNodes.
|
protected void |
handleFixedNode(GraphDecoder.MethodScope methodScope,
GraphDecoder.LoopScope loopScope,
int nodeOrderId,
FixedNode node)
Hook for subclasses.
|
protected Node |
handleFloatingNodeBeforeAdd(GraphDecoder.MethodScope methodScope,
GraphDecoder.LoopScope loopScope,
Node node)
Hook for subclasses to process a non-fixed node before it is added to the graph.
|
protected void |
handleMergeNode(MergeNode merge)
Hook for subclasses to perform simplifications for a non-loop-header control flow merge.
|
afterMethodScope, appendInvoke, checkLoopExplosionIteration, createInitialLoopScope, decode, decode, decode, decodeFloatingNode, ensureNodeCreated, finishInlining, getNodeClass, handleFloatingNodeAfterAdd, handleInvoke, handleLoopExplosionBegin, handleLoopExplosionEnd, handleLoopExplosionProxyNodes, handlePhiFunctions, handleProxyNodes, lookupNode, makeFixedNodeInputs, makeFloatingNodeInputs, makeStubNode, makeSuccessorStubs, processNextNode, readInvokeData, readObject, readOrderId, readProperties, registerNode, skipDirectEdge, verifyEdgesprotected final CoreProviders providers
protected final boolean canonicalizeReads
protected final CanonicalizerTool canonicalizerTool
public SimplifyingGraphDecoder(Architecture architecture,
StructuredGraph graph,
CoreProviders providers,
boolean canonicalizeReads)
protected void cleanupGraph(GraphDecoder.MethodScope methodScope)
GraphDecodercleanupGraph in class GraphDecodermethodScope - The current method.protected boolean allowLazyPhis()
allowLazyPhis in class GraphDecoderprotected void handleMergeNode(MergeNode merge)
GraphDecoderhandleMergeNode in class GraphDecodermerge - The control flow merge.protected void handleFixedNode(GraphDecoder.MethodScope methodScope, GraphDecoder.LoopScope loopScope, int nodeOrderId, FixedNode node)
GraphDecoderhandleFixedNode in class GraphDecodermethodScope - The current method.loopScope - The current loop.nodeOrderId - The orderId of the node.node - The node to be simplified.protected Node canonicalizeFixedNode(GraphDecoder.MethodScope methodScope, Node node)
FixedNode but can already be
canonicalized (and therefore be a non-fixed node).methodScope - The current method.node - The node to be canonicalized.protected boolean earlyCanonicalization(GraphDecoder.MethodScope methodScope, GraphDecoder.LoopScope loopScope, int nodeOrderId, FixedNode node)
GraphDecoderearlyCanonicalization in class GraphDecodermethodScope - The current method.loopScope - The current loop.nodeOrderId - The orderId of the node.node - The node to be simplified.protected Node handleFloatingNodeBeforeAdd(GraphDecoder.MethodScope methodScope, GraphDecoder.LoopScope loopScope, Node node)
GraphDecoderhandleFloatingNodeBeforeAdd in class GraphDecodermethodScope - The current method.loopScope - The current loop.node - The node to be canonicalized.protected Node addFloatingNode(GraphDecoder.MethodScope methodScope, Node node)
addFloatingNode in class GraphDecoder