Expand description
Inlining pass for MIR functions.
Re-exportsยง
use std::ops::Range;๐use std::ops::RangeFrom;๐use std::debug_assert_matches;๐use std::iter;๐use rustc_abi::ExternAbi;๐use rustc_abi::FieldIdx;๐use rustc_attr_ir::lang_items::LangItem;๐use rustc_attr_ir::InlineAttr;๐use rustc_attr_ir::OptimizeAttr;๐use rustc_hir::def::DefKind;๐use rustc_hir::def_id::DefId;๐use rustc_index::Idx;๐use rustc_index::bit_set::DenseBitSet;๐use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;๐use rustc_middle::ty;๐use rustc_middle::ty::Instance;๐use rustc_middle::ty::InstanceKind;๐use rustc_middle::ty::ShimKind;๐use rustc_middle::ty::Ty;๐use rustc_middle::ty::TyCtxt;๐use rustc_middle::ty::TypeFlags;๐use rustc_middle::ty::TypeVisitableExt;๐use rustc_middle::ty::Unnormalized;๐use rustc_session::config::DebugInfo;๐use rustc_session::config::OptLevel;๐use rustc_span::Spanned;๐use rustc_span::bug;๐use tracing::debug;๐use tracing::instrument;๐use tracing::instrument;๐use tracing::trace;๐use tracing::trace_span;๐use crate::cost_checker::CostChecker;๐use crate::cost_checker::is_call_like;๐use crate::simplify::UsedInStmtLocals;๐use crate::simplify::simplify_cfg;๐use crate::validate::validate_types;๐use crate::PassPolicy;๐use crate::check_inline;๐use crate::util;๐use rustc_middle::mir::visit::*;๐use rustc_middle::mir::*;๐
Modulesยง
- cycle ๐
Structsยง
- Call
Site ๐ - Force
Inline - Force
Inliner ๐ - Inline
- Integrator ๐
- Integrator.
- Normal
Inliner ๐
Constantsยง
- HISTORY_
DEPTH_ ๐LIMIT - TOP_
DOWN_ ๐DEPTH_ LIMIT
Traitsยง
- Inliner ๐
Functionsยง
- body_
is_ ๐forwarder - check_
codegen_ ๐attributes - 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.
- check_
mir_ ๐is_ available - create_
temp_ ๐if_ necessary - If
argis already a temporary, returns it. Otherwise, introduces a fresh temporaryTand an instructionT = arg, and returnsT. - inline ๐
- inline_
call ๐ - make_
call_ ๐args - new_
call_ ๐temp - Introduces a new temporary into the caller body that is live for the duration of the call.
- process_
blocks ๐ - resolve_
callsite ๐ - try_
inlining ๐ - 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.
- try_
instance_ ๐mir