-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Run LLVM coverage instrumentation passes before optimization passes #83666
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ pub fn used_inline_function() { | |
} | ||
use_this_lib_crate(); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any theories why this is no longer generating the Here's a trick for keeping the diffs clean in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I assumed it's related somehow. Thanks for inserting the blank lines. Makes the expected result diffs a lot easier to read! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want me to remove the blank lines before merging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not necessary. Thanks. |
||
// Expect for above function: | ||
// | ||
// | Unexecuted instantiation: used_crate::used_only_from_bin_crate_generic_function::<_> | ||
// | ||
// With `#[inline(always)]` this function is instantiated twice, in both the library crate (which | ||
// does not use it) and the `uses_inline_crate` binary (which does use/call it). | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#[inline(always)] | ||
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, before you make this change, we need to test that this doesn't break the brotli_decompressor
See #82875
I was not able to create a coverage test that failed in the way it fails in this issue, but by not forcing inline always, the issue was resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested the example from that issue. It fails on my main rustc (2021-03-24 nightly) but succeeds on my new branch. So the fix for inline always works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great.
Before merging, I'd like to try your patch on some creates I had issues with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cherry-picked your branch commits and am testing them now.