Skip to content
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

misc cleanups from debugging something #122392

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Mar 12, 2024

rename instantiate_canonical_with_fresh_inference_vars to instantiate_canonical the substs for the canonical are not solely infer vars as that would be wildly wrong and it is rather confusing to see this method called and think that the entire canonicalization setup is completely broken when it is not 👍

also update region debug printing to be more like the custom impls for Ty/Const, right now regions in debug output are horribly verbose and make it incredibly hard to read but with this atleast boundvars and placeholders when debugging the new solver do not take up excessive amounts of space.

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 12, 2024
@matthiaskrgr
Copy link
Member

this will also change some existing ice messages, right?
please don't forget to update the corresponding tickets to match the new scheme once this lands, otherwise people may open duplicates by accident when they can't find the old tickets when searching for the update ice messages. 🙂 thanks!

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

maybe just fn instantiate_canonical and change the first line of its doc comment to mention both placeholders and infer vars?

The function name as is feels a bit too long to me

@BoxyUwU BoxyUwU force-pushed the misc_cleanup branch 2 times, most recently from bcbd564 to b622bb5 Compare March 18, 2024 14:12
@BoxyUwU
Copy link
Member Author

BoxyUwU commented Mar 18, 2024

@matthiaskrgr yes this could change ICE output. I'm not sure how widespread tbh, I can't remember if we ever made it so that ICE output that debug prints Ty's will actually debug print them or not. Regardless I have no idea how we would find all the ICEs out of the thousands of issues that contain old region debug output and update it. Not going to block this PR on that as that is a huge burden for simply changing printing used for debugging rustc.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

compiler/rustc_type_ir/src/region_kind.rs Outdated Show resolved Hide resolved
compiler/rustc_type_ir/src/region_kind.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/region.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/region.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/region.rs Outdated Show resolved Hide resolved
@lcnr
Copy link
Contributor

lcnr commented Mar 18, 2024

r=me after blessing mir opt tests and CI is green

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Mar 18, 2024

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Mar 18, 2024

📌 Commit e34e344 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 18, 2024
misc cleanups from debugging something

rename `instantiate_canonical_with_fresh_inference_vars` to `instantiate_canonical`  the substs for the canonical are not solely infer vars as that would be wildly wrong and it is rather confusing to see this method called and think that the entire canonicalization setup is completely broken when it is not 👍

also update region debug printing to be more like the custom impls for Ty/Const, right now regions in debug output are horribly verbose and make it incredibly hard to read but with this atleast boundvars and placeholders when debugging the new solver do not take up excessive amounts of space.

r? `@lcnr`
@bors
Copy link
Contributor

bors commented Mar 19, 2024

⌛ Testing commit e34e344 with merge a385e56...

@bors
Copy link
Contributor

bors commented Mar 19, 2024

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing a385e56 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 19, 2024
@bors bors merged commit a385e56 into rust-lang:master Mar 19, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 19, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a385e56): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.1%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
2.8% [2.0%, 4.8%] 4
Regressions ❌
(secondary)
3.1% [2.0%, 6.4%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% [2.0%, 4.8%] 4

Cycles

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

Binary size

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

Bootstrap: 669.309s -> 667.729s (-0.24%)
Artifact size: 312.82 MiB -> 312.74 MiB (-0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants