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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ZhuUx
Copy link
Contributor

@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
Contributor 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
Contributor 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 ZhuUx mentioned this pull request Jun 20, 2024
4 tasks
@ZhuUx
Copy link
Contributor 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.

@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
Contributor 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
Contributor 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 Aug 28, 2024

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

@Zalathar
Copy link
Contributor

Zalathar commented Sep 7, 2024

r? Zalathar

@rustbot rustbot assigned Zalathar and unassigned compiler-errors Sep 7, 2024
@Zalathar
Copy link
Contributor

Zalathar commented Sep 7, 2024

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Sep 7, 2024

📌 Commit 3d24cf9 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 7, 2024
[Coverage][MCDC] Adapt mcdc to llvm 19

Related issue: rust-lang#126672

Also finish task 4 at rust-lang#124144

[llvm rust-lang#82448](llvm/llvm-project#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.
@bors
Copy link
Contributor

bors commented Sep 7, 2024

⌛ Testing commit 3d24cf9 with merge 0909ca8...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 7, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 7, 2024
@Lambdaris Lambdaris deleted the llvm-19-adapt branch September 7, 2024 15:14
@Lambdaris Lambdaris force-pushed the llvm-19-adapt branch 2 times, most recently from 3d24cf9 to ad5a0b3 Compare September 7, 2024 15:30
@Lambdaris
Copy link

Lambdaris commented Sep 7, 2024

😖 Nearly caused an accident, thankfully github is robust enough to restore. Actual diff

I have not found a method to generate i16::MAX conditions without proc macros (Manually code so many conditions looks like an attack), so just check if it allows decisions containing more than 6 conditions.

@bors
Copy link
Contributor

bors commented Sep 10, 2024

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

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) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants