Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java @ 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 | 5e22e6a76ac7 |
children |
comparison
equal
deleted
inserted
replaced
15933:0fdfff835128 | 15934:c73fad48e90d |
---|---|
238 } | 238 } |
239 // set currentPosition prior to call of walkTo | 239 // set currentPosition prior to call of walkTo |
240 currentPosition = toOpId; | 240 currentPosition = toOpId; |
241 | 241 |
242 if (currentPosition <= allocator.maxOpId()) { | 242 if (currentPosition <= allocator.maxOpId()) { |
243 // update unhandled stack intervals | |
244 updateUnhandledStackIntervals(toOpId); | |
245 | |
243 // call walkTo if still in range | 246 // call walkTo if still in range |
244 walkTo(State.Active, toOpId); | 247 walkTo(State.Active, toOpId); |
245 walkTo(State.Inactive, toOpId); | 248 walkTo(State.Inactive, toOpId); |
246 } | 249 } |
247 } | 250 } |
263 */ | 266 */ |
264 private void updateUnhandledStackIntervals(int opId) { | 267 private void updateUnhandledStackIntervals(int opId) { |
265 Interval currentInterval = unhandledLists.get(RegisterBinding.Stack); | 268 Interval currentInterval = unhandledLists.get(RegisterBinding.Stack); |
266 while (currentInterval != Interval.EndMarker && currentInterval.from() <= opId) { | 269 while (currentInterval != Interval.EndMarker && currentInterval.from() <= opId) { |
267 Interval next = currentInterval.next; | 270 Interval next = currentInterval.next; |
268 currentInterval.state = State.Active; | 271 if (currentInterval.to() > opId) { |
269 activeLists.addToListSortedByCurrentFromPositions(RegisterBinding.Stack, currentInterval); | 272 currentInterval.state = State.Active; |
270 intervalMoved(currentInterval, State.Unhandled, State.Active); | 273 activeLists.addToListSortedByCurrentFromPositions(RegisterBinding.Stack, currentInterval); |
274 intervalMoved(currentInterval, State.Unhandled, State.Active); | |
275 } else { | |
276 currentInterval.state = State.Handled; | |
277 intervalMoved(currentInterval, State.Unhandled, State.Handled); | |
278 } | |
271 currentInterval = next; | 279 currentInterval = next; |
272 } | 280 } |
273 unhandledLists.set(RegisterBinding.Stack, currentInterval); | 281 unhandledLists.set(RegisterBinding.Stack, currentInterval); |
274 } | 282 } |
275 | 283 |