If a callee function is not interposable, skip debug location check for its callsites. Doing this is instrumentation-friendly otherwise under some conditions this check triggers for some un-inlinable call sites.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.
Comment Actions
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.
Comment Actions
I wish we had an "isInlineable" function call.
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
3448 | Can you add a comment here that the intention is to ignore non-inlineable functions? Future readers will probably wonder what isInterposable even means. |
Can you add a comment here that the intention is to ignore non-inlineable functions? Future readers will probably wonder what isInterposable even means.