1 //! Inlining pass for MIR functions
3 use rustc_hir::def_id::DefId;
5 use rustc_index::bit_set::BitSet;
6 use rustc_index::vec::{Idx, IndexVec};
8 use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
9 use rustc::mir::visit::*;
11 use rustc::session::config::Sanitizer;
12 use rustc::ty::subst::{InternalSubsts, Subst, SubstsRef};
13 use rustc::ty::{self, Instance, InstanceDef, ParamEnv, Ty, TyCtxt, TypeFoldable};
15 use super::simplify::{remove_dead_blocks, CfgSimplifier};
16 use crate::transform::{MirPass, MirSource};
17 use std::collections::VecDeque;
20 use rustc_attr as attr;
21 use rustc_target::spec::abi::Abi;
23 const DEFAULT_THRESHOLD: usize = 50;
24 const HINT_THRESHOLD: usize = 100;
26 const INSTR_COST: usize = 5;
27 const CALL_PENALTY: usize = 25;
29 const UNKNOWN_SIZE_COST: usize = 10;
33 #[derive(Copy, Clone, Debug)]
34 struct CallSite<'tcx> {
36 substs: SubstsRef<'tcx>,
41 impl<'tcx> MirPass<'tcx> for Inline {
42 fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut BodyAndCache<'tcx>) {
43 if tcx.sess.opts.debugging_opts.mir_opt_level >= 2 {
44 Inliner { tcx, source }.run_pass(body);
49 struct Inliner<'tcx> {
51 source: MirSource<'tcx>,
55 fn run_pass(&self, caller_body: &mut BodyAndCache<'tcx>) {
56 // Keep a queue of callsites to try inlining on. We take
57 // advantage of the fact that queries detect cycles here to
58 // allow us to try and fetch the fully optimized MIR of a
59 // call; if it succeeds, we can inline it and we know that
60 // they do not call us. Otherwise, we just don't try to
63 // We use a queue so that we inline "broadly" before we inline
64 // in depth. It is unclear if this is the best heuristic,
65 // really, but that's true of all the heuristics in this
68 let mut callsites = VecDeque::new();
70 let mut param_env = self.tcx.param_env(self.source.def_id());
72 let substs = &InternalSubsts::identity_for_item(self.tcx, self.source.def_id());
74 // For monomorphic functions, we can use `Reveal::All` to resolve specialized instances.
75 if !substs.needs_subst() {
76 param_env = param_env.with_reveal_all();
79 // Only do inlining into fn bodies.
80 let id = self.tcx.hir().as_local_hir_id(self.source.def_id()).unwrap();
81 if self.tcx.hir().body_owner_kind(id).is_fn_or_closure() && self.source.promoted.is_none() {
82 for (bb, bb_data) in caller_body.basic_blocks().iter_enumerated() {
83 if let Some(callsite) =
84 self.get_valid_function_call(bb, bb_data, caller_body, param_env)
86 callsites.push_back(callsite);
94 let mut changed = false;
98 while let Some(callsite) = callsites.pop_front() {
99 debug!("checking whether to inline callsite {:?}", callsite);
100 if !self.tcx.is_mir_available(callsite.callee) {
101 debug!("checking whether to inline callsite {:?} - MIR unavailable", callsite);
105 let self_node_id = self.tcx.hir().as_local_node_id(self.source.def_id()).unwrap();
106 let callee_node_id = self.tcx.hir().as_local_node_id(callsite.callee);
108 let callee_body = if let Some(callee_node_id) = callee_node_id {
109 // Avoid a cycle here by only using `optimized_mir` only if we have
110 // a lower node id than the callee. This ensures that the callee will
111 // not inline us. This trick only works without incremental compilation.
112 // So don't do it if that is enabled.
113 if !self.tcx.dep_graph.is_fully_enabled()
114 && self_node_id.as_u32() < callee_node_id.as_u32()
116 self.tcx.optimized_mir(callsite.callee)
121 // This cannot result in a cycle since the callee MIR is from another crate
122 // and is already optimized.
123 self.tcx.optimized_mir(callsite.callee)
126 let callee_body = if self.consider_optimizing(callsite, callee_body) {
127 self.tcx.subst_and_normalize_erasing_regions(
136 let start = caller_body.basic_blocks().len();
137 debug!("attempting to inline callsite {:?} - body={:?}", callsite, callee_body);
138 if !self.inline_call(callsite, caller_body, callee_body) {
139 debug!("attempting to inline callsite {:?} - failure", callsite);
142 debug!("attempting to inline callsite {:?} - success", callsite);
144 // Add callsites from inlined function
145 for (bb, bb_data) in caller_body.basic_blocks().iter_enumerated().skip(start) {
146 if let Some(new_callsite) =
147 self.get_valid_function_call(bb, bb_data, caller_body, param_env)
149 // Don't inline the same function multiple times.
150 if callsite.callee != new_callsite.callee {
151 callsites.push_back(new_callsite);
165 // Simplify if we inlined anything.
167 debug!("running simplify cfg on {:?}", self.source);
168 CfgSimplifier::new(caller_body).simplify();
169 remove_dead_blocks(caller_body);
173 fn get_valid_function_call(
176 bb_data: &BasicBlockData<'tcx>,
177 caller_body: &Body<'tcx>,
178 param_env: ParamEnv<'tcx>,
179 ) -> Option<CallSite<'tcx>> {
180 // Don't inline calls that are in cleanup blocks.
181 if bb_data.is_cleanup {
185 // Only consider direct calls to functions
186 let terminator = bb_data.terminator();
187 if let TerminatorKind::Call { func: ref op, .. } = terminator.kind {
188 if let ty::FnDef(callee_def_id, substs) = op.ty(caller_body, self.tcx).kind {
189 let instance = Instance::resolve(self.tcx, param_env, callee_def_id, substs)?;
191 if let InstanceDef::Virtual(..) = instance.def {
195 return Some(CallSite {
196 callee: instance.def_id(),
197 substs: instance.substs,
199 location: terminator.source_info,
207 fn consider_optimizing(&self, callsite: CallSite<'tcx>, callee_body: &Body<'tcx>) -> bool {
208 debug!("consider_optimizing({:?})", callsite);
209 self.should_inline(callsite, callee_body)
210 && self.tcx.consider_optimizing(|| {
211 format!("Inline {:?} into {:?}", callee_body.span, callsite)
215 fn should_inline(&self, callsite: CallSite<'tcx>, callee_body: &Body<'tcx>) -> bool {
216 debug!("should_inline({:?})", callsite);
219 // Cannot inline generators which haven't been transformed yet
220 if callee_body.yield_ty.is_some() {
221 debug!(" yield ty present - not inlining");
225 let codegen_fn_attrs = tcx.codegen_fn_attrs(callsite.callee);
227 if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::TRACK_CALLER) {
228 debug!("`#[track_caller]` present - not inlining");
232 // Avoid inlining functions marked as no_sanitize if sanitizer is enabled,
233 // since instrumentation might be enabled and performed on the caller.
234 match self.tcx.sess.opts.debugging_opts.sanitizer {
235 Some(Sanitizer::Address) => {
236 if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_SANITIZE_ADDRESS) {
240 Some(Sanitizer::Memory) => {
241 if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_SANITIZE_MEMORY) {
245 Some(Sanitizer::Thread) => {
246 if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_SANITIZE_THREAD) {
250 Some(Sanitizer::Leak) => {}
254 let hinted = match codegen_fn_attrs.inline {
255 // Just treat inline(always) as a hint for now,
256 // there are cases that prevent inlining that we
257 // need to check for first.
258 attr::InlineAttr::Always => true,
259 attr::InlineAttr::Never => {
260 debug!("`#[inline(never)]` present - not inlining");
263 attr::InlineAttr::Hint => true,
264 attr::InlineAttr::None => false,
267 // Only inline local functions if they would be eligible for cross-crate
268 // inlining. This is to ensure that the final crate doesn't have MIR that
269 // reference unexported symbols
270 if callsite.callee.is_local() {
271 if callsite.substs.non_erasable_generics().count() == 0 && !hinted {
272 debug!(" callee is an exported function - not inlining");
277 let mut threshold = if hinted { HINT_THRESHOLD } else { DEFAULT_THRESHOLD };
279 // Significantly lower the threshold for inlining cold functions
280 if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
284 // Give a bonus functions with a small number of blocks,
285 // We normally have two or three blocks for even
286 // very small functions.
287 if callee_body.basic_blocks().len() <= 3 {
288 threshold += threshold / 4;
290 debug!(" final inline threshold = {}", threshold);
292 // FIXME: Give a bonus to functions with only a single caller
294 let param_env = tcx.param_env(self.source.def_id());
296 let mut first_block = true;
299 // Traverse the MIR manually so we can account for the effects of
300 // inlining on the CFG.
301 let mut work_list = vec![START_BLOCK];
302 let mut visited = BitSet::new_empty(callee_body.basic_blocks().len());
303 while let Some(bb) = work_list.pop() {
304 if !visited.insert(bb.index()) {
307 let blk = &callee_body.basic_blocks()[bb];
309 for stmt in &blk.statements {
310 // Don't count StorageLive/StorageDead in the inlining cost.
312 StatementKind::StorageLive(_)
313 | StatementKind::StorageDead(_)
314 | StatementKind::Nop => {}
315 _ => cost += INSTR_COST,
318 let term = blk.terminator();
319 let mut is_drop = false;
321 TerminatorKind::Drop { ref location, target, unwind }
322 | TerminatorKind::DropAndReplace { ref location, target, unwind, .. } => {
324 work_list.push(target);
325 // If the location doesn't actually need dropping, treat it like
327 let ty = location.ty(callee_body, tcx).subst(tcx, callsite.substs).ty;
328 if ty.needs_drop(tcx, param_env) {
329 cost += CALL_PENALTY;
330 if let Some(unwind) = unwind {
331 work_list.push(unwind);
338 TerminatorKind::Unreachable | TerminatorKind::Call { destination: None, .. }
341 // If the function always diverges, don't inline
342 // unless the cost is zero
346 TerminatorKind::Call { func: Operand::Constant(ref f), .. } => {
347 if let ty::FnDef(def_id, _) = f.literal.ty.kind {
348 // Don't give intrinsics the extra penalty for calls
349 let f = tcx.fn_sig(def_id);
350 if f.abi() == Abi::RustIntrinsic || f.abi() == Abi::PlatformIntrinsic {
353 cost += CALL_PENALTY;
357 TerminatorKind::Assert { .. } => cost += CALL_PENALTY,
358 _ => cost += INSTR_COST,
362 for &succ in term.successors() {
363 work_list.push(succ);
370 // Count up the cost of local variables and temps, if we know the size
371 // use that, otherwise we use a moderately-large dummy cost.
373 let ptr_size = tcx.data_layout.pointer_size.bytes();
375 for v in callee_body.vars_and_temps_iter() {
376 let v = &callee_body.local_decls[v];
377 let ty = v.ty.subst(tcx, callsite.substs);
378 // Cost of the var is the size in machine-words, if we know
380 if let Some(size) = type_size_of(tcx, param_env, ty) {
381 cost += (size / ptr_size) as usize;
383 cost += UNKNOWN_SIZE_COST;
387 if let attr::InlineAttr::Always = codegen_fn_attrs.inline {
388 debug!("INLINING {:?} because inline(always) [cost={}]", callsite, cost);
391 if cost <= threshold {
392 debug!("INLINING {:?} [cost={} <= threshold={}]", callsite, cost, threshold);
395 debug!("NOT inlining {:?} [cost={} > threshold={}]", callsite, cost, threshold);
403 callsite: CallSite<'tcx>,
404 caller_body: &mut BodyAndCache<'tcx>,
405 mut callee_body: BodyAndCache<'tcx>,
407 let terminator = caller_body[callsite.bb].terminator.take().unwrap();
408 match terminator.kind {
409 // FIXME: Handle inlining of diverging calls
410 TerminatorKind::Call { args, destination: Some(destination), cleanup, .. } => {
411 debug!("inlined {:?} into {:?}", callsite.callee, self.source);
413 let mut local_map = IndexVec::with_capacity(callee_body.local_decls.len());
414 let mut scope_map = IndexVec::with_capacity(callee_body.source_scopes.len());
416 for mut scope in callee_body.source_scopes.iter().cloned() {
417 if scope.parent_scope.is_none() {
418 scope.parent_scope = Some(callsite.location.scope);
419 // FIXME(eddyb) is this really needed?
420 // (also note that it's always overwritten below)
421 scope.span = callee_body.span;
424 // FIXME(eddyb) this doesn't seem right at all.
425 // The inlined source scopes should probably be annotated as
426 // such, but also contain all of the original information.
427 scope.span = callsite.location.span;
429 let idx = caller_body.source_scopes.push(scope);
433 for loc in callee_body.vars_and_temps_iter() {
434 let mut local = callee_body.local_decls[loc].clone();
436 local.source_info.scope = scope_map[local.source_info.scope];
437 local.source_info.span = callsite.location.span;
439 let idx = caller_body.local_decls.push(local);
443 // If the call is something like `a[*i] = f(i)`, where
444 // `i : &mut usize`, then just duplicating the `a[*i]`
445 // Place could result in two different locations if `f`
446 // writes to `i`. To prevent this we need to create a temporary
447 // borrow of the place and pass the destination as `*temp` instead.
448 fn dest_needs_borrow(place: &Place<'_>) -> bool {
449 for elem in place.projection.iter() {
451 ProjectionElem::Deref | ProjectionElem::Index(_) => return true,
459 let dest = if dest_needs_borrow(&destination.0) {
460 debug!("creating temp for return destination");
461 let dest = Rvalue::Ref(
462 self.tcx.lifetimes.re_erased,
463 BorrowKind::Mut { allow_two_phase_borrow: false },
467 let ty = dest.ty(&**caller_body, self.tcx);
469 let temp = LocalDecl::new_temp(ty, callsite.location.span);
471 let tmp = caller_body.local_decls.push(temp);
472 let tmp = Place::from(tmp);
474 let stmt = Statement {
475 source_info: callsite.location,
476 kind: StatementKind::Assign(box (tmp, dest)),
478 caller_body[callsite.bb].statements.push(stmt);
479 self.tcx.mk_place_deref(tmp)
484 let return_block = destination.1;
486 // Copy the arguments if needed.
487 let args: Vec<_> = self.make_call_args(args, &callsite, caller_body);
489 let bb_len = caller_body.basic_blocks().len();
490 let mut integrator = Integrator {
497 cleanup_block: cleanup,
498 in_cleanup_block: false,
502 for mut var_debug_info in callee_body.var_debug_info.drain(..) {
503 integrator.visit_var_debug_info(&mut var_debug_info);
504 caller_body.var_debug_info.push(var_debug_info);
507 for (bb, mut block) in callee_body.basic_blocks_mut().drain_enumerated(..) {
508 integrator.visit_basic_block_data(bb, &mut block);
509 caller_body.basic_blocks_mut().push(block);
512 let terminator = Terminator {
513 source_info: callsite.location,
514 kind: TerminatorKind::Goto { target: BasicBlock::new(bb_len) },
517 caller_body[callsite.bb].terminator = Some(terminator);
522 caller_body[callsite.bb].terminator =
523 Some(Terminator { source_info: terminator.source_info, kind });
531 args: Vec<Operand<'tcx>>,
532 callsite: &CallSite<'tcx>,
533 caller_body: &mut BodyAndCache<'tcx>,
537 // There is a bit of a mismatch between the *caller* of a closure and the *callee*.
538 // The caller provides the arguments wrapped up in a tuple:
540 // tuple_tmp = (a, b, c)
541 // Fn::call(closure_ref, tuple_tmp)
543 // meanwhile the closure body expects the arguments (here, `a`, `b`, and `c`)
544 // as distinct arguments. (This is the "rust-call" ABI hack.) Normally, codegen has
545 // the job of unpacking this tuple. But here, we are codegen. =) So we want to create
548 // [closure_ref, tuple_tmp.0, tuple_tmp.1, tuple_tmp.2]
550 // Except for one tiny wrinkle: we don't actually want `tuple_tmp.0`. It's more convenient
551 // if we "spill" that into *another* temporary, so that we can map the argument
552 // variable in the callee MIR directly to an argument variable on our side.
553 // So we introduce temporaries like:
555 // tmp0 = tuple_tmp.0
556 // tmp1 = tuple_tmp.1
557 // tmp2 = tuple_tmp.2
559 // and the vector is `[closure_ref, tmp0, tmp1, tmp2]`.
560 if tcx.is_closure(callsite.callee) {
561 let mut args = args.into_iter();
562 let self_ = self.create_temp_if_necessary(args.next().unwrap(), callsite, caller_body);
563 let tuple = self.create_temp_if_necessary(args.next().unwrap(), callsite, caller_body);
564 assert!(args.next().is_none());
566 let tuple = Place::from(tuple);
567 let tuple_tys = if let ty::Tuple(s) = tuple.ty(&**caller_body, tcx).ty.kind {
570 bug!("Closure arguments are not passed as a tuple");
573 // The `closure_ref` in our example above.
574 let closure_ref_arg = iter::once(self_);
576 // The `tmp0`, `tmp1`, and `tmp2` in our example abonve.
577 let tuple_tmp_args = tuple_tys.iter().enumerate().map(|(i, ty)| {
578 // This is e.g., `tuple_tmp.0` in our example above.
580 Operand::Move(tcx.mk_place_field(tuple.clone(), Field::new(i), ty.expect_ty()));
582 // Spill to a local to make e.g., `tmp0`.
583 self.create_temp_if_necessary(tuple_field, callsite, caller_body)
586 closure_ref_arg.chain(tuple_tmp_args).collect()
589 .map(|a| self.create_temp_if_necessary(a, callsite, caller_body))
594 /// If `arg` is already a temporary, returns it. Otherwise, introduces a fresh
595 /// temporary `T` and an instruction `T = arg`, and returns `T`.
596 fn create_temp_if_necessary(
599 callsite: &CallSite<'tcx>,
600 caller_body: &mut BodyAndCache<'tcx>,
602 // FIXME: Analysis of the usage of the arguments to avoid
603 // unnecessary temporaries.
605 if let Operand::Move(place) = &arg {
606 if let Some(local) = place.as_local() {
607 if caller_body.local_kind(local) == LocalKind::Temp {
608 // Reuse the operand if it's a temporary already
614 debug!("creating temp for argument {:?}", arg);
615 // Otherwise, create a temporary for the arg
616 let arg = Rvalue::Use(arg);
618 let ty = arg.ty(&**caller_body, self.tcx);
620 let arg_tmp = LocalDecl::new_temp(ty, callsite.location.span);
621 let arg_tmp = caller_body.local_decls.push(arg_tmp);
623 let stmt = Statement {
624 source_info: callsite.location,
625 kind: StatementKind::Assign(box (Place::from(arg_tmp), arg)),
627 caller_body[callsite.bb].statements.push(stmt);
632 fn type_size_of<'tcx>(
634 param_env: ty::ParamEnv<'tcx>,
637 tcx.layout_of(param_env.and(ty)).ok().map(|layout| layout.size.bytes())
643 * Integrates blocks from the callee function into the calling function.
644 * Updates block indices, references to locals and other control flow
647 struct Integrator<'a, 'tcx> {
650 local_map: IndexVec<Local, Local>,
651 scope_map: IndexVec<SourceScope, SourceScope>,
652 destination: Place<'tcx>,
653 return_block: BasicBlock,
654 cleanup_block: Option<BasicBlock>,
655 in_cleanup_block: bool,
659 impl<'a, 'tcx> Integrator<'a, 'tcx> {
660 fn update_target(&self, tgt: BasicBlock) -> BasicBlock {
661 let new = BasicBlock::new(tgt.index() + self.block_idx);
662 debug!("updating target `{:?}`, new: `{:?}`", tgt, new);
666 fn make_integrate_local(&self, local: Local) -> Local {
667 if local == RETURN_PLACE {
668 return self.destination.local;
671 let idx = local.index() - 1;
672 if idx < self.args.len() {
673 return self.args[idx];
676 self.local_map[Local::new(idx - self.args.len())]
680 impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> {
681 fn tcx(&self) -> TyCtxt<'tcx> {
685 fn visit_local(&mut self, local: &mut Local, _ctxt: PlaceContext, _location: Location) {
686 *local = self.make_integrate_local(*local);
689 fn visit_place(&mut self, place: &mut Place<'tcx>, context: PlaceContext, location: Location) {
690 // If this is the `RETURN_PLACE`, we need to rebase any projections onto it.
691 let dest_proj_len = self.destination.projection.len();
692 if place.local == RETURN_PLACE && dest_proj_len > 0 {
693 let mut projs = Vec::with_capacity(dest_proj_len + place.projection.len());
694 projs.extend(self.destination.projection);
695 projs.extend(place.projection);
697 place.projection = self.tcx.intern_place_elems(&*projs);
699 // Handles integrating any locals that occur in the base
701 self.super_place(place, context, location)
704 fn process_projection_elem(&mut self, elem: &PlaceElem<'tcx>) -> Option<PlaceElem<'tcx>> {
705 if let PlaceElem::Index(local) = elem {
706 let new_local = self.make_integrate_local(*local);
708 if new_local != *local {
709 return Some(PlaceElem::Index(new_local));
716 fn visit_basic_block_data(&mut self, block: BasicBlock, data: &mut BasicBlockData<'tcx>) {
717 self.in_cleanup_block = data.is_cleanup;
718 self.super_basic_block_data(block, data);
719 self.in_cleanup_block = false;
722 fn visit_retag(&mut self, kind: &mut RetagKind, place: &mut Place<'tcx>, loc: Location) {
723 self.super_retag(kind, place, loc);
725 // We have to patch all inlined retags to be aware that they are no longer
726 // happening on function entry.
727 if *kind == RetagKind::FnEntry {
728 *kind = RetagKind::Default;
732 fn visit_terminator_kind(&mut self, kind: &mut TerminatorKind<'tcx>, loc: Location) {
733 self.super_terminator_kind(kind, loc);
736 TerminatorKind::GeneratorDrop | TerminatorKind::Yield { .. } => bug!(),
737 TerminatorKind::Goto { ref mut target } => {
738 *target = self.update_target(*target);
740 TerminatorKind::SwitchInt { ref mut targets, .. } => {
742 *tgt = self.update_target(*tgt);
745 TerminatorKind::Drop { ref mut target, ref mut unwind, .. }
746 | TerminatorKind::DropAndReplace { ref mut target, ref mut unwind, .. } => {
747 *target = self.update_target(*target);
748 if let Some(tgt) = *unwind {
749 *unwind = Some(self.update_target(tgt));
750 } else if !self.in_cleanup_block {
751 // Unless this drop is in a cleanup block, add an unwind edge to
752 // the original call's cleanup block
753 *unwind = self.cleanup_block;
756 TerminatorKind::Call { ref mut destination, ref mut cleanup, .. } => {
757 if let Some((_, ref mut tgt)) = *destination {
758 *tgt = self.update_target(*tgt);
760 if let Some(tgt) = *cleanup {
761 *cleanup = Some(self.update_target(tgt));
762 } else if !self.in_cleanup_block {
763 // Unless this call is in a cleanup block, add an unwind edge to
764 // the original call's cleanup block
765 *cleanup = self.cleanup_block;
768 TerminatorKind::Assert { ref mut target, ref mut cleanup, .. } => {
769 *target = self.update_target(*target);
770 if let Some(tgt) = *cleanup {
771 *cleanup = Some(self.update_target(tgt));
772 } else if !self.in_cleanup_block {
773 // Unless this assert is in a cleanup block, add an unwind edge to
774 // the original call's cleanup block
775 *cleanup = self.cleanup_block;
778 TerminatorKind::Return => {
779 *kind = TerminatorKind::Goto { target: self.return_block };
781 TerminatorKind::Resume => {
782 if let Some(tgt) = self.cleanup_block {
783 *kind = TerminatorKind::Goto { target: tgt }
786 TerminatorKind::Abort => {}
787 TerminatorKind::Unreachable => {}
788 TerminatorKind::FalseEdges { ref mut real_target, ref mut imaginary_target } => {
789 *real_target = self.update_target(*real_target);
790 *imaginary_target = self.update_target(*imaginary_target);
792 TerminatorKind::FalseUnwind { real_target: _, unwind: _ } =>
793 // see the ordering of passes in the optimized_mir query.
795 bug!("False unwinds should have been removed before inlining")
800 fn visit_source_scope(&mut self, scope: &mut SourceScope) {
801 *scope = self.scope_map[*scope];