rust/library/core
bors 7a08f84627 Auto merge of #126578 - scottmcm:inlining-bonuses-too, r=davidtwco
Account for things that optimize out in inlining costs

This updates the MIR inlining `CostChecker` to have both bonuses and penalties, rather than just penalties.

That lets us add bonuses for some things where we want to encourage inlining without risking wrapping into a gigantic cost.  For example, `switchInt(const …)` we give an inlining bonus because codegen will actually eliminate the branch (and associated dead blocks) once it's monomorphized, so measuring both sides of the branch gives an unrealistically-high cost to it.  Similarly, an `unreachable` terminator gets a small bonus, because whatever branch leads there doesn't actually exist post-codegen.
2024-06-21 02:06:27 +00:00
..
benches Write char::DebugEscape sequences using write_str 2024-05-20 10:04:44 +02:00
src Auto merge of #126578 - scottmcm:inlining-bonuses-too, r=davidtwco 2024-06-21 02:06:27 +00:00
tests Auto merge of #124032 - Voultapher:a-new-sort, r=thomcc 2024-06-20 20:40:43 +00:00
Cargo.toml Remove now outdated comment since we bumped stage0 2024-05-24 08:08:41 +02:00