]> git.lizzy.rs Git - rust.git/commit
mark build::cfg::start_new_block as inline(never)
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Sun, 2 Apr 2017 13:18:39 +0000 (16:18 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Sun, 2 Apr 2017 13:18:39 +0000 (16:18 +0300)
commit09ac56d6efd41c02cbb7f8714d59bdd43f663ec8
treea14dbf66b3692554f2e92408167d3eb970df3a21
parentccce2c6eb914a66571f60fa0afe8a46faa9fb3bd
mark build::cfg::start_new_block as inline(never)

LLVM has a bug - PR32488 - where it fails to deduplicate allocas in some
circumstances. The function `start_new_block` has allocas totalling 1216
bytes, and when LLVM inlines several copies of that function into
the recursive function `expr::into`, that function's stack space usage
goes into tens of kiBs, causing stack overflows.

Mark `start_new_block` as inline(never) to keep it from being inlined,
getting stack usage under control.

Fixes #40493.
Fixes #40573.
src/librustc_mir/build/cfg.rs