[−][src]Struct rustc_mir::transform::inline::Inliner

pub(in transform::inline) 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

impl<'tcx> Inliner<'tcx>[src]

pub(in transform::inline) fn process_blocks(
    &mut self,
    caller_body: &mut Body<'tcx>,
    blocks: Range<BasicBlock>
)
[src]

pub(in transform::inline) fn is_mir_available(
    &self,
    callee: &Instance<'tcx>,
    caller_body: &Body<'tcx>
) -> bool
[src]

pub(in transform::inline) fn get_valid_function_call(
    &self,
    bb: BasicBlock,
    bb_data: &BasicBlockData<'tcx>,
    caller_body: &Body<'tcx>
) -> Option<CallSite<'tcx>>
[src]

pub(in transform::inline) fn should_inline(
    &self,
    callsite: CallSite<'tcx>,
    callee_body: &Body<'tcx>
) -> bool
[src]

pub(in transform::inline) fn inline_call(
    &self,
    callsite: CallSite<'tcx>,
    caller_body: &mut Body<'tcx>,
    callee_body: Body<'tcx>
)
[src]

pub(in transform::inline) fn make_call_args(
    &self,
    args: Vec<Operand<'tcx>>,
    callsite: &CallSite<'tcx>,
    caller_body: &mut Body<'tcx>,
    callee_body: &Body<'tcx>
) -> Vec<Local>
[src]

pub(in transform::inline) fn create_temp_if_necessary(
    &self,
    arg: Operand<'tcx>,
    callsite: &CallSite<'tcx>,
    caller_body: &mut Body<'tcx>
) -> Local
[src]

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

pub(in transform::inline) fn new_call_temp(
    &self,
    caller_body: &mut Body<'tcx>,
    callsite: &CallSite<'tcx>,
    ty: Ty<'tcx>
) -> Local
[src]

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

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for Inliner<'tcx>

impl<'tcx> !Send for Inliner<'tcx>

impl<'tcx> !Sync for Inliner<'tcx>

impl<'tcx> Unpin for Inliner<'tcx>

impl<'tcx> !UnwindSafe for Inliner<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]