[PATCH] D53431: clang appears not to respect __attribute__((noinline))

David Major via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 14:17:57 PDT 2018


dmajor added a comment.

In https://reviews.llvm.org/D53431#1271272, @chandlerc wrote:

> The intent of `noinline` in LLVM's IR is to block inlining, not all interprocedural optimizations. So I don't think this is actually a bug


While this position may be correct in the technical sense, I don't think it's helpful to real-world developers. To a non-compiler-engineer, what's happening //is// "inlining", and clang is doing an unexpected thing by dropping the function call.

When people in my organization ask me why this doesn't work, I don't want to have to explain "it's not actually inlining" nor "use optnone". It would be great if there could be a change in the behavior here (but I have no expertise on whether this specific patch is the right way to achieve it).


https://reviews.llvm.org/D53431





More information about the llvm-commits mailing list