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§
- Plain
Writer - A
PlainWriterthat doesn’t decorate the function.
Traits§
- Func
Writer - A
FuncWriterused to decorate functions during printing.
Functions§
- decorate_
function - 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_
block_ header - Write out the basic block header, outdented:
- write_
function - Write
functowas equivalent text. Useisato emit ISA-dependent annotations. - write_
function_ spec - Writes the spec (name and signature) of ‘func’ to ‘w’ as text.
- write_
operands - Write the operands of
insttowwith a prepended space.