[llvm] [AArch64] Dont inline streaming fn into non-streaming caller (PR #150595)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 06:04:50 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())
+ return false;
+
// When inlining, we should consider the body of the function, not the
// interface.
if (CallAttrs.callee().hasStreamingBody()) {
----------------
sdesmalen-arm wrote:
The code below interprets the callee's interface as 'streaming' if it has a 'streaming body' (but not a streaming interface), but that's only to make it easier to query if there will be a streaming mode change.
The check above checks both the callee's interface _and_ body, so it's safe to exit from the function early.
https://github.com/llvm/llvm-project/pull/150595
More information about the llvm-commits
mailing list