Struct rustc_mir_transform::inline::Inliner[][src]

struct Inliner<'tcx> {
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    codegen_fn_attrs: &'tcx CodegenFnAttrs,
    hir_id: HirId,
    history: Vec<Instance<'tcx>>,
    changed: bool,
}

Fields

tcx: TyCtxt<'tcx>param_env: ParamEnv<'tcx>codegen_fn_attrs: &'tcx CodegenFnAttrs

Caller codegen attributes.

hir_id: HirId

Caller HirID.

history: Vec<Instance<'tcx>>

Stack of inlined Instances.

changed: bool

Indicates that the caller body has been modified.

Implementations

Attempts to inline a callsite into the caller body. When successful returns basic blocks containing the inlined body. Otherwise returns an error describing why inlining didn’t take place.

Returns an error if inlining is not possible based on codegen attributes alone. A success indicates that inlining decision should be based on other criteria.

Returns inlining decision that is based on the examination of callee MIR body. Assumes that codegen attributes have been checked for compatibility already.

If arg is already a temporary, returns it. Otherwise, introduces a fresh temporary T and an instruction T = arg, and returns T.

Introduces a new temporary into the caller body that is live for the duration of the call.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 64 bytes