[all-commits] [llvm/llvm-project] 6b476e: [mlir] Add support for parsing optional Attribute ...

River Riddle via All-commits all-commits at lists.llvm.org
Tue Jul 14 13:21:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b476e2426e9cfa442dac5deed2ceae890513f18
      https://github.com/llvm/llvm-project/commit/6b476e2426e9cfa442dac5deed2ceae890513f18
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M mlir/docs/OpDefinitions.md
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Parser/AttributeParser.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Parser/Parser.h
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/mlir-tblgen/op-format-spec.td
    M mlir/test/mlir-tblgen/op-format.mlir
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [mlir] Add support for parsing optional Attribute values.

This adds a `parseOptionalAttribute` method to the OpAsmParser that allows for parsing optional attributes, in a similar fashion to how optional types are parsed. This also enables the use of attribute values as the first element of an assembly format optional group.

Differential Revision: https://reviews.llvm.org/D83712




More information about the All-commits mailing list