[ODS] Allow dialect to specify C++ namespaces
authorLei Zhang <antiagainst@google.com>
Mon, 20 May 2019 16:33:10 +0000 (09:33 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 20 May 2019 20:49:27 +0000 (13:49 -0700)
commit20e0cedfbd953d4879cbfa51e94630b1db61819d
tree72b36926a893db23d195f1ca5e7cce439eccdb2d
parentaabb44f66d5f3eb38a6e3018c69a1fc0c0ca20d9
[ODS] Allow dialect to specify C++ namespaces

    Previously we force the C++ namespaces to be `NS` if `SomeOp` is defined as
    `NS_SomeOp`. This is too rigid as it does not support nested namespaces
    well. This CL adds a "namespace" field into the Dialect class to allow
    flexible namespaces.

--

PiperOrigin-RevId: 249064981
18 files changed:
mlir/g3doc/OpDefinitions.md
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/LLVMIR/LLVMOpBase.td
mlir/include/mlir/LLVMIR/NVVMOps.td
mlir/include/mlir/StandardOps/Ops.td
mlir/include/mlir/TableGen/Dialect.h [new file with mode: 0644]
mlir/include/mlir/TableGen/Operator.h
mlir/lib/TableGen/CMakeLists.txt
mlir/lib/TableGen/Dialect.cpp [new file with mode: 0644]
mlir/lib/TableGen/Operator.cpp
mlir/test/mlir-tblgen/attr-enum.td
mlir/test/mlir-tblgen/dialect.td [new file with mode: 0644]
mlir/test/mlir-tblgen/directive-verifyUnusedValue.td
mlir/test/mlir-tblgen/op-decl.td
mlir/test/mlir-tblgen/pattern-NativeCodeCall.td
mlir/test/mlir-tblgen/pattern-bound-symbol.td
mlir/test/mlir-tblgen/pattern-multi-result-op.td
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp