- Notifications
You must be signed in to change notification settings - Fork14.1k
Add Natvis visualiser and debuginfo tests forf16#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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
rustbot commentedJun 26, 2024
beetrees commentedJun 26, 2024
@rustbot label +F-f16_and_f128 |
tgross35 commentedJun 27, 2024
Cc@MaulingMonkey since you suggested what I copied to#121837 |
Uh oh!
There was an error while loading.Please reload this page.
tgross35 commentedJun 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@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) |
ChrisDenton commentedJun 27, 2024
No, sorry. While I have a little familiarity with the format, I wouldn't trust myself to review. Try@michaelwoerister maybe? |
michaelwoerister commentedJun 27, 2024
r?@michaelwoerister |
michaelwoerister commentedJun 27, 2024
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 ascpp_like_debuginfo is only used on MSVC targets.
| } | ||
| } | ||
| fnbuild_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
michaelwoerister commentedJul 5, 2024
bors commentedJul 5, 2024
bors commentedJul 5, 2024
…risterAdd 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#121837Tracking issue:rust-lang#116909 This comment has been minimized.
This comment has been minimized.
bors commentedJul 5, 2024
💔 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 similarbasic-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).
…risterAdd 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#121837Tracking issue:rust-lang#116909 This comment has been minimized.
This comment has been minimized.
bors commentedJul 8, 2024
💔 Test failed -checks-actions |
compiler-errors commentedJul 8, 2024
@bors retry |
bors commentedJul 9, 2024
…risterAdd 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#121837Tracking issue:rust-lang#116909 This comment has been minimized.
This comment has been minimized.
bors commentedJul 9, 2024
💔 Test failed -checks-actions |
beetrees commentedJul 9, 2024
I've fixed the typos in the test that caused the failure. |
michaelwoerister commentedJul 9, 2024
@bors r+ |
bors commentedJul 9, 2024
bors commentedJul 9, 2024
bors commentedJul 9, 2024
☀️ Test successful -checks-actions |
rust-timer commentedJul 9, 2024
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