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

Side by Side Diff: src/compiler/ast-graph-builder.h

Issue 1193833002: [turbofan] Proper dead code elimination as regular reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed DeadControl to Dead. Created 5 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
« no previous file with comments | « BUILD.gn ('k') | src/compiler/ast-graph-builder.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/liveness-analyzer.h" 10 #include "src/compiler/liveness-analyzer.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 479
480 // Effect dependency tracked by this environment. 480 // Effect dependency tracked by this environment.
481 Node* GetEffectDependency() { return effect_dependency_; } 481 Node* GetEffectDependency() { return effect_dependency_; }
482 void UpdateEffectDependency(Node* dependency) { 482 void UpdateEffectDependency(Node* dependency) {
483 effect_dependency_ = dependency; 483 effect_dependency_ = dependency;
484 } 484 }
485 485
486 // Mark this environment as being unreachable. 486 // Mark this environment as being unreachable.
487 void MarkAsUnreachable() { 487 void MarkAsUnreachable() {
488 UpdateControlDependency(builder()->jsgraph()->DeadControl()); 488 UpdateControlDependency(builder()->jsgraph()->Dead());
489 liveness_block_ = nullptr; 489 liveness_block_ = nullptr;
490 } 490 }
491 bool IsMarkedAsUnreachable() { 491 bool IsMarkedAsUnreachable() {
492 return GetControlDependency()->opcode() == IrOpcode::kDeadControl; 492 return GetControlDependency()->opcode() == IrOpcode::kDead;
493 } 493 }
494 494
495 // Merge another environment into this one. 495 // Merge another environment into this one.
496 void Merge(Environment* other); 496 void Merge(Environment* other);
497 497
498 // Copies this environment at a control-flow split point. 498 // Copies this environment at a control-flow split point.
499 Environment* CopyForConditional(); 499 Environment* CopyForConditional();
500 500
501 // Copies this environment to a potentially unreachable control-flow point. 501 // Copies this environment to a potentially unreachable control-flow point.
502 Environment* CopyAsUnreachable(); 502 Environment* CopyAsUnreachable();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 // Prepare environment to be used as loop header. 535 // Prepare environment to be used as loop header.
536 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 536 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
537 }; 537 };
538 538
539 } // namespace compiler 539 } // namespace compiler
540 } // namespace internal 540 } // namespace internal
541 } // namespace v8 541 } // namespace v8
542 542
543 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 543 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698