[llvm] [Attr] Add `noipa` function attribute (PR #203304)

J. Ryan Stinnett via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 10:00:23 PDT 2026


jryans wrote:

> Looking through more uses of isInterposable(), I think another place that may need adjustment for NoIPA is llvm/lib/Transforms/Utils/Evaluator.cpp (global ctor evaluation).

I have now added a test for this case.

> I kind of wonder whether it would make sense to move the noipa check into isInterposable() rather than mayBeDerefined() and consider noipa functions interposable by default, and then have a `AllowNoIPA` opt-out flag that we can use in the few places we do want to allow noipa, like inlining?

I have gone ahead and moved the `noipa` check into `isInterposable()` as suggested, which does enable removing some of the added attribute checks where `isInterposable()` was already called, which is promising. Hopefully it is also easier for pass authors to reason about as well.

Instead of a `AllowNoIPA` flag on `isInterposable()` that defaults false, I went for a `CheckNoIPA` flag that defaults true, as it seemed slightly easier to explain the usage that way around.

This should be ready for another look. :smile: 

https://github.com/llvm/llvm-project/pull/203304


More information about the llvm-commits mailing list