I was checking out the IR reference: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/docs/ir.md it seems like any type information is not displayed when printing the IR. I checked out the InstBuilder
https://docs.rs/cranelift-codegen/latest/cranelift_codegen/ir/trait.InstBuilder.html and also noticed (similarly) that most instruction creation doesn't require specifying types. How should I understand types in cranelift?
The table of type constraints for instructions is generated at https://github.com/bytecodealliance/wasmtime/blob/dd85d66ec353959479f7d8518a79d0c7d0b9e3ad/cranelift/codegen/meta/src/gen_inst.rs#L722 For getting the control typevar when creating an instruction see https://github.com/bytecodealliance/wasmtime/blob/dd85d66ec353959479f7d8518a79d0c7d0b9e3ad/cranelift/codegen/meta/src/gen_inst.rs#L1012
Last updated: Dec 23 2024 at 12:05 UTC