Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: src/hydrogen.cc

Issue 310003003: More aggressive reuse of spill slots in the register allocator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/lithium-allocator.h » ('j') | src/lithium-allocator.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 11911 matching lines...) Expand 10 before | Expand all | Expand 10 after
11922 LOperand* op = range->CreateAssignedOperand(zone); 11922 LOperand* op = range->CreateAssignedOperand(zone);
11923 int assigned_reg = op->index(); 11923 int assigned_reg = op->index();
11924 if (op->IsDoubleRegister()) { 11924 if (op->IsDoubleRegister()) {
11925 trace_.Add(" \"%s\"", 11925 trace_.Add(" \"%s\"",
11926 DoubleRegister::AllocationIndexToString(assigned_reg)); 11926 DoubleRegister::AllocationIndexToString(assigned_reg));
11927 } else { 11927 } else {
11928 ASSERT(op->IsRegister()); 11928 ASSERT(op->IsRegister());
11929 trace_.Add(" \"%s\"", Register::AllocationIndexToString(assigned_reg)); 11929 trace_.Add(" \"%s\"", Register::AllocationIndexToString(assigned_reg));
11930 } 11930 }
11931 } else if (range->IsSpilled()) { 11931 } else if (range->IsSpilled()) {
11932 LOperand* op = range->TopLevel()->GetSpillOperand(); 11932 int index = -1;
11933 if (op->IsDoubleStackSlot()) { 11933 if (range->TopLevel()->GetSpillRangeId() != -1) {
11934 trace_.Add(" \"double_stack:%d\"", op->index()); 11934 index = range->TopLevel()->GetSpillRangeId();
11935 } else { 11935 } else {
11936 ASSERT(op->IsStackSlot()); 11936 index = range->TopLevel()->GetSpillOperand()->index();
11937 trace_.Add(" \"stack:%d\"", op->index()); 11937 }
11938 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) {
11939 trace_.Add(" \"double_stack:%d\"", index);
11940 } else {
11941 ASSERT(range->TopLevel()->Kind() == GENERAL_REGISTERS);
11942 trace_.Add(" \"stack:%d\"", index);
11938 } 11943 }
11939 } 11944 }
11940 int parent_index = -1; 11945 int parent_index = -1;
11941 if (range->IsChild()) { 11946 if (range->IsChild()) {
11942 parent_index = range->parent()->id(); 11947 parent_index = range->parent()->id();
11943 } else { 11948 } else {
11944 parent_index = range->id(); 11949 parent_index = range->id();
11945 } 11950 }
11946 LOperand* op = range->FirstHint(); 11951 LOperand* op = range->FirstHint();
11947 int hint_index = -1; 11952 int hint_index = -1;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
12055 if (ShouldProduceTraceOutput()) { 12060 if (ShouldProduceTraceOutput()) {
12056 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12061 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12057 } 12062 }
12058 12063
12059 #ifdef DEBUG 12064 #ifdef DEBUG
12060 graph_->Verify(false); // No full verify. 12065 graph_->Verify(false); // No full verify.
12061 #endif 12066 #endif
12062 } 12067 }
12063 12068
12064 } } // namespace v8::internal 12069 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/lithium-allocator.h » ('j') | src/lithium-allocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698