Revision: 14543
Author: mstarzin...@chromium.org
Date: Fri May 3 05:49:48 2013
Log: Remove obsolete LiveRange::FirstPosWithHint helper.
R=svenpa...@chromium.org
Review URL: https://codereview.chromium.org/14650016
http://code.google.com/p/v8/source/detail?r=14543
Modified:
/branches/bleeding_edge/src/lithium-allocator.cc
/branches/bleeding_edge/src/lithium-allocator.h
=======================================
--- /branches/bleeding_edge/src/lithium-allocator.cc Fri May 3 01:09:37
2013
+++ /branches/bleeding_edge/src/lithium-allocator.cc Fri May 3 05:49:48
2013
@@ -227,13 +227,6 @@
return
use_pos->pos().Value() >
pos.NextInstruction().InstructionEnd().Value();
}
-
-
-UsePosition* LiveRange::FirstPosWithHint() const {
- UsePosition* pos = first_pos_;
- while (pos != NULL && !pos->HasHint()) pos = pos->next();
- return pos;
-}
LOperand* LiveRange::CreateAssignedOperand(Zone* zone) {
@@ -1813,26 +1806,23 @@
free_until_pos[cur_reg] = Min(free_until_pos[cur_reg],
next_intersection);
}
- UsePosition* hinted_use = current->FirstPosWithHint();
- if (hinted_use != NULL) {
- LOperand* hint = hinted_use->hint();
- if (hint->IsRegister() || hint->IsDoubleRegister()) {
- int register_index = hint->index();
- TraceAlloc(
- "Found reg hint %s (free until [%d) for live range %d
(end %d[).\n",
- RegisterName(register_index),
- free_until_pos[register_index].Value(),
- current->id(),
- current->End().Value());
+ LOperand* hint = current->FirstHint();
+ if (hint != NULL && (hint->IsRegister() || hint->IsDoubleRegister())) {
+ int register_index = hint->index();
+ TraceAlloc(
+ "Found reg hint %s (free until [%d) for live range %d
(end %d[).\n",
+ RegisterName(register_index),
+ free_until_pos[register_index].Value(),
+ current->id(),
+ current->End().Value());
- // The desired register is free until the end of the current live
range.
- if (free_until_pos[register_index].Value() >=
current->End().Value()) {
- TraceAlloc("Assigning preferred reg %s to live range %d\n",
- RegisterName(register_index),
- current->id());
- SetLiveRangeAssignedRegister(current, register_index, mode_,
zone_);
- return true;
- }
+ // The desired register is free until the end of the current live
range.
+ if (free_until_pos[register_index].Value() >= current->End().Value()) {
+ TraceAlloc("Assigning preferred reg %s to live range %d\n",
+ RegisterName(register_index),
+ current->id());
+ SetLiveRangeAssignedRegister(current, register_index, mode_, zone_);
+ return true;
}
}
=======================================
--- /branches/bleeding_edge/src/lithium-allocator.h Tue Apr 30 01:21:52 2013
+++ /branches/bleeding_edge/src/lithium-allocator.h Fri May 3 05:49:48 2013
@@ -328,10 +328,10 @@
return assigned_register_ != kInvalidAssignment;
}
bool IsSpilled() const { return spilled_; }
- UsePosition* FirstPosWithHint() 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();
return NULL;
}
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.