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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2428503002: [ignition/turbo] Add liveness analysis for the accumulator (Closed)
Patch Set: Remove unused accumulator state value read in release build Created 4 years, 2 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 | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/liveness-analyzer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 26deb67ff396c9d4be489b7a30b726f7db4a5caa..26409d3696426906fd5dba410ab1b631e220cb76 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -259,6 +259,10 @@ bool BytecodeGraphBuilder::Environment::IsLivenessBlockConsistent() const {
}
Node* BytecodeGraphBuilder::Environment::LookupAccumulator() const {
+ DCHECK(IsLivenessBlockConsistent());
+ if (liveness_block() != nullptr) {
+ liveness_block()->LookupAccumulator();
+ }
return values()->at(accumulator_base_);
}
@@ -295,6 +299,10 @@ void BytecodeGraphBuilder::Environment::BindAccumulator(
if (states) {
states->AddToNode(node, OutputFrameStateCombine::PokeAt(0));
}
+ DCHECK(IsLivenessBlockConsistent());
+ if (liveness_block() != nullptr) {
+ liveness_block()->BindAccumulator();
+ }
values()->at(accumulator_base_) = node;
}
@@ -612,7 +620,8 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
info->is_deoptimization_enabled()),
state_values_cache_(jsgraph),
liveness_analyzer_(
- static_cast<size_t>(bytecode_array()->register_count()), local_zone),
+ static_cast<size_t>(bytecode_array()->register_count()), true,
+ local_zone),
source_positions_(source_positions) {}
Node* BytecodeGraphBuilder::GetNewTarget() {
@@ -698,7 +707,7 @@ void BytecodeGraphBuilder::ClearNonLiveSlotsInFrameStates() {
}
NonLiveFrameStateSlotReplacer replacer(
&state_values_cache_, jsgraph()->OptimizedOutConstant(),
- liveness_analyzer()->local_count(), local_zone());
+ liveness_analyzer()->local_count(), true, local_zone());
liveness_analyzer()->Run(&replacer);
if (FLAG_trace_environment_liveness) {
OFStream os(stdout);
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/liveness-analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698