Replaced instances of SparseSet with EntitySet

This commit is contained in:
Erin Power
2019-08-31 10:09:14 +02:00
committed by Nicolas B. Pierron
parent f0244516c5
commit 947fce194e
4 changed files with 105 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
//! Verify CPU flags values.
use crate::entity::{SecondaryMap, SparseSet};
use crate::entity::{EntitySet, SecondaryMap};
use crate::flowgraph::{BasicBlock, ControlFlowGraph};
use crate::ir;
use crate::ir::instructions::BranchInfo;
@@ -50,7 +50,7 @@ impl<'a> FlagsVerifier<'a> {
fn check(&mut self, errors: &mut VerifierErrors) -> VerifierStepResult<()> {
// List of EBBs that need to be processed. EBBs may be re-added to this list when we detect
// that one of their successor blocks needs a live-in flags value.
let mut worklist = SparseSet::new();
let mut worklist = EntitySet::with_capacity(self.func.layout.ebb_capacity());
for ebb in self.func.layout.ebbs() {
worklist.insert(ebb);
}