rust/compiler/rustc_codegen_ssa/src
Matthias Krüger 613bccc4ca
Rollup merge of #124555 - Zalathar:init-coverage, r=nnethercote
coverage: Clean up creation of MC/DC condition bitmaps

This PR improves the code for creating and initializing [MC/DC](https://en.wikipedia.org/wiki/Modified_condition/decision_coverage) condition bitmap variables, as introduced by #123409 and modified by #124255.

- The condition bitmap variables are now created eagerly at the start of per-function codegen, via a new `init_coverage` method in `CoverageInfoBuilderMethods`. This avoids having to retroactively create the bitmaps while doing codegen for an individual coverage statement.
- As a result, we can now create and initialize those bitmaps using existing safe APIs, instead of having to perform our own unsafe call to `llvm::LLVMBuildAlloca`.
- This PR also tweaks the way we count the number of condition bitmaps needed, by tracking the total number of bitmaps needed (max depth + 1), instead of only tracking the maximum depth. This reduces the potential for subtle off-by-one confusion.
2024-05-03 20:33:46 +02:00
..
back Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
debuginfo Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
mir coverage: Eagerly do start-of-function codegen for coverage 2024-05-01 09:06:53 +10:00
traits coverage: Eagerly do start-of-function codegen for coverage 2024-05-01 09:06:53 +10:00
assert_module_sources.rs Rename IntoDiagnosticArg as IntoDiagArg. 2024-03-11 09:12:19 +11:00
base.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
codegen_attrs.rs Rename NestedMetaItem::name_value_literal. 2024-04-24 16:28:34 +10:00
common.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
errors.rs remove extraneous note on UnableToRunDsymutil diagnostic 2024-04-26 17:24:06 +00:00
lib.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
meth.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
mono_item.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
size_of_val.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
target_features.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00