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
..
2024-04-26 17:20:16 +02:00
2024-04-18 18:55:20 +02:00
2024-04-19 23:09:37 +02:00
2024-04-19 23:09:37 +02:00
2024-04-19 23:09:37 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 18:55:20 +02:00
2024-04-19 23:09:37 +02:00
2024-04-19 23:09:37 +02:00
2024-04-19 23:09:37 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 09:42:26 -07:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-05-29 17:06:54 +01:00
2024-04-18 18:55:20 +02:00
2024-04-18 18:55:20 +02:00
2024-05-29 17:06:54 +01:00
2024-04-18 06:13:47 +02:00
2024-04-21 21:04:32 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-21 21:04:32 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-18 06:13:47 +02:00
2024-04-19 23:09:37 +02:00
2024-04-21 21:04:32 +02:00
2024-04-19 23:09:37 +02:00
2024-04-21 21:04:32 +02:00
2024-04-21 21:04:32 +02:00
2024-04-21 21:04:32 +02:00
2024-04-26 17:20:16 +02:00
2024-04-26 17:20:16 +02:00
2024-04-26 17:20:16 +02:00
2024-04-26 17:20:16 +02:00
2024-04-26 17:20:16 +02:00
2024-05-18 23:56:57 +02:00
2024-05-18 23:56:57 +02:00
2024-05-18 23:56:57 +02:00
2024-05-18 23:56:57 +02:00
2024-05-18 23:56:57 +02:00
2024-05-18 23:56:57 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-09 10:16:12 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00
2024-06-16 20:38:08 +02:00

This is serves as a collection of crashes so that accidental ICE fixes are tracked. This was formally done at https://github.com/rust-lang/glacier but doing it inside the rustc testsuite is more convenient.

It is imperative that a test in the suite causes an internal compiler error/panic or makes rustc crash in some other way. A test will "pass" if rustc exits with something other than 1 or 0.

When adding crashes from https://github.com/rust-lang/rust/issues, the issue number should be noted in the file name (12345.rs should suffice) and perhaps also inside the file via //@ known-bug #4321

If you happen to fix one of the crashes, please move it to a fitting subdirectory in tests/ui and give it a meaningful name. Also please add a doc comment at the top of the file explaining why this test exists. :) Adding Fixes #NNNNN Fixes #MMMMM to the description of your pull request will ensure the corresponding tickets will be closed automatically upon merge. The ticket ids can be found in the file name or the known-bug annotation inside the testfile.