Stream: git-wasmtime

Topic: wasmtime / Issue #1086 [meta] Allow to specify when an in...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 17:01):

bnjbvr commented on Issue #1086:

Not needed anymore thanks to the New Backend and its load folding mecanism, closing.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 17:01):

bnjbvr closed Issue #1086:

Cranelift instructions sometimes have a variant taking an immediate as one operand (e.g. icmp has icmp_imm) or a complex operand (that is, register + shifted register + offset, if I'm not mistaken; see for instance load which has the load_complex variant). These instructions are defined manually, and the simple_preopt pass contains a manual replacement of the normal variant by the immediate variant, for some given functions.

I'd like to implement helpers in the meta-language to signal that a given instruction also has an immediate variant, or a complex one. This would automatically create the new Cranelift instructions with the suffixes, so they're just plain instructions from codegen's point of view. This should allow us to have many more complex encodings (nice for performance), but also more immediate encodings (both would be great to lower register pressure), and hopefully we can have automatically generated code to replace a given instruction by its immediate (as done in simple_preopt) or its complex (as done in postopt) counterpart.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 17:01):

bnjbvr unassigned Issue #1086:

Cranelift instructions sometimes have a variant taking an immediate as one operand (e.g. icmp has icmp_imm) or a complex operand (that is, register + shifted register + offset, if I'm not mistaken; see for instance load which has the load_complex variant). These instructions are defined manually, and the simple_preopt pass contains a manual replacement of the normal variant by the immediate variant, for some given functions.

I'd like to implement helpers in the meta-language to signal that a given instruction also has an immediate variant, or a complex one. This would automatically create the new Cranelift instructions with the suffixes, so they're just plain instructions from codegen's point of view. This should allow us to have many more complex encodings (nice for performance), but also more immediate encodings (both would be great to lower register pressure), and hopefully we can have automatically generated code to replace a given instruction by its immediate (as done in simple_preopt) or its complex (as done in postopt) counterpart.


Last updated: Dec 23 2024 at 13:07 UTC