-
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
ty: remove obsolete pretty printer #76027
ty: remove obsolete pretty printer #76027
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
ada69f9
to
5033987
Compare
cc @oli-obk @nikomatsakis (for the changes in codegen-units tests - which should probably be made into UI tests tbh) Would be neat if we could have @michaelwoerister take a quick look to tell us if we're off the mark here, but likely won't happen. |
5033987
to
f0c548d
Compare
f0c548d
to
fdf401d
Compare
fdf401d
to
032408f
Compare
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.
r=me on the implementation (not sure if you want to wait for someone to give their opinion on the incremental tests? they seem fine to me, at least)
@bors r=eddyb |
📌 Commit 032408fdfe71597546141dbe89b6213d90d43062 has been approved by |
This commit removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests. - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but this should result in no functional change. Signed-off-by: David Wood <david@davidtw.co>
032408f
to
6ff471b
Compare
📌 Commit 6ff471b has been approved by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…te-pretty-printer, r=eddyb ty: remove obsolete pretty printer Fixes rust-lang#61139. This PR removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests (which have been updated). - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but nothing will break as a result of this. cc @eddyb (whom I've discussed this with)
…te-pretty-printer, r=eddyb ty: remove obsolete pretty printer Fixes rust-lang#61139. This PR removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests (which have been updated). - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but nothing will break as a result of this. cc @eddyb (whom I've discussed this with)
☀️ Test successful - checks-actions, checks-azure |
📣 Toolstate changed by #76027! Tested on commit 8ed5cb5. 💔 rls on windows: test-pass → build-fail (cc @Xanewok). |
Tested on commit rust-lang/rust@8ed5cb5. Direct link to PR: <rust-lang/rust#76027> 💔 rls on windows: test-pass → build-fail (cc @Xanewok). 💔 rls on linux: test-pass → build-fail (cc @Xanewok). 💔 rustfmt on windows: test-pass → build-fail (cc @topecongiro @calebcartwright). 💔 rustfmt on linux: test-pass → build-fail (cc @topecongiro @calebcartwright).
This caused a rather large regression that seems to have been fixed in #76030 (results). Overall the net result was a small improvement on optimized and debug builds. Is all of this meeting expectations @davidtwco? |
This comment has been minimized.
This comment has been minimized.
I wasn't expecting quite as large a regression, but it makes sense that the other PR would result in a net improvement. |
Asked another way, is it possible to get the benefits of the second PR without the regression from this one? |
Yes, you could just revert this. The second PR adds a early exit which skips the pretty printer for one case (with this PR, it skips the new slower printer, without it skips the old faster printer) - given that this case is most common, it claws most of the performance back. In either case, the impact is really only felt by incremental compilation where the difference is a larger proportion of the overall execution. I think we’d only see a small improvement from reverting this because the second PR isn’t making this change faster, it’s skipping it and it would be skipping what was there prior to this landing. |
Fixes #61139.
This PR removes the obsolete printer and replaces all uses of it with
FmtPrinter
. Of the replaced uses, all but one use was indebug!
logging, two cases were notable:MonoItem::to_string
is used in-Z print-mono-items
and therefore affects the output of all codegen-units tests (which have been updated).DefPathBasedNames
was used inlibrustc_codegen_llvm/type_of.rs
withLLVMStructCreateNamed
and that'll now get different values, but nothing will break as a result of this.cc @eddyb (whom I've discussed this with)