changeset 16000:2e1957c8ccb8

Merge
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Mon, 02 Jun 2014 18:14:39 +0200
parents 096848853662 ba0e3c75bd49
children c55559b7824d fcac781d3592
files
diffstat 2 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java	Mon Jun 02 17:58:07 2014 +0200
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java	Mon Jun 02 18:14:39 2014 +0200
@@ -53,6 +53,7 @@
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.virtual.*;
 import com.oracle.graal.phases.*;
+import com.oracle.graal.phases.common.*;
 import com.oracle.graal.phases.common.inlining.*;
 import com.oracle.graal.phases.schedule.*;
 import com.oracle.graal.phases.tiers.*;
@@ -124,7 +125,9 @@
 
     protected Suites createSuites() {
         Suites ret = backend.getSuites().createSuites();
-        ret.getHighTier().findPhase(InliningPhase.class).add(new Phase("ComputeLoopFrequenciesPhase") {
+        ListIterator<BasePhase<? super HighTierContext>> iter = ret.getHighTier().findPhase(InliningPhase.class);
+        PhaseSuite.findNextPhase(iter, CanonicalizerPhase.class);
+        iter.add(new Phase("ComputeLoopFrequenciesPhase") {
 
             @Override
             protected void run(StructuredGraph graph) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Mon Jun 02 17:58:07 2014 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Mon Jun 02 18:14:39 2014 +0200
@@ -42,8 +42,6 @@
     private ResolvedJavaMethod targetMethod;
     private InvokeKind invokeKind;
 
-    private transient Stamp lastCanonicalizedReceiverStamp;
-
     /**
      * @param arguments
      */
@@ -140,17 +138,12 @@
             }
 
             // check if the type of the receiver can narrow the result
-            Stamp receiverStamp = receiver().stamp();
-            if (receiverStamp.equals(lastCanonicalizedReceiverStamp)) {
-                return this;
-            }
-            lastCanonicalizedReceiverStamp = receiverStamp;
-
-            ResolvedJavaType type = StampTool.typeOrNull(receiverStamp);
+            ValueNode receiver = receiver();
+            ResolvedJavaType type = StampTool.typeOrNull(receiver);
             if (type != null && (invoke().stateAfter() != null || invoke().stateDuring() != null)) {
                 // either the holder class is exact, or the receiver object has an exact type
                 ResolvedJavaMethod resolvedMethod = type.resolveMethod(targetMethod, invoke().getContextType());
-                if (resolvedMethod != null && (resolvedMethod.canBeStaticallyBound() || StampTool.isExactType(receiverStamp))) {
+                if (resolvedMethod != null && (resolvedMethod.canBeStaticallyBound() || StampTool.isExactType(receiver))) {
                     invokeKind = InvokeKind.Special;
                     targetMethod = resolvedMethod;
                     return this;