Files
rust/compiler/rustc_codegen_llvm
Jonathan Brouwer 8edd846028 Rollup merge of #156472 - stephenduong1004:print-stats-json, r=nikomatsakis
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.
2026-05-13 11:46:37 +02:00
..
2020-08-30 18:45:07 +03:00

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.