]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #40367 - eddyb:naked-cruft, r=nagisa
authorbors <bors@rust-lang.org>
Thu, 13 Apr 2017 11:47:33 +0000 (11:47 +0000)
committerbors <bors@rust-lang.org>
Thu, 13 Apr 2017 11:47:33 +0000 (11:47 +0000)
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones.

These two small changes fix edef1c/libfringe#68:
* Don't emit ZST allocas, such as when returning `()`
* Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed
  * That is, if a loop branches back to it, although I'm not sure that's even valid MIR


Trivial merge