Uh oh!
There was an error while loading. Please reload this page.
Use line numbers relative to the function in mir-opt tests - #99780
Conversation
rust-highfive
commented
Jul 26, 2022
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
Noratrieb
commented
Jul 26, 2022
r? rust-lang/mir-opt |
This comment has been minimized.
This comment has been minimized.
bcd07bc to
a948491Compareklensy
commented
Jul 26, 2022
Maybe reuse already existing style like |
a948491 to
f795f79Compareoli-obk
commented
Jul 27, 2022
Maybe we could make this info relative to the function start? That should avoid most of the noise, right? |
This should avoid most noise, yes. It would probably be a bit tricky to implement with the current code structure, but I could do it. What do you think would be the best way to solve this? Rename |
oli-obk
commented
Jul 27, 2022
that sounds reasonable to me |
f795f79 to
b1640a3Compareb1640a3 to
cec398fComparebors
commented
Jul 27, 2022
☔ The latest upstream changes (presumably #99816) made this pull request unmergeable. Please resolve the merge conflicts. |
cec398f to
c2cb876Compare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3709c2a to
ba0af95Compareoli-obk
commented
Jul 28, 2022
@bors r+ p=1 bitrotty |
bors
commented
Jul 28, 2022
📌 Commit ba0af9561870ee2ba942f48a31ed0260f3cb3469 has been approved by It is now in the queue for this repository. |
bors
commented
Jul 28, 2022
⌛ Testing commit ba0af9561870ee2ba942f48a31ed0260f3cb3469 with merge 2cba4390459755873c122e7fe462bcc216572595... |
Noratrieb
commented
Jul 28, 2022
I figured it out. Maybe it works now. |
abebba5 to
11c0280CompareDylan-DPC
commented
Jul 28, 2022
@bors r=oli-obk |
bors
commented
Jul 28, 2022
This comment has been minimized.
This comment has been minimized.
Dylan-DPC
commented
Jul 28, 2022
@bors r- |
Noratrieb
commented
Jul 28, 2022
I think you're a bit late my friend, but thank you for your log analysis anyways :) |
Dylan-DPC
commented
Jul 28, 2022
@bors r=oli-obk |
bors
commented
Jul 28, 2022
This comment has been minimized.
This comment has been minimized.
bors
commented
Jul 28, 2022
bors
commented
Jul 28, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Jul 28, 2022
Finished benchmarking commit (36f4f4a): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Remove comments from mir-opt MIR dumps See https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Line.20numbers.20in.20mir-opt.20tests/near/363849874 In rust-lang#99780 there is mention that "there has been a zulip conversation about disabling line numbers with mixed opinions" which to me means that some people opposed this. I can't find the referenced conversation so... here we go. The current situation is quite chaotic. It's not hard to find MIR diffs which contain * Absolute line numbers * Relative line numbers * Substituted line numbers (LL) For example: https://github.com/rust-lang/rust/blob/408bbd040613f6776e0a7d05d582c81f4ddc189a/tests/mir-opt/inline/inline_shims.drop.Inline.diff#L10-L17 And sometimes adding a comment at the top of a mir-opt test generates a diff in the test because a line number changed: https://github.com/rust-lang/rust/pull/98112/files#diff-b8cf4bcce95078e6a3faf075e9abf6864872fb28a64d95c04f04513b9e3bbd81 And irrelevant changes to the standard library can generate diffs in mir-opt tests: https://github.com/rust-lang/rust/pull/110694/files#diff-bf96b0e7c67b8b272814536888fd9428c314991e155beae1f0a2a67f0ac47b2crust-lang@769886c I think we should, specifically in mir-opt tests, completely remove the comments, or insert placeholders for all line and column numbers.
Remove comments from mir-opt MIR dumps See https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Line.20numbers.20in.20mir-opt.20tests/near/363849874 In rust-lang/rust#99780 there is mention that "there has been a zulip conversation about disabling line numbers with mixed opinions" which to me means that some people opposed this. I can't find the referenced conversation so... here we go. The current situation is quite chaotic. It's not hard to find MIR diffs which contain * Absolute line numbers * Relative line numbers * Substituted line numbers (LL) For example: https://github.com/rust-lang/rust/blob/408bbd040613f6776e0a7d05d582c81f4ddc189a/tests/mir-opt/inline/inline_shims.drop.Inline.diff#L10-L17 And sometimes adding a comment at the top of a mir-opt test generates a diff in the test because a line number changed: https://github.com/rust-lang/rust/pull/98112/files#diff-b8cf4bcce95078e6a3faf075e9abf6864872fb28a64d95c04f04513b9e3bbd81 And irrelevant changes to the standard library can generate diffs in mir-opt tests: https://github.com/rust-lang/rust/pull/110694/files#diff-bf96b0e7c67b8b272814536888fd9428c314991e155beae1f0a2a67f0ac47b2crust-lang/rust@769886c I think we should, specifically in mir-opt tests, completely remove the comments, or insert placeholders for all line and column numbers.
As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag
-Zmir-pretty-relative-line-numbersto make them relative to the function declaration, which avoids most needless diffs from attribute changes.@JakobDegen told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution.
r? rust-lang/wg-mir-opt