Skip to content
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

[Coverage][MCDC] Adapt mcdc to llvm 19 #126733

Merged
merged 4 commits into from
Oct 8, 2024
Merged

Conversation

ZhuUx
Copy link

@ZhuUx ZhuUx commented Jun 20, 2024

Related issue: #126672

Also finish task 4 at #124144

llvm #82448 has introduced some break changes into mcdc, causing incompatibility between llvm 18 and 19. This draft adapts to that change and gives up supporting for llvm-18.

@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2024

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 20, 2024
@ZhuUx
Copy link
Author

ZhuUx commented Jun 20, 2024

@rustbot label +A-code-coverage

@rustbot rustbot added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Jun 20, 2024
@rust-log-analyzer

This comment has been minimized.

@ZhuUx
Copy link
Author

ZhuUx commented Jun 20, 2024

It is still unfinished. I would add some options next days and try to warn about mcdc limits with lints as this comment suggests.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2024
@ZhuUx
Copy link
Author

ZhuUx commented Jun 21, 2024

I think we need to discuss more about mcdc options. Thus now I remove the commit and just reset max_conditions_in_decision to i16::MAX as default of clang.

Nevertheless I would wait until rustc is going to update in-tree llvm 19 and see if there are any other changes need to make.

@bors
Copy link
Contributor

bors commented Jun 27, 2024

☔ The latest upstream changes (presumably #123918) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Jul 5, 2024

☔ The latest upstream changes (presumably #127360) made this pull request unmergeable. Please resolve the merge conflicts.

@ZhuUx ZhuUx force-pushed the llvm-19-adapt branch 2 times, most recently from 1a8d158 to b09e96e Compare July 10, 2024 05:40
@ZhuUx ZhuUx marked this pull request as ready for review July 25, 2024 08:13
@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2024

Some changes occurred in coverage tests.

cc @Zalathar

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in coverage instrumentation.

cc @Zalathar

@ZhuUx
Copy link
Author

ZhuUx commented Jul 25, 2024

Now this pr is independent from #126677 . We can focus on this only.
@Zalathar @compiler-errors @nikic
It's prepared for reviewing.
@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 25, 2024
Comment on lines -153 to -157
fn take_condition(
fn try_finish_decision(
&mut self,
span: Span,
true_marker: BlockMarkerId,
false_marker: BlockMarkerId,
) -> (Option<ConditionInfo>, Option<MCDCDecisionSpan>) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks a bit awkward. It's just a temporary expedient and will be removed in refactored mcdc implementation for pattern matching.

@bors
Copy link
Contributor

bors commented Sep 14, 2024

☔ The latest upstream changes (presumably #130357) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Sep 19, 2024

☔ The latest upstream changes (presumably #130534) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 23, 2024

☔ The latest upstream changes (presumably #130724) made this pull request unmergeable. Please resolve the merge conflicts.

@Zalathar
Copy link
Contributor

Zalathar commented Oct 8, 2024

This needs another rebase because #131325 replaced the bcb_counter method with term_for_bcb.

Also please squish the “fixup” changes into the other patches as appropriate.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2024
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 8, 2024
Currently these tests only run against LLVM 18, but the default is now LLVM 19,
which makes them very tricky to bless. Since rust-lang#126733 is going to drop support
for MC/DC in LLVM 18 anyway, it's easier to just completely disable the tests
until that PR fixes them.
@Zalathar
Copy link
Contributor

Zalathar commented Oct 8, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Oct 8, 2024

📌 Commit acd64fa has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2024
@bors
Copy link
Contributor

bors commented Oct 8, 2024

⌛ Testing commit acd64fa with merge cf24c73...

@bors
Copy link
Contributor

bors commented Oct 8, 2024

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing cf24c73 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 8, 2024
@bors bors merged commit cf24c73 into rust-lang:master Oct 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 8, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cf24c73): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -2.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -3.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-7.9%, -1.4%] 12
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 775.416s -> 775.01s (-0.05%)
Artifact size: 329.55 MiB -> 329.57 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants