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

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

Issue 2829093002: [turbofan] Avoid creating singleton state-values for the accumulator. (Closed)
Patch Set: Improve comment Created 3 years, 8 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/js-graph.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 e4dd0e1aaf5acdfaaf1cda19a64bba9368743b48..c22e104adb909bf80ad83cbf0e03ec0d4b498320 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -428,26 +428,15 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint(
liveness ? &liveness->bit_vector() : nullptr, 0);
bool accumulator_is_live = !liveness || liveness->AccumulatorIsLive();
- Node* accumulator_state_values;
- if (parameter_count() == 1 && accumulator_is_live &&
- values()->at(accumulator_base()) == values()->at(0)) {
- // Re-use the parameter state values if there happens to only be one
- // parameter and the accumulator is live and holds that parameter's value.
- accumulator_state_values = parameters_state_values_;
- } else {
- // Otherwise, use the state values cache to hopefully re-use local register
- // state values (if there is only one local register), or at the very least
- // re-use previous accumulator state values.
- accumulator_state_values = GetStateValuesFromCache(
- &values()->at(accumulator_base()), 1,
- liveness ? &liveness->bit_vector() : nullptr, register_count());
- }
+ Node* accumulator_state_value =
+ accumulator_is_live ? values()->at(accumulator_base())
+ : builder()->jsgraph()->OptimizedOutConstant();
const Operator* op = common()->FrameState(
bailout_id, combine, builder()->frame_state_function_info());
Node* result = graph()->NewNode(
op, parameters_state_values_, registers_state_values,
- accumulator_state_values, Context(), builder()->GetFunctionClosure(),
+ accumulator_state_value, Context(), builder()->GetFunctionClosure(),
builder()->graph()->start());
return result;
« no previous file with comments | « no previous file | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698