rust/compiler/rustc_codegen_llvm
Jubilee 7f8108afc8
Rollup merge of #136053 - Zalathar:defer-counters, r=saethlin
coverage: Defer part of counter-creation until codegen

Follow-up to #135481 and #135873.

One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions.

Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job.

(That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)
2025-02-10 00:51:49 -08:00
..
src Rollup merge of #136053 - Zalathar:defer-counters, r=saethlin 2025-02-10 00:51:49 -08:00
Cargo.toml Note that cg_llvm's gimli should match the version used elsewhere 2025-01-21 14:41:44 +11:00
messages.ftl Auto merge of #134794 - RalfJung:abi-required-target-features, r=workingjubilee 2025-01-05 23:21:06 +00:00
README.md mv compiler to compiler/ 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.