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

Side by Side Diff: src/compiler/escape-analysis-reducer.cc

Issue 2500143003: [turbofan] Make escape analysis fail silently for cyclic object states (Closed)
Patch Set: regolden Created 4 years, 1 month 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/escape-analysis-reducer.h ('k') | src/compiler/pipeline.cc » ('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/escape-analysis-reducer.h" 5 #include "src/compiler/escape-analysis-reducer.h"
6 6
7 #include "src/compiler/all-nodes.h" 7 #include "src/compiler/all-nodes.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/counters.h" 9 #include "src/counters.h"
10 10
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 TRACE("Reducing State Input #%d (%s)\n", input->id(), 321 TRACE("Reducing State Input #%d (%s)\n", input->id(),
322 input->op()->mnemonic()); 322 input->op()->mnemonic());
323 Node* clone = nullptr; 323 Node* clone = nullptr;
324 if (input->opcode() == IrOpcode::kFinishRegion || 324 if (input->opcode() == IrOpcode::kFinishRegion ||
325 input->opcode() == IrOpcode::kAllocate) { 325 input->opcode() == IrOpcode::kAllocate) {
326 if (escape_analysis()->IsVirtual(input)) { 326 if (escape_analysis()->IsVirtual(input)) {
327 if (escape_analysis()->IsCyclicObjectState(effect, input)) { 327 if (escape_analysis()->IsCyclicObjectState(effect, input)) {
328 // TODO(mstarzinger): Represent cyclic object states differently to 328 // TODO(mstarzinger): Represent cyclic object states differently to
329 // ensure the scheduler can properly handle such object states. 329 // ensure the scheduler can properly handle such object states.
330 FATAL("Cyclic object state detected by escape analysis."); 330 compilation_failed_ = true;
331 return nullptr;
331 } 332 }
332 if (Node* object_state = 333 if (Node* object_state =
333 escape_analysis()->GetOrCreateObjectState(effect, input)) { 334 escape_analysis()->GetOrCreateObjectState(effect, input)) {
334 if (node_multiused || (multiple_users && !already_cloned)) { 335 if (node_multiused || (multiple_users && !already_cloned)) {
335 TRACE("Cloning #%d", node->id()); 336 TRACE("Cloning #%d", node->id());
336 node = clone = jsgraph()->graph()->CloneNode(node); 337 node = clone = jsgraph()->graph()->CloneNode(node);
337 TRACE(" to #%d\n", node->id()); 338 TRACE(" to #%d\n", node->id());
338 node_multiused = false; 339 node_multiused = false;
339 already_cloned = true; 340 already_cloned = true;
340 } 341 }
(...skipping 20 matching lines...) Expand all
361 } 362 }
362 } 363 }
363 #endif // DEBUG 364 #endif // DEBUG
364 } 365 }
365 366
366 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } 367 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); }
367 368
368 } // namespace compiler 369 } // namespace compiler
369 } // namespace internal 370 } // namespace internal
370 } // namespace v8 371 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/escape-analysis-reducer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698