2420bd34ba
Permit the MIR inliner to inline diverging functions This heuristic prevents inlining of `hint::unreachable_unchecked`, which in turn makes `Option/Result::unwrap_unchecked` a bad inlining candidate. I looked through the changes to `core`, `alloc`, `std`, and `hashbrown` by hand and they all seem reasonable. Let's see how this looks in perf... --- Based on rustc-perf it looks like this regresses ctfe-stress, and the cachegrind diff indicates that this regression is in `InterpCx::statement`. I don't know how to do any deeper analysis because that function is _enormous_ in the try toolchain, which has no debuginfo in it. And a local build produces significantly different codegen for that function, even with LTO. |
||
---|---|---|
.. | ||
custom | ||
async_await.a-{closure#0}.generator_resume.0.mir | ||
async_await.b-{closure#0}.generator_resume.0.mir | ||
async_await.rs | ||
enum_cast.bar.built.after.mir | ||
enum_cast.boo.built.after.mir | ||
enum_cast.droppy.built.after.mir | ||
enum_cast.foo.built.after.mir | ||
enum_cast.rs | ||
issue_49232.main.built.after.mir | ||
issue_49232.rs | ||
issue_101867.main.built.after.mir | ||
issue_101867.rs | ||
match_false_edges.full_tested_match2.built.after.mir | ||
match_false_edges.full_tested_match.built.after.mir | ||
match_false_edges.main.built.after.mir | ||
match_false_edges.rs | ||
receiver_ptr_mutability.main.built.after.mir | ||
receiver_ptr_mutability.rs | ||
shifts.rs | ||
shifts.shift_signed.built.after.mir | ||
shifts.shift_unsigned.built.after.mir | ||
simple_match.match_bool.built.after.mir | ||
simple_match.rs | ||
storage_live_dead_in_statics.rs | ||
storage_live_dead_in_statics.XXX.built.after.mir | ||
uniform_array_move_out.move_out_by_subslice.built.after.mir | ||
uniform_array_move_out.move_out_from_end.built.after.mir | ||
uniform_array_move_out.rs |