Re-exportsยง
use std::cell::RefCell;๐use std::collections::hash_map::Entry;๐use std::sync::atomic::Ordering;๐use rustc_attr_ir::OptimizeAttr;๐use rustc_data_structures::fx::FxHashMap;๐use rustc_data_structures::fx::FxIndexSet;๐use rustc_hir::def_id::DefId;๐use rustc_middle::mir::Body;๐use rustc_middle::mir::MirDumper;๐use rustc_middle::mir::MirPhase;๐use rustc_middle::mir::RuntimePhase;๐use rustc_middle::ty::TyCtxt;๐use rustc_session::Session;๐use rustc_session::config::OptLevel;๐use rustc_span::bug;๐use tracing::trace;๐use crate::lint::lint_body;๐use crate::diagnostics;๐use crate::validate;๐
Structsยง
- Lint ๐
- An adapter for
MirLints that implementsMirPass. - PassCtx ๐
- With
MinOpt ๐Level
Enumsยง
- Pass
Policy ๐ - Rules outlining when this pass may be overridden or suppressed.
Constantsยง
- PASS_
TO_ ๐PROFILER_ NAMES - Maps MIR pass names to a snake case form to match profiling naming style
Traitsยง
- MirLint ๐
- Just like
MirPass, except it cannot mutateBody, and MIR dumping is disabled (via theLintadapter). - MirPass ๐
- A streamlined trait that you can implement to create a pass; the
pass will be named after the type, and it will consist of a main
loop that goes over each available MIR and applies
run_pass.
Functionsยง
- dump_
mir_ ๐for_ phase_ change - limited_
by_ ๐opt_ bisect - run_
passes ๐ - The optional
phase_changeis applied after executing all the passes, if present - run_
passes_ ๐inner - run_
passes_ ๐no_ validate - Run the sequence of passes without validating the MIR after each pass. The MIR is still validated at the end.
- should_
run_ ๐pass - simplify_
pass_ ๐type_ name - to_
profiler_ ๐name - Converts a MIR pass name into a snake case form to match the profiling naming style.
- validate_
body ๐