Fix debug tracing of live ranges and remove unused code.

When printing the sub-parts of a live range, only print the use intervals
belonging to each part.

Add a flag to print all use positions (incl. environment uses)


Review URL: http://codereview.chromium.org/6566005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0d067b56
......@@ -120,6 +120,7 @@ DEFINE_bool(time_hydrogen, false, "timing for hydrogen")
DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file")
DEFINE_bool(trace_inlining, false, "trace inlining decisions")
DEFINE_bool(trace_alloc, false, "trace register allocator")
DEFINE_bool(trace_all_uses, false, "trace all use positions")
DEFINE_bool(trace_range, false, "trace range analysis")
DEFINE_bool(trace_gvn, false, "trace global value numbering")
DEFINE_bool(trace_representation, false, "trace representation types")
......
......@@ -6016,7 +6016,7 @@ void HTracer::TraceLiveRange(LiveRange* range, const char* type) {
if (op != NULL && op->IsUnallocated()) hint_index = op->VirtualRegister();
trace_.Add(" %d %d", parent_index, hint_index);
UseInterval* cur_interval = range->first_interval();
while (cur_interval != NULL) {
while (cur_interval != NULL && range->Covers(cur_interval->start())) {
trace_.Add(" [%d, %d[",
cur_interval->start().Value(),
cur_interval->end().Value());
......@@ -6025,7 +6025,7 @@ void HTracer::TraceLiveRange(LiveRange* range, const char* type) {
UsePosition* current_pos = range->first_pos();
while (current_pos != NULL) {
if (current_pos->RegisterIsBeneficial()) {
if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) {
trace_.Add(" %d M", current_pos->pos().Value());
}
current_pos = current_pos->next();
......
......@@ -478,11 +478,6 @@ void LiveRange::ConvertOperands() {
}
UsePosition* LiveRange::AddUsePosition(LifetimePosition pos) {
return AddUsePosition(pos, CreateAssignedOperand());
}
bool LiveRange::CanCover(LifetimePosition position) const {
if (IsEmpty()) return false;
return Start().Value() <= position.Value() &&
......
......@@ -286,7 +286,6 @@ class LiveRange: public ZoneObject {
LiveRange* TopLevel() { return (parent_ == NULL) ? this : parent_; }
LiveRange* next() const { return next_; }
bool IsChild() const { return parent() != NULL; }
bool IsParent() const { return parent() == NULL; }
int id() const { return id_; }
bool IsFixed() const { return id_ < 0; }
bool IsEmpty() const { return first_interval() == NULL; }
......@@ -360,7 +359,6 @@ class LiveRange: public ZoneObject {
void EnsureInterval(LifetimePosition start, LifetimePosition end);
void AddUseInterval(LifetimePosition start, LifetimePosition end);
UsePosition* AddUsePosition(LifetimePosition pos, LOperand* operand);
UsePosition* AddUsePosition(LifetimePosition pos);
// Shorten the most recently added interval by setting a new start.
void ShortenTo(LifetimePosition start);
......
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