-
Notifications
You must be signed in to change notification settings - Fork 14k
Add Natvis visualiser and debuginfo tests for f16
#127001
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
Conversation
|
@rustbot label +F-f16_and_f128 |
|
Cc @MaulingMonkey since you suggested what I copied to #121837 |
|
@ChrisDenton do you handle the natvis stuff? I seem to remember there not being too many people who were able to review it (though this seems pretty understandable, the math part in intrinsic.natvis looks correct to me) |
|
No, sorry. While I have a little familiarity with the format, I wouldn't trust myself to review. Try @michaelwoerister maybe? |
|
r? @michaelwoerister |
|
C# seems to have something like f16, so maybe we are lucky: |
michaelwoerister
left a comment
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.
This looks great, thanks @beetrees!
I have only some minor comments.
| @@ -0,0 +1,56 @@ | |||
| //@ compile-flags: -g | |||
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.
Can you add //@ only-windows so that we ignore the test on other platforms?
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've added //@ only-msvc as cpp_like_debuginfo is only used on MSVC targets.
| } | ||
| } | ||
|
|
||
| fn build_cpp_f16_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> DINodeCreationResult<'ll> { |
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.
Please add a comment explaining why we do this.
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.
Added
…rister
Add Natvis visualiser and debuginfo tests for `f16`
To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .
`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
| // gdb-check:$30 = 9.25 | ||
|
|
||
| #![allow(unused_variables)] | ||
| #![feature(omit_gdb_pretty_printer_section)] |
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.
Needs a #![feature(f16)].
If you're up for it you can try to remove the //@ ignore-gdb directive at the top, since the very similar basic-types-globals.rs test seems to work just fine.
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've added the missing #![feature(f16)]s, and removed the //@ ignore-gdb (the test passes locally).
…rister
Add Natvis visualiser and debuginfo tests for `f16`
To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .
`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
@bors retry |
…rister
Add Natvis visualiser and debuginfo tests for `f16`
To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .
`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
I've fixed the typos in the test that caused the failure. |
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (8672b2b): 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)Results (secondary -4.7%)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.
CyclesResults (primary -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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 702.485s -> 703.117s (0.09%) |
To render
f16s in debuggers on MSVC targets, this PR changes the compiler to outputf16s asstruct f16 { bits: u16 }, and includes a Natvis visualiser that manually converts thef16's bits to afloatwhich is can then be displayed by debuggers.gdb,lldbandcdbtests are also included forf16.f16/f128MSVC debug info issue: #121837Tracking issue: #116909