Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
bors merged 1 commit intorust-lang:masterfrombeetrees:f16-debuginfo
Jul 9, 2024

Conversation

@beetrees
Copy link
Contributor

To renderf16s 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 afloat which is can then be displayed by debuggers.gdb,lldb andcdb tests are also included forf16 .

f16/f128 MSVC debug info issue:#121837
Tracking issue:#116909

@rustbot
Copy link
Collaborator

r?@estebank

rustbot has assigned@estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

User? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. T-compilerRelevant to the compiler team, which will review and decide on the PR/issue. labelsJun 26, 2024
@beetreesbeetrees marked this pull request as ready for reviewJune 26, 2024 19:47
@beetrees
Copy link
ContributorAuthor

@rustbot label +F-f16_and_f128

@rustbotrustbot added the F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]` labelJun 26, 2024
@tgross35
Copy link
Contributor

Cc@MaulingMonkey since you suggested what I copied to#121837

@tgross35
Copy link
Contributor

tgross35 commentedJun 27, 2024
edited
Loading

@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
Copy link
Member

No, sorry. While I have a little familiarity with the format, I wouldn't trust myself to review. Try@michaelwoerister maybe?

@michaelwoerister
Copy link
Member

r?@michaelwoerister
I'll take a look next week.

@michaelwoerister
Copy link
Member

C# seems to have something like f16, so maybe we are lucky:
https://devblogs.microsoft.com/dotnet/introducing-the-half-type/

Copy link
Member

@michaelwoeristermichaelwoerister left a 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

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?

Copy link
ContributorAuthor

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.

michaelwoerister reacted with thumbs up emoji
}
}

fnbuild_cpp_f16_di_node<'ll,'tcx>(cx:&CodegenCx<'ll,'tcx>) ->DINodeCreationResult<'ll>{

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.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Added

michaelwoerister reacted with heart emoji
@michaelwoerister
Copy link
Member

Thanks for the updates,@beetrees!

Excluding from rollups since debuginfo tests often fail on the first try in CI.
@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commentedJul 5, 2024

📌 Commitb701222 has been approved bymichaelwoerister

It is now in thequeue for this repository.

@borsbors added S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. labelsJul 5, 2024
@bors
Copy link
Collaborator

bors commentedJul 5, 2024

⌛ Testing commitb701222 with merge66fe6dd...

bors added a commit to rust-lang-ci/rust that referenced this pull requestJul 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
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commentedJul 5, 2024

💔 Test failed -checks-actions

@borsbors added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. labelsJul 5, 2024
// gdb-check:$30 = 9.25

#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]

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.

Copy link
ContributorAuthor

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).

bors added a commit to rust-lang-ci/rust that referenced this pull requestJul 8, 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
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commentedJul 8, 2024

💔 Test failed -checks-actions

@borsbors added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. labelsJul 8, 2024
@compiler-errors
Copy link
Member

@bors retry

@borsbors added S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. labelsJul 8, 2024
@bors
Copy link
Collaborator

bors commentedJul 9, 2024

⌛ Testing commit4252842 with merge585ffed...

bors added a commit to rust-lang-ci/rust that referenced this pull requestJul 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
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commentedJul 9, 2024

💔 Test failed -checks-actions

@borsbors added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. labelsJul 9, 2024
@beetrees
Copy link
ContributorAuthor

I've fixed the typos in the test that caused the failure.

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commentedJul 9, 2024

📌 Commitb058de9 has been approved bymichaelwoerister

It is now in thequeue for this repository.

@borsbors added S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. labelsJul 9, 2024
@bors
Copy link
Collaborator

bors commentedJul 9, 2024

⌛ Testing commitb058de9 with merge8672b2b...

@bors
Copy link
Collaborator

bors commentedJul 9, 2024

☀️ Test successful -checks-actions
Approved by: michaelwoerister
Pushing8672b2b to master...

@borsbors added the merged-by-borsThis PR was explicitly merged by bors. labelJul 9, 2024
@borsbors merged commit8672b2b intorust-lang:masterJul 9, 2024
@rustbotrustbot added this to the1.81.0 milestoneJul 9, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8672b2b):comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This 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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-4.7%[-4.7%, -4.7%]1
All ❌✅ (primary)--0

Cycles

Results (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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-3.5%[-3.5%, -3.5%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-3.5%[-3.5%, -3.5%]1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 702.485s -> 703.117s (0.09%)
Artifact size: 328.89 MiB -> 328.74 MiB (-0.05%)

@beetreesbeetrees deleted the f16-debuginfo branchJuly 9, 2024 14:45
Dajamante added a commit to ferrocene/ferrocene that referenced this pull requestJul 25, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tgross35tgross35tgross35 left review comments

+1 more reviewer

@michaelwoeristermichaelwoeristermichaelwoerister approved these changes

Reviewers whose approvals may not affect merge requirements

Labels

F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]`merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Milestone

1.81.0

Development

Successfully merging this pull request may close these issues.

10 participants

@beetrees@rustbot@tgross35@ChrisDenton@michaelwoerister@bors@rust-log-analyzer@compiler-errors@rust-timer@estebank

[8]ページ先頭

©2009-2025 Movatter.jp