-
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 |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
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.
Queued 8494e68 with parent bfc046a, future comparison URL. |
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.