changeset 16227:ec17c588abf9

rename: MemoryMapNode -> MemoryMap
author Doug Simon <doug.simon@oracle.com>
date Wed, 25 Jun 2014 12:38:16 +0200
parents c238f67f0745
children df5ac85a4813
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMap.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMapNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java
diffstat 6 files changed, 63 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMap.java	Wed Jun 25 12:38:16 2014 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.nodes;
+
+import java.util.*;
+
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.compiler.common.type.*;
+import com.oracle.graal.graph.*;
+import com.oracle.graal.nodes.calc.*;
+import com.oracle.graal.nodes.extended.*;
+
+@NodeInfo(allowedUsageTypes = {InputType.Extension})
+public abstract class MemoryMap extends FloatingNode {
+
+    public MemoryMap() {
+        super(StampFactory.forVoid());
+    }
+
+    public abstract MemoryNode getLastLocationAccess(LocationIdentity locationIdentity);
+
+    public abstract Set<LocationIdentity> getLocations();
+
+    public abstract boolean replaceLastLocationAccess(MemoryNode oldNode, MemoryNode newNode);
+}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryMapNode.java	Wed Jun 25 11:30:44 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.graal.nodes;
-
-import java.util.*;
-
-import com.oracle.graal.api.meta.*;
-import com.oracle.graal.compiler.common.type.*;
-import com.oracle.graal.graph.*;
-import com.oracle.graal.nodes.calc.*;
-import com.oracle.graal.nodes.extended.*;
-
-@NodeInfo(allowedUsageTypes = {InputType.Extension})
-public abstract class MemoryMapNode extends FloatingNode {
-
-    public MemoryMapNode() {
-        super(StampFactory.forVoid());
-    }
-
-    public abstract MemoryNode getLastLocationAccess(LocationIdentity locationIdentity);
-
-    public abstract Set<LocationIdentity> getLocations();
-
-    public abstract boolean replaceLastLocationAccess(MemoryNode oldNode, MemoryNode newNode);
-}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java	Wed Jun 25 11:30:44 2014 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ReturnNode.java	Wed Jun 25 12:38:16 2014 +0200
@@ -29,7 +29,7 @@
 public final class ReturnNode extends ControlSinkNode implements LIRLowerable, IterableNodeType {
 
     @Input private ValueNode result;
-    @Input(InputType.Extension) private MemoryMapNode memoryMap;
+    @Input(InputType.Extension) private MemoryMap memoryMap;
 
     public ValueNode result() {
         return result;
@@ -45,7 +45,7 @@
         this(result, null);
     }
 
-    public ReturnNode(ValueNode result, MemoryMapNode memoryMap) {
+    public ReturnNode(ValueNode result, MemoryMap memoryMap) {
         super(StampFactory.forVoid());
         this.result = result;
         this.memoryMap = memoryMap;
@@ -65,12 +65,12 @@
         }
     }
 
-    public void setMemoryMap(MemoryMapNode memoryMap) {
+    public void setMemoryMap(MemoryMap memoryMap) {
         updateUsages(this.memoryMap, memoryMap);
         this.memoryMap = memoryMap;
     }
 
-    public MemoryMapNode getMemoryMap() {
+    public MemoryMap getMemoryMap() {
         return memoryMap;
     }
 }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java	Wed Jun 25 11:30:44 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java	Wed Jun 25 12:38:16 2014 +0200
@@ -42,7 +42,7 @@
         CREATE_FLOATING_READS
     }
 
-    public static class MemoryMapImpl extends MemoryMapNode {
+    public static class MemoryMapImpl extends MemoryMap {
 
         private final Map<LocationIdentity, MemoryNode> lastMemorySnapshot;
 
@@ -125,11 +125,11 @@
         }
     }
 
-    public static MemoryMapImpl mergeMemoryMaps(MergeNode merge, List<? extends MemoryMapNode> states) {
+    public static MemoryMapImpl mergeMemoryMaps(MergeNode merge, List<? extends MemoryMap> states) {
         MemoryMapImpl newState = new MemoryMapImpl();
 
         Set<LocationIdentity> keys = new HashSet<>();
-        for (MemoryMapNode other : states) {
+        for (MemoryMap other : states) {
             keys.addAll(other.getLocations());
         }
         assert !keys.contains(FINAL_LOCATION);
@@ -138,7 +138,7 @@
             int mergedStatesCount = 0;
             boolean isPhi = false;
             MemoryNode merged = null;
-            for (MemoryMapNode state : states) {
+            for (MemoryMap state : states) {
                 MemoryNode last = state.getLastLocationAccess(key);
                 if (isPhi) {
                     merged.asMemoryPhi().addInput(ValueNodeUtil.asNode(last));
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java	Wed Jun 25 11:30:44 2014 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java	Wed Jun 25 12:38:16 2014 +0200
@@ -208,7 +208,7 @@
         }
 
         @Override
-        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMapNode mmap) {
+        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMap mmap) {
             assert newNode instanceof PhiNode;
             assert oldNode == instanceOf;
             newNode.inferStamp();
@@ -239,7 +239,7 @@
         }
 
         @Override
-        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMapNode mmap) {
+        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMap mmap) {
             assert newNode instanceof PhiNode;
             assert oldNode == instanceOf;
             newNode.inferStamp();
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Wed Jun 25 11:30:44 2014 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Wed Jun 25 12:38:16 2014 +0200
@@ -678,11 +678,11 @@
         Debug.dump(snippet, "SnippetTemplate after fixing memory anchoring");
 
         List<ReturnNode> returnNodes = new ArrayList<>(4);
-        List<MemoryMapNode> memMaps = new ArrayList<>(4);
+        List<MemoryMap> memMaps = new ArrayList<>(4);
         StartNode entryPointNode = snippet.start();
         boolean anchorUsed = false;
         for (ReturnNode retNode : snippet.getNodes(ReturnNode.class)) {
-            MemoryMapNode memMap = retNode.getMemoryMap();
+            MemoryMap memMap = retNode.getMemoryMap();
             anchorUsed |= memMap.replaceLastLocationAccess(snippetCopy.start(), memoryAnchor);
             memMaps.add(memMap);
             retNode.setMemoryMap(null);
@@ -696,7 +696,7 @@
         } else {
             snippetCopy.addAfterFixed(snippetCopy.start(), memoryAnchor);
         }
-        assert snippet.getNodes().filter(MemoryMapNode.class).isEmpty();
+        assert snippet.getNodes().filter(MemoryMap.class).isEmpty();
         if (returnNodes.isEmpty()) {
             this.returnNode = null;
             this.memoryMap = null;
@@ -800,7 +800,7 @@
     /**
      * map of killing locations to memory checkpoints (nodes).
      */
-    private final MemoryMapNode memoryMap;
+    private final MemoryMap memoryMap;
 
     /**
      * Times instantiations of this template.
@@ -897,7 +897,7 @@
         /**
          * Replaces all usages of {@code oldNode} with direct or indirect usages of {@code newNode}.
          */
-        void replace(ValueNode oldNode, ValueNode newNode, MemoryMapNode mmap);
+        void replace(ValueNode oldNode, ValueNode newNode, MemoryMap mmap);
     }
 
     /**
@@ -919,7 +919,7 @@
         }
 
         @Override
-        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMapNode mmap) {
+        public void replace(ValueNode oldNode, ValueNode newNode, MemoryMap mmap) {
             if (mmap != null) {
                 for (Node usage : oldNode.usages().snapshot()) {
                     LocationIdentity identity = getLocationIdentity(usage);
@@ -1010,7 +1010,7 @@
         return true;
     }
 
-    private class DuplicateMapper extends MemoryMapNode {
+    private class DuplicateMapper extends MemoryMap {
 
         private final Map<Node, Node> duplicates;
         @Input private StartNode replaceeStart;
@@ -1134,7 +1134,7 @@
             if (returnNode != null && !(replacee instanceof ControlSinkNode)) {
                 ReturnNode returnDuplicate = (ReturnNode) duplicates.get(returnNode);
                 returnValue = returnDuplicate.result();
-                MemoryMapNode mmap = new DuplicateMapper(duplicates, replaceeGraph.start());
+                MemoryMap mmap = new DuplicateMapper(duplicates, replaceeGraph.start());
                 if (returnValue == null && replacee.usages().isNotEmpty() && replacee instanceof MemoryCheckpoint) {
                     replacer.replace(replacee, null, mmap);
                 } else {