[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 09:48:23 PST 2024


================
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor<StrictFPUpgradeVisitor> {
 };
 } // namespace
 
-void llvm::UpgradeFunctionAttributes(Function &F) {
+static void
+CopyModuleAttributeToFunction(Function &F, StringRef FnAttrName,
+                              StringRef ModAttrName,
+                              std::pair<StringRef, StringRef> Values) {
+  Module *M = F.getParent();
+  if (!M)
+    return;
----------------
nickdesaulniers wrote:

Consider making this an assertion unless you observed cases where this was false?  The call chain checks this already in `llvm::UpgradeFunctionAttributes`, so perhaps an assertion here in the callee is more appropriate, in case this function grows more callers in the future.

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


More information about the llvm-commits mailing list