Skip to content

Rollup of 6 pull requests #136000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Jan 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
339616b
compiletest: implement `needs-subprocess` directive
jieyouxu Jan 23, 2025
669f4bc
rustc-dev-guide: document `needs-subprocess` directive
jieyouxu Jan 23, 2025
eee72ba
tests: adjust `tests/ui/issues/issue-39175.rs`
jieyouxu Jan 23, 2025
c7f9c30
tests: move `tests/ui/issues/issue-39175.rs` under `suggestions/` and…
jieyouxu Jan 23, 2025
5f63f2d
tests: slightly cleanup `tests/ui/command/command-pre-exec.rs`
jieyouxu Jan 23, 2025
f9addad
tests: cleanup `tests/ui/command/command-argv0.rs`
jieyouxu Jan 23, 2025
bfc553e
tests: cleanup `tests/ui/command/command-exec.rs`
jieyouxu Jan 23, 2025
2632fdc
tests: cleanup `tests/ui/process/core-run-destroy.rs`
jieyouxu Jan 23, 2025
8322609
tests: cleanup `tests/ui/process/signal-exit-status.rs`
jieyouxu Jan 23, 2025
02c003b
tests: cleanup `tests/ui/process/issue-20091.rs`
jieyouxu Jan 23, 2025
635a06b
tests: cleanup `tests/ui/process/process-exit.rs`
jieyouxu Jan 23, 2025
a4a3aca
tests: cleanup `tests/ui/process/fds-are-cloexec.rs`
jieyouxu Jan 23, 2025
b617aae
tests: cleanup `tests/ui/process/process-panic-after-fork.rs`
jieyouxu Jan 23, 2025
c7c1e4d
tests: cleanup `tests/ui/process/issue-14456.rs`
jieyouxu Jan 23, 2025
7eaa6ec
tests: cleanup `tests/ui/process/try-wait.rs`
jieyouxu Jan 23, 2025
0cc392e
tests: cleanup `tests/ui/process/sigpipe-should-be-ignored.rs`
jieyouxu Jan 23, 2025
a5d72f4
tests: cleanup `tests/ui/panic-runtime/lto-unwind.rs`
jieyouxu Jan 23, 2025
bb36a40
tests: cleanup `tests/ui/panic-runtime/abort.rs`
jieyouxu Jan 23, 2025
1abb936
tests: cleanup `tests/ui/process/issue-13304.rs`
jieyouxu Jan 23, 2025
91bd545
tests: cleanup `tests/ui/panic-runtime/lto-abort.rs`
jieyouxu Jan 23, 2025
5c1e2ec
tests: cleanup `tests/ui/panic-runtime/abort-link-to-unwinding-crates…
jieyouxu Jan 23, 2025
4b743a7
tests: cleanup `tests/ui/command/command-setgroups.rs`
jieyouxu Jan 23, 2025
e00e10c
tests: cleanup `tests/ui/std/thread-sleep-ms.rs`
jieyouxu Jan 23, 2025
a11227b
tests: update `tests/ui/issues/issue-2190-1.rs`
jieyouxu Jan 23, 2025
8a0310a
tests: use `needs-subprocess` instead of `ignore-{wasm32,emscripten,s…
jieyouxu Jan 23, 2025
071ad37
tests: use `needs-threads` instead of `ignore-emscripten`
jieyouxu Jan 23, 2025
b2ad126
Make `Vec::pop_if` a bit more presentable
GrigorenkoPV Jan 23, 2025
56c9267
allow different sized load and store
mustartt Jan 24, 2025
8a6e06f
Exclude `mir::coverage` types from TypeFoldable/TypeVisitable
Zalathar Jan 22, 2025
ec6fc95
coverage: Remove some dead code from MC/DC branch mapping conversion
Zalathar Jan 21, 2025
ff48331
coverage: Make query `coverage_ids_info` return an Option
Zalathar Jan 22, 2025
52c1bfa
coverage: Simplify how counter terms are stored
Zalathar Jan 21, 2025
4b20a27
coverage: Replace `FrozenUnionFind` with a plain IndexVec
Zalathar Jan 20, 2025
2bdc67a
coverage: Treat the "merged node flow graph" as a plain data struct
Zalathar Jan 21, 2025
7f10ab2
coverage: Tweak FileCheck directives in a mir-opt test
Zalathar Jan 22, 2025
5122c06
Refactor Python linting and formatting in tidy
Kobzol Jan 23, 2025
cd7be92
Document Python formatting and linting in the rustc-dev-guide
Kobzol Jan 23, 2025
9a85104
Make virtualenv creation in tidy more robust
Kobzol Jan 23, 2025
0f334ec
Update Python 3 versions in tidy
Kobzol Jan 23, 2025
3c3961b
Doc difference between extend and extend_from_slice
hkBst Jan 24, 2025
135cd69
Rollup merge of #135873 - Zalathar:be-prepared, r=oli-obk
matthiaskrgr Jan 24, 2025
e96bb6a
Rollup merge of #135926 - jieyouxu:needs-subprocess-thread, r=oli-obk
matthiaskrgr Jan 24, 2025
c459b17
Rollup merge of #135950 - Kobzol:tidy-python-improvements, r=onur-ozkan
matthiaskrgr Jan 24, 2025
b344e14
Rollup merge of #135956 - GrigorenkoPV:vec_pop_off, r=dtolnay
matthiaskrgr Jan 24, 2025
f86eb04
Rollup merge of #135966 - mustartt:fix-ppc-abi-test, r=workingjubilee
matthiaskrgr Jan 24, 2025
ed77bf7
Rollup merge of #135983 - hkBst:patch-13, r=jhpratt
matthiaskrgr Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
coverage: Remove some dead code from MC/DC branch mapping conversion
  • Loading branch information
Zalathar committed Jan 24, 2025
commit ec6fc95d6d808d0407a80e7e3e3b4d82f03a09d7
32 changes: 13 additions & 19 deletions compiler/rustc_mir_transform/src/coverage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ fn create_mappings(
));

for (decision, branches) in mcdc_mappings {
let num_conditions = branches.len() as u16;
// FIXME(#134497): Previously it was possible for some of these branch
// conversions to fail, in which case the remaining branches in the
// decision would be degraded to plain `MappingKind::Branch`.
// The changes in #134497 made that failure impossible, because the
// fallible step was deferred to codegen. But the corresponding code
// in codegen wasn't updated to detect the need for a degrade step.
let conditions = branches
.into_iter()
.map(
Expand All @@ -206,24 +211,13 @@ fn create_mappings(
)
.collect::<Vec<_>>();

if conditions.len() == num_conditions as usize {
// LLVM requires end index for counter mapping regions.
let kind = MappingKind::MCDCDecision(DecisionInfo {
bitmap_idx: (decision.bitmap_idx + decision.num_test_vectors) as u32,
num_conditions,
});
let span = decision.span;
mappings.extend(std::iter::once(Mapping { kind, span }).chain(conditions.into_iter()));
} else {
mappings.extend(conditions.into_iter().map(|mapping| {
let MappingKind::MCDCBranch { true_term, false_term, mcdc_params: _ } =
mapping.kind
else {
unreachable!("all mappings here are MCDCBranch as shown above");
};
Mapping { kind: MappingKind::Branch { true_term, false_term }, span: mapping.span }
}))
}
// LLVM requires end index for counter mapping regions.
let kind = MappingKind::MCDCDecision(DecisionInfo {
bitmap_idx: (decision.bitmap_idx + decision.num_test_vectors) as u32,
num_conditions: u16::try_from(conditions.len()).unwrap(),
});
let span = decision.span;
mappings.extend(std::iter::once(Mapping { kind, span }).chain(conditions.into_iter()));
}

mappings
Expand Down