The same check is done in InlineCost: https://github.com/llvm/llvm-project/blob/8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2/llvm/lib/Analysis/InlineCost.cpp#L2537-L2552
Also, doing a check on the callee here is confusing, because anything that deals with callee should be done in the inner loop where we proecss all calls from the same caller.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The same check is done in InlineCost: https://github.com/llvm/llvm-project/blob/8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2/llvm/lib/Analysis/InlineCost.cpp#L2537-L2552
The check in InlineCost is on Caller, so it's not strictly redundant.
Comment Actions
On the other hand, I expect this to be captured as incompatible attributes (caller without it, but callee has it), so removing the check here should be fine.
Comment Actions
It checks both there:
if (Call.hasFnAttr(Attribute::AlwaysInline)) ... ... if (Caller->hasOptNone())