We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 066d381 commit 4215859Copy full SHA for 4215859
compiler/rustc_mir_transform/src/const_prop.rs
@@ -118,8 +118,8 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
118
119
// Traverse the body in reverse post-order, to ensure that `FullConstProp` locals are
120
// assigned before being read.
121
- let postorder = body.basic_blocks.postorder().to_vec();
122
- for bb in postorder.into_iter().rev() {
+ let rpo = body.basic_blocks.reverse_postorder().to_vec();
+ for bb in rpo {
123
let data = &mut body.basic_blocks.as_mut_preserves_cfg()[bb];
124
optimization_finder.visit_basic_block_data(bb, data);
125
}
0 commit comments