Commit 16aa6d04 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Remove obsolete i-cache flushes.

Now that we no longer use code specialization to patch WasmCode after it
was generated, we no longer need to flush the instruction cache after
instance building finishes.

R=clemensh@chromium.org

Change-Id: I4ce31876dde9c6dcc4ad945e024641b72330fe4f
Reviewed-on: https://chromium-review.googlesource.com/1128975Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54333}
parent 338f90a6
......@@ -6,7 +6,6 @@
#include "src/api.h"
#include "src/asmjs/asm-js.h"
#include "src/assembler-inl.h"
#include "src/base/optional.h"
#include "src/base/template-utils.h"
#include "src/base/utils/random-number-generator.h"
......@@ -389,8 +388,6 @@ wasm::WasmCode* LazyCompileFunction(Isolate* isolate,
auto counters = isolate->counters();
counters->wasm_lazily_compiled_functions()->Increment();
Assembler::FlushICache(wasm_code->instructions().start(),
wasm_code->instructions().size());
counters->wasm_generated_code_size()->Increment(
static_cast<int>(wasm_code->instructions().size()));
counters->wasm_reloc_size()->Increment(
......@@ -426,17 +423,6 @@ bool compile_lazy(const WasmModule* module) {
(FLAG_asm_wasm_lazy_compilation && module->origin == kAsmJsOrigin);
}
void FlushICache(const wasm::NativeModule* native_module) {
for (uint32_t i = native_module->num_imported_functions(),
e = native_module->num_functions();
i < e; ++i) {
const wasm::WasmCode* code = native_module->code(i);
if (code == nullptr) continue;
Assembler::FlushICache(code->instructions().start(),
code->instructions().size());
}
}
byte* raw_buffer_ptr(MaybeHandle<JSArrayBuffer> buffer, int offset) {
return static_cast<byte*>(buffer.ToHandleChecked()->backing_store()) + offset;
}
......@@ -1211,11 +1197,6 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
LoadDataSegments(instance);
}
//--------------------------------------------------------------------------
// Flush the processors instruction cache.
//--------------------------------------------------------------------------
FlushICache(native_module);
//--------------------------------------------------------------------------
// Install a finalizer on the new instance object.
//--------------------------------------------------------------------------
......
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