[PATCH] D133060: [Verifier] Skip debug location check for non-exact functions

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 15:35:49 PDT 2022


ychen added a comment.

In D133060#3765354 <https://reviews.llvm.org/D133060#3765354>, @aprantl wrote:

> This comment from `GlobalValue::isDefinitionExact()` makes me wonder if this is the right condition? Sounds like there are  some non-exact functions that may be inlined?
>
>   /// Inlining is okay across non-exact linkage types as long as they're not
>   /// interposable (see \c isInterposable), since in such cases the currently
>   /// visible variant is *a* correct implementation of the original source
>   /// function; it just isn't the *only* correct implementation.

Hmm, thanks for catching that. There are actually a bunch of other attributes that matter (https://github.com/llvm/llvm-project/blob/fdec50182d85ec0b8518af3baae37ae28b102f1c/llvm/lib/Analysis/InlineCost.cpp#L2861). However, I think checking linkages should avoid most of the unnecessary firing of this assertion. I'll change it to check `isInterposable`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133060/new/

https://reviews.llvm.org/D133060



More information about the llvm-commits mailing list