diff graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java @ 11652:f091e0d6f4f3

Disallow add for global value numberable node types. Introduce addWithoutUnique.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 15 Sep 2013 22:33:09 +0200
parents ef6915cf1e59
children 4eec2ac671c2
line wrap: on
line diff
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java	Sun Sep 15 19:03:38 2013 +0200
+++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java	Sun Sep 15 22:33:09 2013 +0200
@@ -282,7 +282,7 @@
     private ValueNode nodeClassOp(StructuredGraph graph, Class<? extends ValueNode> nodeClass, ValueNode left, ValueNode right, Invoke invoke) {
         try {
             Constructor<? extends ValueNode> constructor = nodeClass.getConstructor(Kind.class, ValueNode.class, ValueNode.class);
-            ValueNode result = graph.add(constructor.newInstance(wordKind, left, right));
+            ValueNode result = graph.addOrUnique(constructor.newInstance(wordKind, left, right));
             if (result instanceof FixedWithNextNode) {
                 graph.addBeforeFixed(invoke.asNode(), (FixedWithNextNode) result);
             }