[llvm] [llvm][AArch64] Autoupgrade function attributes from Module attributes. (PR #80640)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 11:43:38 PST 2024


================
@@ -5155,7 +5155,51 @@ struct StrictFPUpgradeVisitor : public InstVisitor<StrictFPUpgradeVisitor> {
 };
 } // namespace
 
-void llvm::UpgradeFunctionAttributes(Function &F) {
+// Check if the module attribute is present and not zero.
+static bool isModuleAttributeSet(const Module *M, const StringRef &ModAttr) {
+  if (const auto *Attr =
+          mdconst::extract_or_null<ConstantInt>(M->getModuleFlag(ModAttr)))
+    if (Attr->getZExtValue())
+      return true;
+  return false;
----------------
DanielKristofKiss wrote:

applied

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


More information about the llvm-commits mailing list