[all-commits] [llvm/llvm-project] ca4a55: [mlir] NFC: put C++ code emission classes in their...

Lei Zhang via All-commits all-commits at lists.llvm.org
Fri Jan 10 15:45:01 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ca4a55fabbbebef1752fd4e2913c28bb8b510621
      https://github.com/llvm/llvm-project/commit/ca4a55fabbbebef1752fd4e2913c28bb8b510621
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-01-10 (Fri, 10 Jan 2020)

  Changed paths:
    A mlir/include/mlir/TableGen/OpClass.h
    M mlir/lib/TableGen/CMakeLists.txt
    A mlir/lib/TableGen/OpClass.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir] NFC: put C++ code emission classes in their own files

This exposes thse classes so that they can be used in interfaces.

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


  Commit: 397215cc309df1171a198b11cab3b241db9441db
      https://github.com/llvm/llvm-project/commit/397215cc309df1171a198b11cab3b241db9441db
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-01-10 (Fri, 10 Jan 2020)

  Changed paths:
    A mlir/include/mlir/TableGen/ODSDialectHook.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir][ods] Support dialect specific content emission via hooks

Thus far we can only generate the same set of methods even for
operations in different dialects. This is problematic for dialects that
want to generate additional operation class methods programmatically,
e.g., a special builder method or attribute getter method. Apparently
we cannot update the OpDefinitionsGen backend every time when such
a need arises. So this CL introduces a hook into the OpDefinitionsGen
backend to allow dialects to emit additional methods and traits to
operation classes.

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


Compare: https://github.com/llvm/llvm-project/compare/064087581ab9...397215cc309d


More information about the All-commits mailing list