From f8ec0ac5a1a0392056d62beebf0ebb23c06df7e4 Mon Sep 17 00:00:00 2001 From: Georg Schmid Date: Tue, 11 Jun 2019 16:26:05 +0200 Subject: [PATCH] [csa] Enable more early CSA optimizations R=tebbi@chromium.org Change-Id: Iab4b0a69028386e79b9abdbcaee7fdb10871042f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1653119 Commit-Queue: Georg Schmid Reviewed-by: Tobias Tebbi Cr-Commit-Position: refs/heads/master@{#62100} --- src/codegen/optimized-compilation-info.cc | 6 ++++++ src/compiler/pipeline.cc | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/codegen/optimized-compilation-info.cc b/src/codegen/optimized-compilation-info.cc index 596d5c261e..41fb95c29e 100644 --- a/src/codegen/optimized-compilation-info.cc +++ b/src/codegen/optimized-compilation-info.cc @@ -75,9 +75,15 @@ void OptimizedCompilationInfo::ConfigureFlags() { break; case Code::BYTECODE_HANDLER: SetFlag(kCalledWithCodeStartRegister); + if (FLAG_turbo_splitting) { + MarkAsSplittingEnabled(); + } break; case Code::BUILTIN: case Code::STUB: + if (FLAG_turbo_splitting) { + MarkAsSplittingEnabled(); + } #if ENABLE_GDB_JIT_INTERFACE && DEBUG MarkAsSourcePositionsEnabled(); #endif // ENABLE_GDB_JIT_INTERFACE && DEBUG diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index fec0687810..1e2733ba4c 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -1572,8 +1572,20 @@ struct CsaEarlyOptimizationPhase { void Run(PipelineData* data, Zone* temp_zone) { GraphReducer graph_reducer(temp_zone, data->graph(), data->jsgraph()->Dead()); + BranchElimination branch_condition_elimination(&graph_reducer, + data->jsgraph(), temp_zone); + DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), + data->common(), temp_zone); + CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), + data->broker(), data->common(), + data->machine(), temp_zone); + ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); CsaLoadElimination load_elimination(&graph_reducer, data->jsgraph(), temp_zone); + AddReducer(data, &graph_reducer, &branch_condition_elimination); + AddReducer(data, &graph_reducer, &dead_code_elimination); + AddReducer(data, &graph_reducer, &common_reducer); + AddReducer(data, &graph_reducer, &value_numbering); AddReducer(data, &graph_reducer, &load_elimination); graph_reducer.ReduceGraph(); }