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
PlainWriter
that doesn’t decorate the function.
Traits
- A
FuncWriter
used to decorate functions during printing.
Functions
- Writes
func
tow
as 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
func
tow
as equivalent text. Useisa
to emit ISA-dependent annotations. - Write the operands of
inst
tow
with a prepended space.