[Mlir-commits] [mlir] [mlir][llvm] Add llvm.target_features features attribute (PR #71510)

Benjamin Maxwell llvmlistbot at llvm.org
Fri Dec 1 04:51:07 PST 2023


================
@@ -1694,6 +1695,11 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
         context, IntegerAttr::get(intTy, attr.getVScaleRangeMin()),
         IntegerAttr::get(intTy, attr.getVScaleRangeMax().value_or(0))));
   }
+  if (llvm::Attribute attr = func->getFnAttribute("target-features");
+      attr.isStringAttribute()) {
+    funcOp.setTargetFeaturesAttr(
+        LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString()));
----------------
MacDue wrote:

I think it's LLVM style to avoid extra nesting, so I'm going keep this :)

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


More information about the Mlir-commits mailing list