[clang] [CIR][CodeGen][NFC] Share the Arm SME inlinability check (PR #223425)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 7 00:19:35 PDT 2026
================
@@ -0,0 +1,50 @@
+//===--- TargetUtils.cpp - Shared target-specific AST queries ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/CodeGenUtils/TargetUtils.h"
+#include "clang/AST/Attr.h"
+#include "clang/AST/Decl.h"
+
+namespace clang::CodeGenUtils {
+
+static bool isStreamingCompatible(const FunctionDecl *F) {
+ if (const auto *T = F->getType()->getAs<FunctionProtoType>())
+ return T->getAArch64SMEAttributes() &
+ FunctionType::SME_PStateSMCompatibleMask;
+ return false;
+}
+
+ArmSMEInlinability getArmSMEInlinability(const FunctionDecl *Caller,
----------------
xlauko wrote:
Yeah I have no strong opinion on either of splits, but now its just 2 target specific functions, so keeping it as is.
https://github.com/llvm/llvm-project/pull/223425
More information about the cfe-commits
mailing list