Stop `llvm.expect`ing assert terminators We're putting `llvm.expect` calls before the <https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.TerminatorKind.html#variant.Assert> terminators. But we don't need them. One of the arms is always to a panic function that's marked `#[cold]`, which is `cold` <https://llvm.org/docs/LangRef.html#function-attributes> in LLVM, which > When computing edge weights, basic blocks post-dominated by a cold function call are also considered to be cold; and, thus, given low weight. So even without us emitting the extra intrinsic call, LLVM knows what to expect for the `br`. Thus we can save the (small) effort of emitting it and then LLVM optimizing it out. r? compiler |
||
|---|---|---|
| .. | ||
| back | ||
| debuginfo | ||
| mir | ||
| traits | ||
| assert_module_sources.rs | ||
| base.rs | ||
| codegen_attrs.rs | ||
| common.rs | ||
| errors.rs | ||
| lib.rs | ||
| meth.rs | ||
| mono_item.rs | ||
| size_of_val.rs | ||
| target_features.rs | ||