Stream: git-wasmtime

Topic: wasmtime / issue #2824 Cranelift: Rework or remove the Co...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2021 at 21:24):

akirilov-arm labeled issue #2824:

The old backends used the CodeSink to emit instruction bytes and relocations as they were being generated. The machinst backends store everything in a MachBuffer before finally emitting the compiled code one byte at a time to the CodeSink. Unlike a plain memcpy this is not easily vectorizable. In addition there are a lot of branches to check if the current instruction has a relocation, can trap or is a call site.

I propose that either the CodeSink interface is removed in favor of giving the embedder direct access to the MachBufferFinalized or the CodeSink interface will get a put_bytes function that allows copying all bytes at the same time in combination with explicit offsets for the reloc_external, trap and add_call_site methods.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2022 at 18:47):

cfallin closed issue #2824:

The old backends used the CodeSink to emit instruction bytes and relocations as they were being generated. The machinst backends store everything in a MachBuffer before finally emitting the compiled code one byte at a time to the CodeSink. Unlike a plain memcpy this is not easily vectorizable. In addition there are a lot of branches to check if the current instruction has a relocation, can trap or is a call site.

I propose that either the CodeSink interface is removed in favor of giving the embedder direct access to the MachBufferFinalized or the CodeSink interface will get a put_bytes function that allows copying all bytes at the same time in combination with explicit offsets for the reloc_external, trap and add_call_site methods.


Last updated: Dec 23 2024 at 12:05 UTC