Skip to content

Commit

Permalink
rename mir_map to queries and remove build_mir_for_crate
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 2, 2017
1 parent 532439f commit c1ff104
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
11 changes: 1 addition & 10 deletions src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ use rustc_typeck as typeck;
use rustc_privacy;
use rustc_plugin::registry::Registry;
use rustc_plugin as plugin;
use rustc_passes::{ast_validation, no_asm, loops, consts,
static_recursion, hir_stats, mir_stats};
use rustc_passes::{ast_validation, no_asm, loops, consts, static_recursion, hir_stats};
use rustc_const_eval::{self, check_match};
use super::Compilation;

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

time(time_passes,
"MIR dump",
|| mir::mir_map::build_mir_for_crate(tcx));

if sess.opts.debugging_opts.mir_stats {
mir_stats::print_mir_stats(tcx, "PRE CLEANUP MIR STATS");
}

time(time_passes,
"borrow checking",
|| borrowck::check_crate(tcx));
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ pub mod build;
pub mod callgraph;
mod hair;
mod shim;
pub mod mir_map;
mod queries;
pub mod transform;
pub mod util;

use rustc::ty::maps::Providers;

pub fn provide(providers: &mut Providers) {
mir_map::provide(providers);
queries::provide(providers);
shim::provide(providers);
transform::provide(providers);
}
11 changes: 0 additions & 11 deletions src/librustc_mir/mir_map.rs → src/librustc_mir/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

use build;
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::dep_graph::DepNode;
use rustc::mir::Mir;
use rustc::mir::transform::MirSource;
use rustc::mir::visit::MutVisitor;
Expand All @@ -41,16 +40,6 @@ use syntax_pos::Span;
use std::mem;
use std::rc::Rc;

pub fn build_mir_for_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
tcx.dep_graph.with_task(DepNode::MirKrate, tcx, (), build_mir_for_crate_task);

fn build_mir_for_crate_task<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, (): ()) {
for &body_owner_def_id in tcx.mir_keys(LOCAL_CRATE).iter() {
tcx.item_mir(body_owner_def_id);
}
}
}

pub fn provide(providers: &mut Providers) {
*providers = Providers {
mir_build,
Expand Down

0 comments on commit c1ff104

Please sign in to comment.