Stream: git-wasmtime

Topic: wasmtime / PR #8308 cranelift/aarch64: Remove types from ...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:02):

jameysharp opened PR #8308 from jameysharp:aarch64-untyped to bytecodealliance:main:

Previously, the precondition on every use of AMode::*Offset was that the type specified in the address mode must be the same size as the access type of the memory instruction where the address mode was used.

However, at the point where we replace these magic address modes with real modes that the target architecture understands, we know what instruction is using the address, so we can get the type from there.

This simplifies constructing addresses while also ensuring that the types are always correct.

The changes here center around threading the access type through mem_finalize and AMode::pretty_print, then deleting it from all AMode variants.

In the process I introduced a helper method on Inst to centralize the mapping from instruction to access type, and used that everywhere.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:02):

jameysharp requested cfallin for a review on PR #8308.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:02):

jameysharp requested wasmtime-compiler-reviewers for a review on PR #8308.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:21):

cfallin submitted PR review:

This seems quite sensible -- thanks! I think the original thought I had had was to keep the AMode self-describing as much as possible but this PR shows we have the type implicitly from context anywhere we need it and so it's nicer not to have a redundant encoding. So, very good cleanup.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:53):

jameysharp updated PR #8308.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 21:53):

jameysharp has enabled auto merge for PR #8308.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 22:44):

github-actions[bot] commented on PR #8308:

Subscribe to Label Action

cc @saulecabrera

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "winch"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 05 2024 at 22:55):

jameysharp merged PR #8308.


Last updated: Dec 23 2024 at 13:07 UTC