[Mlir-commits] [mlir] [MLIR][LLVM] Add explicit target_cpu attribute to llvm.func (PR #78287)
Markus Böck
llvmlistbot at llvm.org
Tue Jan 16 07:03:52 PST 2024
================
@@ -1744,6 +1744,11 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
.value()));
}
+ if (llvm::Attribute attr = func->getFnAttribute("target-cpu");
+ attr.isStringAttribute()) {
+ funcOp.setTargetCpuAttr(StringAttr::get(context, attr.getValueAsString()));
+ }
----------------
zero9178 wrote:
```suggestion
attr.isStringAttribute())
funcOp.setTargetCpuAttr(StringAttr::get(context, attr.getValueAsString()));
```
ultra nit: not sure this wasn't done for the `if` below
https://github.com/llvm/llvm-project/pull/78287
More information about the Mlir-commits
mailing list