rust/tests
bors 36aab8df0a Auto merge of #115301 - Zalathar:regions-vec, r=davidtwco
coverage: Allow each coverage statement to have multiple code regions

The original implementation of coverage instrumentation was built around the assumption that a coverage counter/expression would be associated with *up to one* code region. When it was discovered that *multiple* regions would sometimes need to share a counter, a workaround was found: for the remaining regions, the instrumentor would create a fresh expression that adds zero  to the existing counter/expression.

That got the job done, but resulted in some awkward code, and produces unnecessarily complicated coverage maps in the final binary.

---

This PR removes that tension by changing `StatementKind::Coverage`'s code region field from `Option<CodeRegion>` to `Vec<CodeRegion>`.

The changes on the codegen side are fairly straightforward. As long as each `CoverageKind::Counter` only injects one `llvm.instrprof.increment`, the rest of coverage codegen is happy to handle multiple regions mapped to the same counter/expression, with only minor option-to-vec adjustments.

On the instrumentor/mir-transform side, we can get rid of the code that creates extra (x + 0) expressions. Instead we gather all of the code regions associated with a single BCB, and inject them all into one coverage statement.

---

There are several patches here but they can be divided in to three phases:
- Preparatory work
- Actually switching over to multiple regions per coverage statement
- Cleaning up

So viewing the patches individually may be easier.
2023-10-03 18:36:21 +00:00
..
assembly Limit to LLVM 17.0.2 to work around WinEH codegen bug 2023-10-02 11:06:38 +02:00
auxiliary
codegen Limit to LLVM 17.0.2 to work around WinEH codegen bug 2023-10-02 11:06:38 +02:00
codegen-units
coverage-map coverage: Store each BCB's code regions in one coverage statement 2023-10-03 13:03:39 +11:00
debuginfo Auto merge of #115128 - davidtwco:re-enable-debuginfo-test, r=wesleywiser 2023-09-12 19:39:27 +00:00
incremental Rollup merge of #116263 - ferrocene:pa-more-bare-metal-fixes, r=oli-obk 2023-09-29 22:27:52 +02:00
mir-opt Auto merge of #115301 - Zalathar:regions-vec, r=davidtwco 2023-10-03 18:36:21 +00:00
pretty Rework no_coverage to coverage(off) 2023-09-08 12:46:06 +01:00
run-coverage coverage: Regression test for functions with unreachable bodies 2023-10-01 14:44:27 +11:00
run-coverage-rustdoc Tidy up some awkwardly-placed comments in tests 2023-08-26 14:35:34 +10:00
run-make Auto merge of #113301 - Be-ing:stabilize_bundle_whole-archive, r=petrochenkov 2023-09-29 15:51:48 +00:00
run-make-fulldeps Merge ExternProviders into the general Providers struct 2023-09-22 20:15:34 +00:00
run-pass-valgrind
rustdoc rustdoc: add URLs for test issues 2023-09-27 17:22:18 -07:00
rustdoc-gui Migrate GUI colors test to original CSS color format 2023-09-23 20:03:03 +02:00
rustdoc-js rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00
rustdoc-js-std rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00
rustdoc-json Fix rustdoc-json tests 2023-08-23 11:52:49 -07:00
rustdoc-ui Add regression test for #102467 2023-09-24 14:09:38 +02:00
ui Rollup merge of #116379 - fmease:opaq-hid-inf-bnds-non-lt-bndrs, r=compiler-errors 2023-10-03 16:24:17 +02:00
ui-fulldeps Remove rustc_lint_defs::lint_array 2023-09-28 23:01:25 +02:00
COMPILER_TESTS.md