[flang-commits] [clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

Tobias Gysi via flang-commits flang-commits at lists.llvm.org
Wed Jun 12 12:32:58 PDT 2024


================
@@ -1796,6 +1797,10 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
       attr.isStringAttribute())
     funcOp.setTargetCpuAttr(StringAttr::get(context, attr.getValueAsString()));
 
+  if (llvm::Attribute attr = func->getFnAttribute("tune-cpu");
+      attr.isStringAttribute())
+    funcOp.setTuneCpuAttr(StringAttr::get(context, attr.getValueAsString()));
----------------
gysit wrote:

Nice!

Separate tests are fine.

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


More information about the flang-commits mailing list