Use first position in LAllocator ordering heuristic.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 3 May 2013 08:09:37 +0000 (08:09 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 3 May 2013 08:09:37 +0000 (08:09 +0000)
This changes the tiebreaker for LAllocator's ordering heuristic of
live ranges to use the first use position instead of the first hinted
use position. Searching for the first hinted position introduces
unnecessary overhead.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14855010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/lithium-allocator.cc

index d66f6b0..c80c467 100644 (file)
@@ -377,7 +377,7 @@ bool LiveRange::ShouldBeAllocatedBefore(const LiveRange* other) const {
   LifetimePosition start = Start();
   LifetimePosition other_start = other->Start();
   if (start.Value() == other_start.Value()) {
-    UsePosition* pos = FirstPosWithHint();
+    UsePosition* pos = first_pos();
     if (pos == NULL) return false;
     UsePosition* other_pos = other->first_pos();
     if (other_pos == NULL) return true;