Commit 6837b82
committed
Auto merge of rust-lang#121309 - Nilstrieb:inline-all-the-fallbacks, r=oli-obk
Make intrinsic fallback bodies cross-crate inlineable
This change was prompted by the stage1 compiler spending 4% of its time when compiling the polymorphic-recursion MIR opt test in `unlikely`.
Intrinsic fallback bodies like `unlikely` should always be inlined, it's very silly if they are not. To do this, we enable the fallback bodies to be cross-crate inlineable. Not that this matters for our workloads since the compiler never actually _uses_ the "fallback bodies", it just uses whatever was cfg(bootstrap)ped, so I've also added `#[inline]` to those.
See the comments for more information.
r? oli-obk1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
| |||
975 | 976 | | |
976 | 977 | | |
977 | 978 | | |
| 979 | + | |
978 | 980 | | |
979 | 981 | | |
980 | 982 | | |
| |||
994 | 996 | | |
995 | 997 | | |
996 | 998 | | |
| 999 | + | |
997 | 1000 | | |
998 | 1001 | | |
999 | 1002 | | |
| |||
2596 | 2599 | | |
2597 | 2600 | | |
2598 | 2601 | | |
| 2602 | + | |
2599 | 2603 | | |
2600 | 2604 | | |
2601 | 2605 | | |
| |||
2633 | 2637 | | |
2634 | 2638 | | |
2635 | 2639 | | |
| 2640 | + | |
2636 | 2641 | | |
2637 | 2642 | | |
2638 | 2643 | | |
| |||
2652 | 2657 | | |
2653 | 2658 | | |
2654 | 2659 | | |
| 2660 | + | |
2655 | 2661 | | |
2656 | 2662 | | |
2657 | 2663 | | |
| |||
0 commit comments