diff options
| author | Maybe Lapkin <waffle.lapkin@gmail.com> | 2024-07-07 18:04:29 +0200 |
|---|---|---|
| committer | Maybe Lapkin <waffle.lapkin@gmail.com> | 2024-07-07 18:16:38 +0200 |
| commit | 7fd0c55a1a85b42b02c378ba5472243cc17211dd (patch) | |
| tree | d20048e32f8b3879976b9d7246563cef27004528 /compiler/rustc_mir_transform/src/cost_checker.rs | |
| parent | 54e11cf378d5f3a423d98b9a8bcbc6c25078995a (diff) | |
| download | rust-7fd0c55a1a85b42b02c378ba5472243cc17211dd.tar.gz rust-7fd0c55a1a85b42b02c378ba5472243cc17211dd.zip | |
Fix conflicts after rebase
- r-l/r 126784 - r-l/r 127113 - r-l/miri 3562
Diffstat (limited to 'compiler/rustc_mir_transform/src/cost_checker.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/cost_checker.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/cost_checker.rs b/compiler/rustc_mir_transform/src/cost_checker.rs index 3333bebff3a..a1c1422912e 100644 --- a/compiler/rustc_mir_transform/src/cost_checker.rs +++ b/compiler/rustc_mir_transform/src/cost_checker.rs @@ -40,7 +40,9 @@ impl<'b, 'tcx> CostChecker<'b, 'tcx> { fn is_call_like(bbd: &BasicBlockData<'_>) -> bool { use TerminatorKind::*; match bbd.terminator().kind { - Call { .. } | Drop { .. } | Assert { .. } | InlineAsm { .. } => true, + Call { .. } | TailCall { .. } | Drop { .. } | Assert { .. } | InlineAsm { .. } => { + true + } Goto { .. } | SwitchInt { .. } @@ -137,6 +139,9 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> { self.penalty += LANDINGPAD_PENALTY; } } + TerminatorKind::TailCall { .. } => { + self.penalty += CALL_PENALTY; + } TerminatorKind::SwitchInt { discr, targets } => { if discr.constant().is_some() { // Not only will this become a `Goto`, but likely other |
