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

Side by Side Diff: src/compiler/state-values-utils.cc

Issue 949743002: [turbofan] Variable liveness analysis for deopt (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 5 years, 9 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
« no previous file with comments | « src/compiler/liveness-analyzer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/state-values-utils.h" 5 #include "src/compiler/state-values-utils.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 if (count == 1) { 164 if (count == 1) {
165 return (*buffer)[0]; 165 return (*buffer)[0];
166 } else { 166 } else {
167 return GetValuesNodeFromCache(&(buffer->front()), count); 167 return GetValuesNodeFromCache(&(buffer->front()), count);
168 } 168 }
169 } 169 }
170 170
171 171
172 Node* StateValuesCache::GetNodeForValues(Node** values, size_t count) { 172 Node* StateValuesCache::GetNodeForValues(Node** values, size_t count) {
173 #if DEBUG
174 for (size_t i = 0; i < count; i++) {
175 DCHECK_NE(values[i]->opcode(), IrOpcode::kStateValues);
176 }
177 #endif
173 if (count == 0) { 178 if (count == 0) {
174 return GetEmptyStateValues(); 179 return GetEmptyStateValues();
175 } 180 }
176 size_t height = 0; 181 size_t height = 0;
177 size_t max_nodes = 1; 182 size_t max_nodes = 1;
178 while (count > max_nodes) { 183 while (count > max_nodes) {
179 height++; 184 height++;
180 max_nodes *= kMaxInputCount; 185 max_nodes *= kMaxInputCount;
181 } 186 }
182 187
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } else { 289 } else {
285 count++; 290 count++;
286 } 291 }
287 } 292 }
288 return count; 293 return count;
289 } 294 }
290 295
291 } // namespace compiler 296 } // namespace compiler
292 } // namespace internal 297 } // namespace internal
293 } // namespace v8 298 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/liveness-analyzer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698