rust-lang / rustc_codegen_cranelift

Cranelift based backend for rustc
Apache License 2.0
1.61k stars 100 forks source link

Faster clif ir writing for debugging #710

Closed bjorn3 closed 6 months ago

bjorn3 commented 5 years ago

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.

sunfishcode commented 5 years ago

We do have a crate for serializing Cranelift IR to serde: https://github.com/CraneStation/cranelift/tree/master/cranelift-serde.

bjorn3 commented 6 months ago

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.