Remove obsolete LiveRange::FirstPosWithHint helper.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent dbcd0e92
...@@ -229,13 +229,6 @@ bool LiveRange::CanBeSpilled(LifetimePosition pos) { ...@@ -229,13 +229,6 @@ bool LiveRange::CanBeSpilled(LifetimePosition pos) {
} }
UsePosition* LiveRange::FirstPosWithHint() const {
UsePosition* pos = first_pos_;
while (pos != NULL && !pos->HasHint()) pos = pos->next();
return pos;
}
LOperand* LiveRange::CreateAssignedOperand(Zone* zone) { LOperand* LiveRange::CreateAssignedOperand(Zone* zone) {
LOperand* op = NULL; LOperand* op = NULL;
if (HasRegisterAssigned()) { if (HasRegisterAssigned()) {
...@@ -1813,10 +1806,8 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) { ...@@ -1813,10 +1806,8 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) {
free_until_pos[cur_reg] = Min(free_until_pos[cur_reg], next_intersection); free_until_pos[cur_reg] = Min(free_until_pos[cur_reg], next_intersection);
} }
UsePosition* hinted_use = current->FirstPosWithHint(); LOperand* hint = current->FirstHint();
if (hinted_use != NULL) { if (hint != NULL && (hint->IsRegister() || hint->IsDoubleRegister())) {
LOperand* hint = hinted_use->hint();
if (hint->IsRegister() || hint->IsDoubleRegister()) {
int register_index = hint->index(); int register_index = hint->index();
TraceAlloc( TraceAlloc(
"Found reg hint %s (free until [%d) for live range %d (end %d[).\n", "Found reg hint %s (free until [%d) for live range %d (end %d[).\n",
...@@ -1834,7 +1825,6 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) { ...@@ -1834,7 +1825,6 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) {
return true; return true;
} }
} }
}
// Find the register which stays free for the longest time. // Find the register which stays free for the longest time.
int reg = 0; int reg = 0;
......
...@@ -328,10 +328,10 @@ class LiveRange: public ZoneObject { ...@@ -328,10 +328,10 @@ class LiveRange: public ZoneObject {
return assigned_register_ != kInvalidAssignment; return assigned_register_ != kInvalidAssignment;
} }
bool IsSpilled() const { return spilled_; } bool IsSpilled() const { return spilled_; }
UsePosition* FirstPosWithHint() const;
LOperand* FirstHint() const { LOperand* FirstHint() const {
UsePosition* pos = FirstPosWithHint(); UsePosition* pos = first_pos_;
while (pos != NULL && !pos->HasHint()) pos = pos->next();
if (pos != NULL) return pos->hint(); if (pos != NULL) return pos->hint();
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment