changeset 15934:c73fad48e90d

LSRA: skip handled intervals in IntervalWalker.updateUnhandledStackIntervals(int).
author Josef Eisl <josef.eisl@jku.at>
date Mon, 26 May 2014 16:35:59 +0200
parents 0fdfff835128
children 705fe382e2da
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java	Mon May 26 15:44:57 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java	Mon May 26 16:35:59 2014 +0200
@@ -240,6 +240,9 @@
         currentPosition = toOpId;
 
         if (currentPosition <= allocator.maxOpId()) {
+            // update unhandled stack intervals
+            updateUnhandledStackIntervals(toOpId);
+
             // call walkTo if still in range
             walkTo(State.Active, toOpId);
             walkTo(State.Inactive, toOpId);
@@ -265,9 +268,14 @@
         Interval currentInterval = unhandledLists.get(RegisterBinding.Stack);
         while (currentInterval != Interval.EndMarker && currentInterval.from() <= opId) {
             Interval next = currentInterval.next;
-            currentInterval.state = State.Active;
-            activeLists.addToListSortedByCurrentFromPositions(RegisterBinding.Stack, currentInterval);
-            intervalMoved(currentInterval, State.Unhandled, State.Active);
+            if (currentInterval.to() > opId) {
+                currentInterval.state = State.Active;
+                activeLists.addToListSortedByCurrentFromPositions(RegisterBinding.Stack, currentInterval);
+                intervalMoved(currentInterval, State.Unhandled, State.Active);
+            } else {
+                currentInterval.state = State.Handled;
+                intervalMoved(currentInterval, State.Unhandled, State.Handled);
+            }
             currentInterval = next;
         }
         unhandledLists.set(RegisterBinding.Stack, currentInterval);