[llvm] [llvm][ARM][AArch64] Add attributes to synthetic functions. (PR #83153)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 14:25:44 PST 2024


================
@@ -378,6 +380,40 @@ Function *Function::createWithDefaultAttr(FunctionType *Ty,
   }
   if (M->getModuleFlag("function_return_thunk_extern"))
     B.addAttribute(Attribute::FnRetThunkExtern);
+
+  Triple T(M->getTargetTriple());
+
+  auto Profile = llvm::ARM::parseArchProfile(T.getArchName());
+  if ((T.isArmT32() && Profile == llvm::ARM::ProfileKind::M) || T.isAArch64()) {
----------------
DanielKristofKiss wrote:

That won't happen because the fronted won't add the flag, even it they present the backend won't do anything with them.

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


More information about the llvm-commits mailing list