-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Consider merging values
and targets
fields on MIR switchInt
?
#65693
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The mentioned My sketch of an idea would keep the |
@oli-obk isn't it the way it is today to optimize the space usage? (not saying that's a good reason, just that I thought it was intentional) EDIT: also, there are some things that expect a |
Hmm... true, allocating a bunch of
these could probably also take an |
@oli-obk The problem is that they're returned, so you'd need something like a many-cased |
Ok, so I think this is the only actionable item from this issue then. |
Refactor how SwitchInt stores jump targets Closes rust-lang/rust#65693
Writing some kinds of MIR passes that care about
values
andtargets
onswitchInt
can be a bit messy (for example, passes that remove dead branches). @oli-obk has the idea:The text was updated successfully, but these errors were encountered: