From 45559a21c1f50923e3a96efb64f00f4489684bfc Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 16 Sep 2016 15:17:19 -0700 Subject: [PATCH] Remove dead public functions from DominatorTree. --- cranelift/src/libcretonne/dominator_tree.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs index a3a00b2cc4..c741b5992d 100644 --- a/cranelift/src/libcretonne/dominator_tree.rs +++ b/cranelift/src/libcretonne/dominator_tree.rs @@ -3,18 +3,13 @@ use cfg::*; use ir::Ebb; use ir::entities::NO_INST; -use entity_map::{EntityMap, Keys}; +use entity_map::EntityMap; pub struct DominatorTree { data: EntityMap>, } impl DominatorTree { - /// Insert data directly into a dominator tree. - pub fn from_data(data: EntityMap>) -> DominatorTree { - DominatorTree { data: data } - } - /// Build a dominator tree from a control flow graph using Keith D. Cooper's /// "Simple, Fast Dominator Algorithm." pub fn new(cfg: &ControlFlowGraph) -> DominatorTree { @@ -116,11 +111,6 @@ impl DominatorTree { pub fn idom(&self, ebb: Ebb) -> Option { self.data[ebb].clone() } - - /// An iterator across all of the ebbs stored in the tree. - pub fn ebbs(&self) -> Keys { - self.data.keys() - } } #[cfg(test)] @@ -136,7 +126,7 @@ mod test { let func = Function::new(); let cfg = ControlFlowGraph::new(&func); let dtree = DominatorTree::new(&cfg); - assert_eq!(None, dtree.ebbs().next()); + assert_eq!(0, dtree.data.keys().count()); } #[test]