[llvm] [AArch64] Dont inline streaming fn into non-streaming caller (PR #150595)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 09:40:54 PDT 2025
================
@@ -270,6 +270,13 @@ bool AArch64TTIImpl::areInlineCompatible(const Function *Caller,
const Function *Callee) const {
SMECallAttrs CallAttrs(*Caller, *Callee);
+ // Never inline a function explicitly marked as being streaming,
+ // into a non-streaming function. Assume it was marked as streaming
+ // for a reason.
+ if (CallAttrs.caller().hasNonStreamingInterfaceAndBody() &&
+ CallAttrs.callee().hasStreamingInterfaceOrBody())
----------------
MacDue wrote:
This is specifically allowed (in a limited cases) in https://github.com/llvm/llvm-project/pull/68415 as an optimization (though come to think of it, there are cases where doing this could result in worse code, e.g., if the inlined call contains many calls that result in streaming mode changes).
https://github.com/llvm/llvm-project/pull/150595
More information about the llvm-commits
mailing list