alexcrichton transferred Issue #734:
I'll use this issue as a dump for things that I've noticed could be enhanced for the legalization module in the Rust meta crate, probably better to do later once we've ported all of the meta code to Rust.
- [ ] Remove the ordering hack in the
x86
legalizer file, which was needed because we want to ensure the same ordering of transform groups as the Python module does (for encodings).- [x] When there are several legalizations available for a given Cranelift opcode (e.g. when the opcode is type-dependent), the generated code does unwrap the arguments from the instruction several times, and generates a predicate too. We could unwrap the arguments at the top once and for all, and then generate predicates for each type the legalization affects.
- [x] Remove the condition when the value of
predicate
is a plaintrue
.- [x] Try to gather the predicate conditions together, instead of refining the predicate (e.g.
let predicate = value_type == I64; let predicate = predicate && type_sets[42].contains(something);
etc).- [ ] Allow to bind several times in the
def!
macro.- [ ] Consider adding a
ToRustCode
andToRustComment
trait that structs can implement.
Last updated: Nov 22 2024 at 16:03 UTC