================ @@ -812,6 +819,24 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( + CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, + const FunctionDecl *Callee, const CallArgList &Args) const { + if (!Callee->hasAttr<AlwaysInlineAttr>()) + return; + + auto CalleeStreamingMode = Sema::getArmStreamingFnType(Callee); + auto CallerStreamingMode = Sema::getArmStreamingFnType(Caller); + + // The caller can inline the callee if their streaming modes match or the + // callee is streaming compatible + if (CalleeStreamingMode != CallerStreamingMode && ---------------- sdesmalen-arm wrote:
Can you use the llvm::AArch64::SMEAttrs class and reuse some of the same functionality as we have in `AArch64TTIImpl::areInlineCompatible` (ignoring the `hasPossibleIncompatibleOps` part). That way, we can also check for ZA, e.g. ``` __attribute__((always_inline)) __arm_new("za") void bar(void) { } void foo() { bar(); } ``` here `bar` cannot be inlined because that would require making `foo` `__arm_new("za")` as well. https://github.com/llvm/llvm-project/pull/77936 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits