Skip to content

Commit c1ff104

Browse files
committed
rename mir_map to queries and remove build_mir_for_crate
1 parent 532439f commit c1ff104

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

src/librustc_driver/driver.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ use rustc_typeck as typeck;
3636
use rustc_privacy;
3737
use rustc_plugin::registry::Registry;
3838
use rustc_plugin as plugin;
39-
use rustc_passes::{ast_validation, no_asm, loops, consts,
40-
static_recursion, hir_stats, mir_stats};
39+
use rustc_passes::{ast_validation, no_asm, loops, consts, static_recursion, hir_stats};
4140
use rustc_const_eval::{self, check_match};
4241
use super::Compilation;
4342

@@ -997,14 +996,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
997996
"liveness checking",
998997
|| middle::liveness::check_crate(tcx));
999998

1000-
time(time_passes,
1001-
"MIR dump",
1002-
|| mir::mir_map::build_mir_for_crate(tcx));
1003-
1004-
if sess.opts.debugging_opts.mir_stats {
1005-
mir_stats::print_mir_stats(tcx, "PRE CLEANUP MIR STATS");
1006-
}
1007-
1008999
time(time_passes,
10091000
"borrow checking",
10101001
|| borrowck::check_crate(tcx));

src/librustc_mir/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ pub mod build;
5050
pub mod callgraph;
5151
mod hair;
5252
mod shim;
53-
pub mod mir_map;
53+
mod queries;
5454
pub mod transform;
5555
pub mod util;
5656

5757
use rustc::ty::maps::Providers;
5858

5959
pub fn provide(providers: &mut Providers) {
60-
mir_map::provide(providers);
60+
queries::provide(providers);
6161
shim::provide(providers);
6262
transform::provide(providers);
6363
}

src/librustc_mir/mir_map.rs renamed to src/librustc_mir/queries.rs

-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
1919
use build;
2020
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
21-
use rustc::dep_graph::DepNode;
2221
use rustc::mir::Mir;
2322
use rustc::mir::transform::MirSource;
2423
use rustc::mir::visit::MutVisitor;
@@ -41,16 +40,6 @@ use syntax_pos::Span;
4140
use std::mem;
4241
use std::rc::Rc;
4342

44-
pub fn build_mir_for_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
45-
tcx.dep_graph.with_task(DepNode::MirKrate, tcx, (), build_mir_for_crate_task);
46-
47-
fn build_mir_for_crate_task<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, (): ()) {
48-
for &body_owner_def_id in tcx.mir_keys(LOCAL_CRATE).iter() {
49-
tcx.item_mir(body_owner_def_id);
50-
}
51-
}
52-
}
53-
5443
pub fn provide(providers: &mut Providers) {
5544
*providers = Providers {
5645
mir_build,

0 commit comments

Comments
 (0)