rename mir_map
to queries
and remove build_mir_for_crate
This commit is contained in:
parent
532439faa1
commit
c1ff10464d
3 changed files with 3 additions and 23 deletions
|
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -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,
|
Loading…
Add table
Add a link
Reference in a new issue