-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Collect SwitchInt
target VariantIdx
s while building MaybePlacesSwitchIntData
#143852
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
base: master
Are you sure you want to change the base?
Conversation
Note: I don't imagine this will have a major perf impact unless there's an enum with a hundred variants. I also don't expect this to fix the regressions from #142707 which I believe are largely from how the generated code interacts with later passes and LLVM. |
Let's see what perf says anyways @bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Collect `SwitchInt` target `VariantIdx`s while building `MaybePlacesSwitchIntData` - Filter discriminants involved in a `SwitchInt` and map their values to `VariantIdx` while building `MaybePlacesSwitchIntData` instead of in `apply_effects_in_block` using `next_discr`. This is easier after #143769. - Use that `Vec` when handling the `otherwise` target instead of making a new `SmallVec`. This could make `MaybeInitializedPlaces`/`MaybeUninitializedPlaces` analysis slightly more efficient, particularly after #142707.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (8494e68): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.6%, secondary 2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 464.174s -> 463.598s (-0.12%) |
Without any reported improvements at all I don't think this has much of a point 🙃 Another followup to #142707 I wanted to try was enabling |
SwitchInt
and map their values toVariantIdx
while buildingMaybePlacesSwitchIntData
instead of inapply_effects_in_block
usingnext_discr
. This is easier after Remove support for SwitchInt edge effects in backward dataflow #143769.Vec
when handling theotherwise
target instead of making a newSmallVec
.This could make
MaybeInitializedPlaces
/MaybeUninitializedPlaces
analysis slightly more efficient, particularly after #142707.