Merge WithNumNodes
into DirectedGraph
This commit is contained in:
parent
029cb1b13b
commit
398da593a5
13 changed files with 33 additions and 52 deletions
|
@ -2,7 +2,7 @@ use std::fmt::{self, Debug};
|
|||
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::graph::WithNumNodes;
|
||||
use rustc_data_structures::graph::DirectedGraph;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir::coverage::{CounterId, CovTerm, Expression, ExpressionId, Op};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::dominators::{self, Dominators};
|
||||
use rustc_data_structures::graph::{self, GraphSuccessors, WithNumNodes, WithStartNode};
|
||||
use rustc_data_structures::graph::{self, DirectedGraph, GraphSuccessors, WithStartNode};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir::{self, BasicBlock, Terminator, TerminatorKind};
|
||||
|
@ -193,9 +193,7 @@ impl IndexMut<BasicCoverageBlock> for CoverageGraph {
|
|||
|
||||
impl graph::DirectedGraph for CoverageGraph {
|
||||
type Node = BasicCoverageBlock;
|
||||
}
|
||||
|
||||
impl graph::WithNumNodes for CoverageGraph {
|
||||
#[inline]
|
||||
fn num_nodes(&self) -> usize {
|
||||
self.bcbs.len()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use rustc_data_structures::graph::WithNumNodes;
|
||||
use rustc_data_structures::graph::DirectedGraph;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir;
|
||||
use rustc_span::{BytePos, Span};
|
||||
|
|
|
@ -28,8 +28,8 @@ use super::counters;
|
|||
use super::graph::{self, BasicCoverageBlock};
|
||||
|
||||
use itertools::Itertools;
|
||||
use rustc_data_structures::graph::WithNumNodes;
|
||||
use rustc_data_structures::graph::WithSuccessors;
|
||||
use rustc_data_structures::graph::DirectedGraph;
|
||||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue