diff graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2564:274360f98f97

Remove inlining (2nd part) removed IRScope
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Fri, 29 Apr 2011 13:19:17 +0200
parents a384fac3fd34
children cc1f1d396288
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Fri Apr 29 11:50:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Fri Apr 29 13:19:17 2011 +0200
@@ -409,7 +409,7 @@
 
             if (C1XOptions.UseStackMapTableLiveness) {
                 // if a liveness map is available, use it to invalidate dead locals
-                CiBitMap[] livenessMap = newState.scope().method.livenessMap();
+                CiBitMap[] livenessMap = newState.method.livenessMap();
                 if (livenessMap != null && bci() >= 0) {
                     assert bci() < livenessMap.length;
                     CiBitMap liveness = livenessMap[bci()];
@@ -431,14 +431,6 @@
                 throw new CiBailout("stack or locks do not match");
             }
 
-            // while (existingState.scope() != newState.scope()) {
-            //     // XXX: original code is not sure if this is necessary
-            //     newState = newState.scope().callerState();
-            //     assert newState != null : "could not match scopes";
-            // }
-            // above code replaced with assert for the moment
-            assert existingState.scope() == newState.scope();
-
             assert existingState.localsSize() == newState.localsSize();
             assert existingState.stackSize() == newState.stackSize();
 
@@ -471,19 +463,10 @@
             newState.setupPhiForStack(this, i);
         }
         int localsSize = newState.localsSize();
-        CiBitMap requiresPhi = newState.scope().getStoresInLoops();
         for (int i = 0; i < localsSize; i++) {
             Value x = newState.localAt(i);
             if (x != null) {
-                if (requiresPhi != null) {
-                    if (requiresPhi.get(i) || x.kind.isDoubleWord() && requiresPhi.get(i + 1)) {
-                        // selectively do a phi
-                        newState.setupPhiForLocal(this, i);
-                    }
-                } else {
-                    // always setup a phi
-                    newState.setupPhiForLocal(this, i);
-                }
+                newState.setupPhiForLocal(this, i);
             }
         }
     }
@@ -792,19 +775,16 @@
                 }
             }
 
-            do {
-                for (i = 0; !hasPhisInLocals && i < state.localsSize();) {
-                    Value value = state.localAt(i);
-                    hasPhisInLocals = isPhiAtBlock(value);
-                    // also ignore illegal HiWords
-                    if (value != null && !value.isIllegal()) {
-                        i += value.kind.sizeInSlots();
-                    } else {
-                        i++;
-                    }
+            for (i = 0; !hasPhisInLocals && i < state.localsSize();) {
+                Value value = state.localAt(i);
+                hasPhisInLocals = isPhiAtBlock(value);
+                // also ignore illegal HiWords
+                if (value != null && !value.isIllegal()) {
+                    i += value.kind.sizeInSlots();
+                } else {
+                    i++;
                 }
-                state = state.callerState();
-            } while (state != null);
+            }
         }
 
         // print values in locals
@@ -813,21 +793,18 @@
             out.println("Locals:");
 
             FrameState state = stateBefore();
-            do {
-                int i = 0;
-                while (i < state.localsSize()) {
-                    Value value = state.localAt(i);
-                    if (value != null) {
-                        out.println(stateString(i, value));
-                        // also ignore illegal HiWords
-                        i += value.isIllegal() ? 1 : value.kind.sizeInSlots();
-                    } else {
-                        i++;
-                    }
+            int i = 0;
+            while (i < state.localsSize()) {
+                Value value = state.localAt(i);
+                if (value != null) {
+                    out.println(stateString(i, value));
+                    // also ignore illegal HiWords
+                    i += value.isIllegal() ? 1 : value.kind.sizeInSlots();
+                } else {
+                    i++;
                 }
-                out.println();
-                state = state.callerState();
-            } while (state != null);
+            }
+            out.println();
         }
 
         // print values on stack