Skip to content

Commit

Permalink
reverse_postorder
Browse files Browse the repository at this point in the history
  • Loading branch information
csmoe committed Jul 5, 2018
1 parent 8fa9bfe commit 37228fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_mir/dataflow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use rustc_data_structures::bitslice::{bitwise, BitwiseOperator};

use rustc::ty::{self, TyCtxt};
use rustc::mir::{self, Mir, BasicBlock, BasicBlockData, Location, Statement, Terminator};
use rustc::mir::traversal;
use rustc::session::Session;

use std::borrow::Borrow;
Expand Down Expand Up @@ -333,7 +334,7 @@ pub(crate) trait DataflowResultsConsumer<'a, 'tcx: 'a> {

fn analyze_results(&mut self, flow_uninit: &mut Self::FlowState) {
let flow = flow_uninit;
for bb in self.mir().basic_blocks().indices() {
for (bb, _) in traversal::reverse_postorder(self.mir()) {
flow.reset_to_entry_of(bb);
self.process_basic_block(bb, flow);
}
Expand Down

0 comments on commit 37228fe

Please sign in to comment.