diff graal/GraalCompiler/src/com/sun/c1x/graph/IR.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 e1b3db8031ee
children 4a36a0bd6d18
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Fri Apr 29 11:50:28 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Fri Apr 29 13:19:17 2011 +0200
@@ -54,10 +54,7 @@
      */
     public BlockBegin osrEntryBlock;
 
-    /**
-     * The top IRScope.
-     */
-    public IRScope topScope;
+    private int maxLocks;
 
     /**
      * The linear-scan ordered list of blocks.
@@ -95,10 +92,8 @@
     }
 
     private void buildGraph() {
-        topScope = new IRScope(null, null, compilation.method, -1);
-
         // Graph builder must set the startBlock and the osrEntryBlock
-        new GraphBuilder(compilation, this).build(topScope);
+        new GraphBuilder(compilation, this).build();
         assert startBlock != null;
         verifyAndPrint("After graph building");
 
@@ -259,4 +254,23 @@
     public int numLoops() {
         return compilation.stats.loopCount;
     }
+
+    /**
+     * Updates the maximum number of locks held at any one time.
+     *
+     * @param locks a lock count that will replace the current {@linkplain #maxLocks() max locks} if it is greater
+     */
+    public void updateMaxLocks(int locks) {
+        if (locks > maxLocks) {
+            maxLocks = locks;
+        }
+    }
+
+    /**
+     * Gets the number of locks
+     * @return the number of locks
+     */
+    public final int maxLocks() {
+        return maxLocks;
+    }
 }