[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 09:09:31 PST 2016


rnk added a comment.

The big change here is that `clang -O0` now applies the noinline attribute everywhere. I can see why someone might expect things to work that way, but it seems surprising to me at first glance.

Before this change I can imagine someone distributing a static archive of bitcode which could be used to produce debug binaries and release binaries. There are some issues with that (lack of lifetime markers), but it should mostly work.

Before this change, this command line would do inlining: `clang -S -emit-llvm foo.c -o - | opt -O2 -S` Now it won't, even though I didn't explicitly pass -O0. Are we happy with that?


https://reviews.llvm.org/D28053





More information about the cfe-commits mailing list