mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
8edd846028
Add support for Zprint-codegen-stats-json Add a flag `-Zprint-codegen-stats-json=<file>` to collect and write LLVM statistics in JSON format. It makes use of the function `llvm::PrintStatisticsJSON` in LLVM. The flag currently only obtains LLVM statistics for now, but could be used to collect more front-end statistics in the future.
The codegen crate contains the code to convert from MIR into LLVM IR,
and then from LLVM IR into machine code. In general it contains code
that runs towards the end of the compilation process.
For more information about how codegen works, see the rustc dev guide.