-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Do not forget to pass DWARF fragment information to LLVM. #115139
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
I tried this on cargo release+debuginfo (per #115113 (comment)) and with LLVM assertions enabled, and it trips here:
Actually, that does trigger once before your change too, at the very end on |
This comment has been minimized.
This comment has been minimized.
// CHECK: %slice.dbg.spill = alloca %Endian, | ||
// CHECK: %s.dbg.spill = alloca { ptr, i64 }, | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %s.dbg.spill, metadata ![[S:.*]], metadata !DIExpression()), | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill, metadata ![[SLICE:.*]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 0)), |
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.
Shouldn't this be something like 128, 0 rather than 0, 0?
It would probably be clearer to use a non-zero sized type here.
This comment has been minimized.
This comment has been minimized.
767134d
to
6c9bc19
Compare
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
6c9bc19
to
930b2e7
Compare
pub fn extra(s: &[u8]) { | ||
// CHECK: void @extra( | ||
// CHECK: %slice.dbg.spill1 = alloca i32, | ||
// CHECK: %slice.dbg.spill = alloca { ptr, i64 }, |
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.
Test should require 64-bit target, otherwise the sizes / offset aren't correct.
82d9c53
to
5529e2f
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f072775): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResultsThis 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.
Bootstrap: 630.812s -> 631.43s (0.10%) |
I feel this patch can also be evaluated for a stable backport (if there will be plans for a 1.72.1 release). @rustbot label stable-nominated |
Beta backport approved as per compiler team on Zulip. Stable backport declined (#115140 already disabled the MIR opt that caused fragment debuginfo to be generated from rustc, comment on Zulip). @rustbot label +beta-accepted -stable-nominated |
[beta] backports - Contents of reachable statics is reachable rust-lang#115114 - Revert "Suggest using `Arc` on `!Send`/`!Sync` types" rust-lang#115311 - Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 - Do not forget to pass DWARF fragment information to LLVM. rust-lang#115139 - rustdoc: use unicode-aware checks for redundant explicit link fastpath rust-lang#115070 r? cuviper
Represent MIR composite debuginfo as projections instead of aggregates Composite debuginfo for MIR is currently represented as ``` debug name => Type { projection1 => place1, projection2 => place2 }; ``` ie. a single `VarDebugInfo` object with that name, and its value a `VarDebugInfoContents::Composite`. This PR proposes to reverse the representation to be ``` debug name.projection1 => place1; debug name.projection2 => place2; ``` ie. multiple `VarDebugInfo` objects with each their projection. This simplifies the handling of composite debuginfo by the compiler by avoiding weird nesting. Based on rust-lang#115139
Fixes #115113 for the rustc part