changeset 16135:f3330ba9974c

remove barrier to escape analysis introduced by d568574e6448
author Doug Simon <doug.simon@oracle.com>
date Wed, 18 Jun 2014 14:46:01 +0200
parents 17af09bd9e75
children d32be0297274
files graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java graal/com.oracle.graal.graph/src/com/oracle/graal/graph/iterators/EmptyNodeIterable.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java
diffstat 3 files changed, 4 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java	Wed Jun 18 11:57:47 2014 +0200
+++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java	Wed Jun 18 14:46:01 2014 +0200
@@ -22,8 +22,6 @@
  */
 package com.oracle.graal.graph;
 
-import static com.oracle.graal.graph.iterators.EmptyNodeIterable.*;
-
 import java.util.*;
 
 import com.oracle.graal.compiler.common.*;
@@ -535,9 +533,6 @@
      * mark}.
      */
     public NodeIterable<Node> getNewNodes(Mark mark) {
-        if (mark.isCurrent()) {
-            return emptyNodeIterable();
-        }
         final int index = mark.getValue();
         return new NodeIterable<Node>() {
 
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/iterators/EmptyNodeIterable.java	Wed Jun 18 11:57:47 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2014, 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.graph.iterators;
-
-import java.util.*;
-
-import com.oracle.graal.graph.*;
-
-/**
- * Provides an immutable {@link NodeIterable} implementation that returns no elements.
- */
-public final class EmptyNodeIterable<T extends Node> implements NodeIterable<T> {
-
-    /**
-     * Returns an empty NodeIterable (immutable).
-     */
-    @SuppressWarnings("unchecked")
-    public static final <T extends Node> NodeIterable<T> emptyNodeIterable() {
-        return EMPTY_LIST;
-    }
-
-    @SuppressWarnings("rawtypes") private static final NodeIterable EMPTY_LIST = new EmptyNodeIterable();
-
-    private final Iterator<T> iterator = new Iterator<T>() {
-
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
-
-        public T next() {
-            throw new NoSuchElementException();
-        }
-
-        public boolean hasNext() {
-            return false;
-        }
-    };
-
-    /**
-     * Only {@link #emptyNodeIterable()} should be used.
-     */
-    private EmptyNodeIterable() {
-    }
-
-    public Iterator<T> iterator() {
-        return iterator;
-    }
-}
\ No newline at end of file
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java	Wed Jun 18 11:57:47 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java	Wed Jun 18 14:46:01 2014 +0200
@@ -197,8 +197,10 @@
                     }
                 }
 
-                for (Node newNode : graph.getNewNodes(mark)) {
-                    workList.add(newNode);
+                if (!mark.isCurrent()) {
+                    for (Node newNode : graph.getNewNodes(mark)) {
+                        workList.add(newNode);
+                    }
                 }
             }
         }