Skip to main content

Module pass_manager

Module pass_manager 

Source

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 implements MirPass.
PassCtx ๐Ÿ”’
WithMinOptLevel ๐Ÿ”’

Enumsยง

PassPolicy ๐Ÿ”’
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 mutate Body, and MIR dumping is disabled (via the Lint adapter).
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_change is 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 ๐Ÿ”’