rustc_codegen_cranelift icon indicating copy to clipboard operation
rustc_codegen_cranelift copied to clipboard

Faster clif ir writing for debugging

Open bjorn3 opened this issue 6 years ago • 1 comments

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.

bjorn3 avatar Sep 13 '19 18:09 bjorn3

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

sunfishcode avatar Sep 13 '19 20:09 sunfishcode

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.

bjorn3 avatar Apr 07 '24 16:04 bjorn3