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 CodegenFnAttrsExpand description
Caller codegen attributes.
hir_id: HirIdExpand description
Caller HirID.
history: Vec<Instance<'tcx>>Expand description
Stack of inlined Instances.
changed: boolExpand description
Indicates that the caller body has been modified.
Implementations
impl<'tcx> Inliner<'tcx>[src]
impl<'tcx> Inliner<'tcx>[src]fn process_blocks(
&mut self,
caller_body: &mut Body<'tcx>,
blocks: Range<BasicBlock>
)[src]
&mut self,
caller_body: &mut Body<'tcx>,
blocks: Range<BasicBlock>
)
fn try_inlining(
&self,
caller_body: &mut Body<'tcx>,
callsite: &CallSite<'tcx>
) -> Result<Range<BasicBlock>, &'static str>[src]
fn try_inlining(
&self,
caller_body: &mut Body<'tcx>,
callsite: &CallSite<'tcx>
) -> Result<Range<BasicBlock>, &'static str>[src]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.
fn check_mir_is_available(
&self,
caller_body: &Body<'tcx>,
callee: &Instance<'tcx>
) -> Result<(), &'static str>[src]
&self,
caller_body: &Body<'tcx>,
callee: &Instance<'tcx>
) -> Result<(), &'static str>
fn resolve_callsite(
&self,
caller_body: &Body<'tcx>,
bb: BasicBlock,
bb_data: &BasicBlockData<'tcx>
) -> Option<CallSite<'tcx>>[src]
&self,
caller_body: &Body<'tcx>,
bb: BasicBlock,
bb_data: &BasicBlockData<'tcx>
) -> Option<CallSite<'tcx>>
fn check_codegen_attributes<'satic>(
&self,
callsite: &CallSite<'tcx>,
callee_attrs: &CodegenFnAttrs
) -> Result<(), &'satic str>[src]
fn check_codegen_attributes<'satic>(
&self,
callsite: &CallSite<'tcx>,
callee_attrs: &CodegenFnAttrs
) -> Result<(), &'satic str>[src]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.
fn check_mir_body(
&self,
callsite: &CallSite<'tcx>,
callee_body: &Body<'tcx>,
callee_attrs: &CodegenFnAttrs
) -> Result<(), &'static str>[src]
fn check_mir_body(
&self,
callsite: &CallSite<'tcx>,
callee_body: &Body<'tcx>,
callee_attrs: &CodegenFnAttrs
) -> Result<(), &'static str>[src]Returns inlining decision that is based on the examination of callee MIR body. Assumes that codegen attributes have been checked for compatibility already.
fn inline_call(
&self,
caller_body: &mut Body<'tcx>,
callsite: &CallSite<'tcx>,
callee_body: Body<'tcx>
)[src]
&self,
caller_body: &mut Body<'tcx>,
callsite: &CallSite<'tcx>,
callee_body: Body<'tcx>
)
fn make_call_args(
&self,
args: Vec<Operand<'tcx>>,
callsite: &CallSite<'tcx>,
caller_body: &mut Body<'tcx>,
callee_body: &Body<'tcx>
) -> Vec<Local>[src]
&self,
args: Vec<Operand<'tcx>>,
callsite: &CallSite<'tcx>,
caller_body: &mut Body<'tcx>,
callee_body: &Body<'tcx>
) -> Vec<Local>
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]