Promote the BasicBlock tuple to a real struct;

It makes reading code that uses it easier to understand.
This commit is contained in:
Benjamin Bouvier
2018-07-19 15:29:29 +02:00
committed by Dan Gohman
parent ce177d643e
commit f72ff791b4
12 changed files with 127 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
//! Verify CPU flags values.
use entity::{EntityMap, SparseSet};
use flowgraph::ControlFlowGraph;
use flowgraph::{BasicBlock, ControlFlowGraph};
use ir;
use ir::instructions::BranchInfo;
use isa;
@@ -61,7 +61,7 @@ impl<'a> FlagsVerifier<'a> {
// Revisit any predecessor blocks the first time we see a live-in for `ebb`.
None => {
self.livein[ebb] = value.into();
for (pred, _) in self.cfg.pred_iter(ebb) {
for BasicBlock { ebb: pred, .. } in self.cfg.pred_iter(ebb) {
worklist.insert(pred);
}
}