[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 05:51:33 PDT 2024


================
@@ -11145,7 +11148,24 @@ bool Sema::areMultiversionVariantFunctionsCompatible(
     FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo();
     FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo();
 
-    if (OldTypeInfo.getCC() != NewTypeInfo.getCC())
+    const auto *OldFPT = OldFD->getType()->getAs<FunctionProtoType>();
+    const auto *NewFPT = NewFD->getType()->getAs<FunctionProtoType>();
+
+    bool ArmStreamingCCMismatched = false;
+    // Locally streaming does not affect the calling convention.
+    if (OldFPT && NewFPT && !OldFD->hasAttr<ArmLocallyStreamingAttr>() &&
+        !NewFD->hasAttr<ArmLocallyStreamingAttr>()) {
----------------
labrinea wrote:

Because arm_locally_streaming is compatible with everything else, therefore if one of the two declarations has it, then we should not check whether the other declaration has arm_streaming or arm_streaming_compatible.

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


More information about the cfe-commits mailing list