[][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_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
erase_regionsInternal

This pass erases all early-bound regions from the types occurring in the MIR. We want to do this once just before codegen, so codegen does not have to take care erasing regions all over the place. N.B., we do not erase regions of statements that are relevant for "types-as-contracts"-validation, namely, AcquireValid and ReleaseValid.

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.

lower_128bitInternal

Replaces 128-bit operators with lang item calls

no_landing_padsInternal

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

promote_constsInternal

A pass that promotes borrows of constant rvalues.

qualify_constsInternal

A pass that qualifies constness of temporaries in constants, static initializers and functions and also drives promotion.

qualify_min_const_fnInternal
remove_noop_landing_padsInternal
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.

uniform_array_move_outInternal

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_builtInternal
mir_constInternal
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_passesInternal