In some cases, compute_size() is used to choose between various different Encodings before one has been assigned to an instruction. For x86, the REX.W bit is stored in the Encoding. To share recipes between REX/non-REX, that bit must be inspected by compute_size().
This crate contains the core Cranelift code generator. It translates code from an intermediate representation into executable machine code.