[all-commits] [llvm/llvm-project] 0ac21e: [mlir][IR] SingleBlockImplicitTerminator: Declare ...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Aug 30 06:27:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ac21e654f194a0f7c9f5afe42e11924c546f89e
      https://github.com/llvm/llvm-project/commit/0ac21e654f194a0f7c9f5afe42e11924c546f89e
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-08-30 (Wed, 30 Aug 2023)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/test/mlir-tblgen/gen-dialect-doc.td
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [mlir][IR] SingleBlockImplicitTerminator: Declare "inherited" trait in ODS instead of C++

`SingleBlockImplicitTerminator` is now a combination of two traits: `SingleBlock` and `SingleBlockImplicitTerminatorImpl` (the original `SingleBlockImplicitTerminator`).

This change makes it possible to check if the `SingleBlock` op trait is implemented. Until now, `Operation::hasTrait<OpTrait::SingleBlock>()` returned `false` for ops that implement `SingleBlockImplicitTerminator`.

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




More information about the All-commits mailing list