Stream: cranelift

Topic: cranelift type inference?


view this post on Zulip McCoy (Jan 02 2022 at 00:00):

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?

Standalone JIT-style runtime for WebAssembly, using Cranelift - wasmtime/ir.md at main · bytecodealliance/wasmtime

view this post on Zulip bjorn3 (Jan 02 2022 at 11:23):

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

Standalone JIT-style runtime for WebAssembly, using Cranelift - wasmtime/gen_inst.rs at dd85d66ec353959479f7d8518a79d0c7d0b9e3ad · bytecodealliance/wasmtime
Standalone JIT-style runtime for WebAssembly, using Cranelift - wasmtime/gen_inst.rs at dd85d66ec353959479f7d8518a79d0c7d0b9e3ad · bytecodealliance/wasmtime

Last updated: Dec 23 2024 at 12:05 UTC