Module cranelift_codegen::write
source · Expand description
Converting Cranelift IR to text.
The write module provides the write_function function which converts an IR Function to an
equivalent textual form. This textual form can be read back by the cranelift-reader crate.
Structs
- A
PlainWriterthat doesn’t decorate the function.
Traits
- A
FuncWriterused to decorate functions during printing.
Functions
- Writes
functowas text. write_function_plain is passed as ‘closure’ to print instructions as text. pretty_function_error is passed as ‘closure’ to add error decoration. - Write out the basic block header, outdented:
- Write
functowas equivalent text. Useisato emit ISA-dependent annotations. - Write the operands of
insttowwith a prepended space.