Closed bjorn3 closed 6 months ago
We do have a crate for serializing Cranelift IR to serde: https://github.com/CraneStation/cranelift/tree/master/cranelift-serde.
Probably not worth it anymore. I don't need clif ir printing as often anymore and in most cases where I do, I only need it for a small crate where printing is fast anyway.
We could for example use serde to store it in a binary format, instead of writing a text version. That would save a lot of disk space and reduce time spend performing IO. This will need a new binary to convert the bytes to human readable text.
This does not affect cg_clif built in release mode, as clif ir writing is disabled in that case.