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

Tobias Gysi llvmlistbot at llvm.org
Thu Sep 21 08:59:08 PDT 2023


================
@@ -2342,6 +2342,19 @@ ParseResult LLVMFuncOp::parse(OpAsmParser &parser, OperationState &result) {
   result.addAttribute(getFunctionTypeAttrName(result.name),
                       TypeAttr::get(type));
 
+  if (succeeded(parser.parseOptionalKeyword("vscale_range"))) {
----------------
gysit wrote:

@Leporacanthicus  one small thing I forgot to mention before is that you can also print the attribute as part of the attribute dictionary, similar to the alignment:
`
  llvm.func @align_func() attributes {alignment = 2 : i64} {
    llvm.return
  }
`
That way you can save the code for the custom parsing and printing!


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


More information about the Mlir-commits mailing list