[all-commits] [llvm/llvm-project] 8205c1: Rework LLVM Dialect LoopOptions attribute

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Mar 9 11:50:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8205c1a90a4e0c8d4578eb83fcdf7baa9f276ac6
      https://github.com/llvm/llvm-project/commit/8205c1a90a4e0c8d4578eb83fcdf7baa9f276ac6
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  Rework LLVM Dialect LoopOptions attribute

Instead of storing an array of LoopOpt attributes, which were just
wrapping std::pair<enum, int> anyway, we can have an attribute storing
a sorted ArrayRef<std::pair<enum, int>> as a single unit. This improves
here the textual format and the general API. Note that we're limiting
the options to fit into an int64_t by design, but this isn't a new
constraint.

Building the LoopOptions attribute is likely worth a specific builder
for efficient reason, that'll be the subject of a future patch.

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


  Commit: 79f736c150c5a533f836727cb247a72f9ad96096
      https://github.com/llvm/llvm-project/commit/79f736c150c5a533f836727cb247a72f9ad96096
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
    M mlir/lib/Dialect/Async/IR/Async.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/PDL/IR/PDLTypes.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/PDL/invalid-types.mlir
    M mlir/test/lib/Dialect/Test/TestAttributes.cpp
    M mlir/test/lib/Dialect/Test/TestTypes.cpp
    M mlir/test/mlir-tblgen/attrdefs.td
    M mlir/test/mlir-tblgen/typedefs.td
    M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp

  Log Message:
  -----------
  Switch generatedTypeParser/generatedAttributeParser to return an OptionalParseResult

This allows the caller to distinguish between a parse error or an
unmatched keyword. It fixes the redundant error that was emitted by the
caller when the generated parser would fail.

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


Compare: https://github.com/llvm/llvm-project/compare/1f55fa0b99e0...79f736c150c5


More information about the All-commits mailing list