Stream: git-cranelift

Topic: cranelift / Issue #755 [meta] Allow to specify when an in...


view this post on Zulip GitHub (Feb 28 2020 at 23:25):

alexcrichton transferred Issue #755 (assigned to bnjbvr):

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: Oct 23 2024 at 20:03 UTC