Commit d3c02d30 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Keep all WebAssembly optimizations Isolate independent.

R=titzer@chromium.org

Change-Id: Ia2217d4f3ff9c8f1929ac622c96d6c4b75e6c091
Reviewed-on: https://chromium-review.googlesource.com/1072655Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53367}
parent 8b5510c3
......@@ -973,6 +973,8 @@ PipelineWasmCompilationJob::Status
PipelineWasmCompilationJob::ExecuteJobImpl() {
pipeline_.RunPrintAndVerify("Machine", true);
if (FLAG_wasm_opt || asmjs_origin_) {
// WASM compilations must *always* be independent of the isolate.
Isolate* isolate = nullptr;
PipelineData* data = &data_;
PipelineRunScope scope(data, "wasm optimization");
GraphReducer graph_reducer(scope.zone(), data->graph(),
......@@ -981,9 +983,9 @@ PipelineWasmCompilationJob::ExecuteJobImpl() {
data->common(), scope.zone());
ValueNumberingReducer value_numbering(scope.zone(), data->graph()->zone());
MachineOperatorReducer machine_reducer(data->mcgraph(), asmjs_origin_);
CommonOperatorReducer common_reducer(data->isolate(), &graph_reducer,
data->graph(), data->common(),
data->machine(), scope.zone());
CommonOperatorReducer common_reducer(isolate, &graph_reducer, data->graph(),
data->common(), data->machine(),
scope.zone());
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &machine_reducer);
AddReducer(data, &graph_reducer, &common_reducer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment