[][src]Module rustc_mir::transform

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Modules

add_call_guardsInternal
add_moves_for_packed_dropsInternal
add_retagInternal

This pass adds validation calls (AcquireValid, ReleaseValid) where appropriate. It has to be run really early, before transformations like inlining, because introducing these calls adds UB -- so, conceptually, this pass is actually part of MIR building, and only after this pass we think of the program has having the normal MIR semantics.

check_constsInternal

Check the bodies of consts, statics and const fns for illegal operations.

check_packed_refInternal
check_unsafetyInternal
cleanup_post_borrowckInternal

This module provides a pass to replacing the following statements with Nops

const_propInternal

Propagates constants for early reporting of statically known assertion failures

copy_propInternal

Trivial copy propagation pass.

deaggregatorInternal
dump_mirInternal

This pass just dumps MIR at a specified point.

elaborate_dropsInternal
generatorInternal

This is the implementation of the pass which transforms generators into state machines.

inlineInternal

Inlining pass for MIR functions

instcombineInternal

Performs various peephole optimizations.

no_landing_padsInternal

This pass removes the unwind branch of all the terminators when the no-landing-pads option is specified.

nrvoInternal
promote_constsInternal

A pass that promotes borrows of constant rvalues.

qualify_min_const_fnInternal
remove_noop_landing_padsInternal
required_constsInternal
rustc_peekInternal
simplifyInternal

A number of passes which remove various redundancies in the CFG.

simplify_branchesInternal

A pass that simplifies branches when their condition is known.

simplify_tryInternal

The general point of the optimizations provided here is to simplify something like:

uninhabited_enum_branchingInternal

A pass that eliminates branches on uninhabited enum variants.

unreachable_propInternal

A pass that propagates the unreachable terminator of a block to its predecessors when all of their successors are unreachable. This is achieved through a post-order traversal of the blocks.

validateInternal

Validates the MIR to ensure that invariants are upheld.

Structs

MirSourceInternal

Where a specific mir::Body comes from.

Traits

MirPassInternal

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

default_nameInternal

Generates a default name for the pass based on the name of the type T.

is_mir_availableInternal
mir_constInternal

Make MIR ready for const evaluation. This is run on all MIR, not just on consts!

mir_const_qualifInternal
mir_keysInternal

Finds the full set of DefIds within the current crate that have MIR associated with them.

mir_validatedInternal
optimized_mirInternal
promoted_mirInternal
provideInternal
run_optimization_passesInternal
run_passesInternal