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

Unified Diff: src/compiler/ast-graph-builder.h

Issue 1148133002: [turbofan] Fix variable liveness control structure creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move the consistency check to a separate method. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.h
diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h
index ce959b2d03424651321bf336248af725a52cf8e8..c7d604cada8a374fc622a3c1aed08eedbd1dea23 100644
--- a/src/compiler/ast-graph-builder.h
+++ b/src/compiler/ast-graph-builder.h
@@ -459,6 +459,7 @@ class AstGraphBuilder::Environment : public ZoneObject {
// Mark this environment as being unreachable.
void MarkAsUnreachable() {
UpdateControlDependency(builder()->jsgraph()->DeadControl());
+ liveness_block_ = nullptr;
}
bool IsMarkedAsUnreachable() {
return GetControlDependency()->opcode() == IrOpcode::kDead;
@@ -468,20 +469,13 @@ class AstGraphBuilder::Environment : public ZoneObject {
void Merge(Environment* other);
// Copies this environment at a control-flow split point.
- Environment* CopyForConditional() { return Copy(); }
+ Environment* CopyForConditional();
// Copies this environment to a potentially unreachable control-flow point.
- Environment* CopyAsUnreachable() {
- Environment* env = Copy();
- env->MarkAsUnreachable();
- return env;
- }
+ Environment* CopyAsUnreachable();
// Copies this environment at a loop header control-flow point.
- Environment* CopyForLoop(BitVector* assigned, bool is_osr = false) {
- PrepareForLoop(assigned, is_osr);
- return CopyAndShareLiveness();
- }
+ Environment* CopyForLoop(BitVector* assigned, bool is_osr = false);
private:
AstGraphBuilder* builder_;
@@ -496,8 +490,8 @@ class AstGraphBuilder::Environment : public ZoneObject {
Node* locals_node_;
Node* stack_node_;
- explicit Environment(Environment* copy);
- Environment* Copy() { return new (zone()) Environment(this); }
+ explicit Environment(Environment* copy,
+ LivenessAnalyzerBlock* liveness_block);
Environment* CopyAndShareLiveness();
void UpdateStateValues(Node** state_values, int offset, int count);
void UpdateStateValuesWithCache(Node** state_values, int offset, int count);
@@ -508,6 +502,8 @@ class AstGraphBuilder::Environment : public ZoneObject {
NodeVector* values() { return &values_; }
NodeVector* contexts() { return &contexts_; }
LivenessAnalyzerBlock* liveness_block() { return liveness_block_; }
+ bool IsLivenessAnalysisEnabled();
+ bool IsLivenessBlockConsistent();
// Prepare environment to be used as loop header.
void PrepareForLoop(BitVector* assigned, bool is_osr = false);
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698