Mercurial > hg > graal-compiler
changeset 15019:3498761a33d8
differentiate between tightly coupling edges (Extension) and loosely coupling edges (Association)
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/InputType.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/InputType.java Tue Apr 08 10:25:44 2014 +0200 @@ -53,6 +53,10 @@ */ Association, /** + * Inputs that connect tightly coupled nodes, e.g., an InvokeNode and its CallTargetNode. + */ + Extension, + /** * Inputs of this type are temporarily exempt from type checking. This should only be used in * exceptional cases and should never survive to later stages of compilation. */
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -28,7 +28,7 @@ import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; -@NodeInfo(allowedUsageTypes = {InputType.Association}) +@NodeInfo(allowedUsageTypes = {InputType.Extension}) public abstract class CallTargetNode extends ValueNode implements LIRLowerable { @Input private final NodeInputList<ValueNode> arguments;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -38,7 +38,7 @@ @NodeInfo(nameTemplate = "Invoke#{p#targetMethod/s}", allowedUsageTypes = {InputType.Memory}) public final class InvokeNode extends AbstractMemoryCheckpoint implements Invoke, LIRLowerable, MemoryCheckpoint.Single { - @Input(InputType.Association) private CallTargetNode callTarget; + @Input(InputType.Extension) private CallTargetNode callTarget; @Input(InputType.State) private FrameState stateDuring; @Input(InputType.Guard) private GuardingNode guard; private final int bci;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -38,7 +38,7 @@ @Successor private AbstractBeginNode next; @Successor private DispatchBeginNode exceptionEdge; - @Input(InputType.Association) private CallTargetNode callTarget; + @Input(InputType.Extension) private CallTargetNode callTarget; @Input(InputType.State) private FrameState stateDuring; @Input(InputType.State) private FrameState stateAfter; @Input(InputType.Guard) private GuardingNode guard;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMapNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMapNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -30,7 +30,7 @@ import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.type.*; -@NodeInfo(allowedUsageTypes = {InputType.Association}) +@NodeInfo(allowedUsageTypes = {InputType.Extension}) public abstract class MemoryMapNode extends FloatingNode { public MemoryMapNode() {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -29,7 +29,7 @@ public final class ReturnNode extends ControlSinkNode implements LIRLowerable, IterableNodeType { @Input private ValueNode result; - @Input(InputType.Association) private MemoryMapNode memoryMap; + @Input(InputType.Extension) private MemoryMapNode memoryMap; public ValueNode result() { return result;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/AllocatedObjectNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/AllocatedObjectNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -35,7 +35,7 @@ public class AllocatedObjectNode extends FloatingNode implements Virtualizable, ArrayLengthProvider { @Input private VirtualObjectNode virtualObject; - @Input(InputType.Association) private CommitAllocationNode commit; + @Input(InputType.Extension) private CommitAllocationNode commit; public AllocatedObjectNode(VirtualObjectNode virtualObject) { super(StampFactory.exactNonNull(virtualObject.type()));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/CommitAllocationNode.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/CommitAllocationNode.java Tue Apr 08 10:25:44 2014 +0200 @@ -32,7 +32,7 @@ import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; -@NodeInfo(nameTemplate = "Alloc {i#virtualObjects}", allowedUsageTypes = {InputType.Association}) +@NodeInfo(nameTemplate = "Alloc {i#virtualObjects}", allowedUsageTypes = {InputType.Extension}) public final class CommitAllocationNode extends FixedWithNextNode implements VirtualizableAllocation, Lowerable, Simplifiable { @Input private final NodeInputList<VirtualObjectNode> virtualObjects = new NodeInputList<>(this);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Mon Apr 07 16:09:17 2014 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Tue Apr 08 10:25:44 2014 +0200 @@ -493,7 +493,7 @@ Position pos = iter.nextPosition(); if (pos.get(usage) == duplicated) { switch (pos.getInputType(usage)) { - case Association: + case Extension: case Condition: case State: // clone the offending node to the outside @@ -524,6 +524,7 @@ } pos.set(usage, newPhi); break; + case Association: default: throw GraalInternalError.shouldNotReachHere(); } @@ -541,7 +542,7 @@ Node input = pos.get(duplicated); if (input != null && !duplicatedNodes.contains(input)) { switch (pos.getInputType(duplicated)) { - case Association: + case Extension: case Condition: case State: if (input != merge) { @@ -549,6 +550,7 @@ worklist.add(input); } break; + case Association: case Guard: case Anchor: case Value: