[Mlir-commits] [mlir] Add support for MLIR to llvm vscale attribute (PR #67012)

Mats Petersson llvmlistbot at llvm.org
Thu Sep 21 08:26:31 PDT 2023


================
@@ -1610,6 +1612,16 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
     funcOp.setArmStreaming(true);
   else if (func->hasFnAttribute("aarch64_pstate_sm_body"))
     funcOp.setArmLocallyStreaming(true);
+  llvm::Attribute attr = func->getFnAttribute(llvm::Attribute::VScaleRange);
+  if (attr.isValid()) {
+    MLIRContext *context = funcOp.getContext();
+    auto intTy = mlir::IntegerType::get(context, 32);
+    std::optional<unsigned> maxAttr = attr.getVScaleRangeMax();
+    unsigned maxVal = maxAttr ? *maxAttr : 0;
----------------
Leporacanthicus wrote:

Every now and again, you realize that "I've seen this before, I just forgot about it". 

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


More information about the Mlir-commits mailing list