-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove unused Lift
impls
#115831
Remove unused Lift
impls
#115831
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in cc @BoxyUwU |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Remove unused `Lift` impls r? `@bjorn3`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
@@ -19,14 +19,14 @@ use std::fmt; | |||
/// simply couples a potentially generic `InstanceDef` with some args, and codegen and const eval | |||
/// will do all required substitution as they run. | |||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, TyEncodable, TyDecodable)] | |||
#[derive(HashStable, Lift, TypeFoldable, TypeVisitable)] | |||
#[derive(HashStable, TypeFoldable, TypeVisitable)] |
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 one is used by cg_clif's jit mode: https://github.com/bjorn3/rustc_codegen_cranelift/blob/d72f7109ede688200c4ffdc0453457a66552f47b/src/driver/jit.rs#L256
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 have reinstated it, along with the ones for InstanceDef
and Option
, which were also required.
rustc_codegen_cranelift's Cargo.toml
says the jit
feature is "not ready to be enabled when compiling as part of rustc", which is a bit annoying when making this kind of change. Is that still true? If so, what is required to enable it?
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.
You can edit Cargo.toml
to add jit
to the default features for testing. It is indeed still not ready to be enabled by default. std::env::args()
is broken on windows, macos and linux with glibc. (on these targets the argv passed to the main function is ignored), the jitted code doesn't run on the main thread which breaks everything using winit and in general it is slower due to incr comp being broken as an exit from the jitted main function will immediately exit the rustc process and because cranelift-jit doesn't support serializing to a cachable object file. It also requires all dependencies to be available as dylib.
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.
Would it be possible to add jit
to the features within rustc just so it gets compiled, even if it's not tested/run in any way? That would be enough to avoid the above problem.
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.
Should be possible to add it to check builds.
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.
Cool. Doesn't need to be in this PR, though, which I think is ready to be merged.
db8fe2b
to
2e7c41e
Compare
I have updated to reinstate the impl for |
Finished benchmarking commit (0b9b838): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.556s -> 629.187s (-0.38%) |
It's a 90 KiB artifact size reduction, which is nice. |
ty::Binder<'tcx, ty::ProjectionPredicate<'tcx>>, | ||
ty::Binder<'tcx, ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>>, | ||
ty::Binder<'tcx, ty::OutlivesPredicate<ty::Region<'tcx>, ty::Region<'tcx>>>, |
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.
Not sure if we should do this commit. It may be useful for debugging out-of-tree tools.
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.
Well, let me know when you're sure one way or the other.
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 think we should keep it. r=me with this commit dropped.
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.
Just to clarify, you want the entire "Remove unused Display impls." commit removed? That will likely have knock-on effects, reducing the number of Lift
impls that can be removed in the later commits.
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 see.
@bors r+ |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
It's easier to pass it in to the one method that needs it (`highlighting_region_vid`) than to store it in the type. This means `RegionHighlightMode` can impl `Default`.
To match `TrivialTypeTraversalImpls` and `TrivialTypeTraversalAndLiftImpls`, and because the `Clone` doesn't mean anything.
I found these by commenting out all `Lift` derives and then adding back the ones that were necessary to successfully compile.
2e7c41e
to
abe2a68
Compare
I rebased. It was one of those mysterious "conflicts" that didn't actually involve any conflicts when I rebased locally. Hmm. @bors r=bjorn3 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (24bb884): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 634.721s -> 633.229s (-0.24%) |
r? @bjorn3