[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)
Alexis Perry-Holby via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 12 12:06:23 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()));
----------------
AlexisPerry wrote:
Thank you so much for this suggestion and for the pointers for how to do this kind of test. I was struggling to figure out the proper mechanism and you helped greatly. I have added two separate tests for tune-cpu instead of combining with the target-cpu ones because I think it's cleaner, but I am happy to combine if you prefer. Just let me know. Thanks again for your help!
https://github.com/llvm/llvm-project/pull/95043
More information about the cfe-commits
mailing list