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
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")
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());
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();
}
-UsePosition* LiveRange::AddUsePosition(LifetimePosition pos) {
- return AddUsePosition(pos, CreateAssignedOperand());
-}
-
-
bool LiveRange::CanCover(LifetimePosition position) const {
if (IsEmpty()) return false;
return Start().Value() <= position.Value() &&
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; }
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);