-
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
rustc_mir: handle all aggregate kinds in, and always run, the deaggregator. #48052
Changes from all commits
3922dd7
b88180f
e598bdf
6e5dacb
6195ad8
d773d95
c9fcede
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,14 +258,18 @@ fn optimized_mir<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx | |
|
||
// Optimizations begin. | ||
inline::Inline, | ||
|
||
// Lowering generator control-flow and variables | ||
// has to happen before we do anything else to them. | ||
generator::StateTransform, | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to lower generator as late as possible, in particular we want to run at least There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, those sanity checks don't survive past optimizations. |
||
instcombine::InstCombine, | ||
deaggregator::Deaggregator, | ||
copy_prop::CopyPropagation, | ||
remove_noop_landing_pads::RemoveNoopLandingPads, | ||
simplify::SimplifyCfg::new("final"), | ||
simplify::SimplifyLocals, | ||
|
||
generator::StateTransform, | ||
add_call_guards::CriticalCallEdges, | ||
dump_mir::Marker("PreTrans"), | ||
]; | ||
|
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.
Nit: I find this match a bit hard to read. Maybe something like this?
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.
It's copied from elsewhere, this pattern is used in several passes - and this will hopefully go away ~soon anyway.