[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 05:26:45 PST 2024


================
@@ -1143,30 +1146,63 @@ void AArch64TargetCodeGenInfo::checkFunctionABI(
   }
 }
 
-void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming(
-    CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller,
-    const FunctionDecl *Callee) const {
-  if (!Caller || !Callee || !Callee->hasAttr<AlwaysInlineAttr>())
-    return;
+enum class ArmSMEInlinability : uint8_t {
+  Ok = 0,
+  MismatchedStreamingCompatibility = 1 << 0,
+  IncompatibleStreamingModes = 1 << 1,
+  CalleeRequiresNewZA = 1 << 2,
----------------
sdesmalen-arm wrote:

I find the names quite confusing, could you change it to:
```suggestion
  ErrorIncompatibleStreamingModes = 1 << 0,
  WarnIncompatibleStreamingModes = 1 << 1,
  ErrorCalleeRequiresNewZA = 1 << 2,
```

If you add an additional `IncompatibleStreamingModes = 3,` you can test for the case where either is set.

https://github.com/llvm/llvm-project/pull/116391


More information about the cfe-commits mailing list