[Mlir-commits] [mlir] [mlir][tblgen] Expose all of TableGen as library (PR #92709)
Maksim Levental
llvmlistbot at llvm.org
Sun May 19 16:06:58 PDT 2024
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/92709
I would like to expose/make available more (all?) of the tblgen utility code as a library. This will enable downstream projects/users to extend that code to implement such things as C API generation.
>From d75d60f51365972935d2f76a428510801ccfcaca Mon Sep 17 00:00:00 2001
From: makslevental <maksim.levental at gmail.com>
Date: Sun, 19 May 2024 17:57:55 -0500
Subject: [PATCH] [mlir][tblgen] Expose all as library
---
.../mlir/TableGen}/AttrOrTypeFormatGen.h | 0
.../mlir/TableGen}/DialectGenUtilities.h | 0
.../mlir/TableGen}/DocGenUtilities.h | 0
.../mlir/TableGen}/FormatGen.h | 0
.../mlir/TableGen}/OpClass.h | 0
.../mlir/TableGen}/OpFormatGen.h | 0
.../mlir/TableGen}/OpGenHelpers.h | 0
.../TableGen}/AttrOrTypeDefGen.cpp | 2 +-
.../TableGen}/AttrOrTypeFormatGen.cpp | 4 ++--
.../TableGen}/BytecodeDialectGen.cpp | 0
mlir/lib/TableGen/CMakeLists.txt | 24 ++++++++++++++++++-
.../TableGen}/DialectGen.cpp | 2 +-
.../TableGen}/DirectiveCommonGen.cpp | 0
.../TableGen}/EnumPythonBindingGen.cpp | 2 +-
.../mlir-tblgen => lib/TableGen}/EnumsGen.cpp | 2 +-
.../TableGen}/FormatGen.cpp | 2 +-
.../TableGen}/LLVMIRConversionGen.cpp | 0
.../TableGen}/LLVMIRIntrinsicGen.cpp | 0
.../mlir-tblgen => lib/TableGen}/OpClass.cpp | 2 +-
.../TableGen}/OpDefinitionsGen.cpp | 6 ++---
.../mlir-tblgen => lib/TableGen}/OpDocGen.cpp | 6 ++---
.../TableGen}/OpFormatGen.cpp | 6 ++---
.../TableGen}/OpGenHelpers.cpp | 2 +-
.../TableGen}/OpInterfacesGen.cpp | 2 +-
.../TableGen}/OpPythonBindingGen.cpp | 2 +-
.../TableGen}/PassCAPIGen.cpp | 0
.../TableGen}/PassDocGen.cpp | 2 +-
.../mlir-tblgen => lib/TableGen}/PassGen.cpp | 0
.../TableGen}/RewriterGen.cpp | 0
.../TableGen}/SPIRVUtilsGen.cpp | 0
mlir/lib/Tools/mlir-tblgen/CMakeLists.txt | 2 +-
mlir/tools/mlir-tblgen/CMakeLists.txt | 24 +------------------
32 files changed, 46 insertions(+), 46 deletions(-)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/AttrOrTypeFormatGen.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/DialectGenUtilities.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/DocGenUtilities.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/FormatGen.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/OpClass.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/OpFormatGen.h (100%)
rename mlir/{tools/mlir-tblgen => include/mlir/TableGen}/OpGenHelpers.h (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/AttrOrTypeDefGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/AttrOrTypeFormatGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/BytecodeDialectGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/DialectGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/DirectiveCommonGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/EnumPythonBindingGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/EnumsGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/FormatGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/LLVMIRConversionGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/LLVMIRIntrinsicGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpClass.cpp (97%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpDefinitionsGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpDocGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpFormatGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpGenHelpers.cpp (98%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpInterfacesGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/OpPythonBindingGen.cpp (99%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/PassCAPIGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/PassDocGen.cpp (98%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/PassGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/RewriterGen.cpp (100%)
rename mlir/{tools/mlir-tblgen => lib/TableGen}/SPIRVUtilsGen.cpp (100%)
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h b/mlir/include/mlir/TableGen/AttrOrTypeFormatGen.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h
rename to mlir/include/mlir/TableGen/AttrOrTypeFormatGen.h
diff --git a/mlir/tools/mlir-tblgen/DialectGenUtilities.h b/mlir/include/mlir/TableGen/DialectGenUtilities.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/DialectGenUtilities.h
rename to mlir/include/mlir/TableGen/DialectGenUtilities.h
diff --git a/mlir/tools/mlir-tblgen/DocGenUtilities.h b/mlir/include/mlir/TableGen/DocGenUtilities.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/DocGenUtilities.h
rename to mlir/include/mlir/TableGen/DocGenUtilities.h
diff --git a/mlir/tools/mlir-tblgen/FormatGen.h b/mlir/include/mlir/TableGen/FormatGen.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/FormatGen.h
rename to mlir/include/mlir/TableGen/FormatGen.h
diff --git a/mlir/tools/mlir-tblgen/OpClass.h b/mlir/include/mlir/TableGen/OpClass.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/OpClass.h
rename to mlir/include/mlir/TableGen/OpClass.h
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.h b/mlir/include/mlir/TableGen/OpFormatGen.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/OpFormatGen.h
rename to mlir/include/mlir/TableGen/OpFormatGen.h
diff --git a/mlir/tools/mlir-tblgen/OpGenHelpers.h b/mlir/include/mlir/TableGen/OpGenHelpers.h
similarity index 100%
rename from mlir/tools/mlir-tblgen/OpGenHelpers.h
rename to mlir/include/mlir/TableGen/OpGenHelpers.h
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp b/mlir/lib/TableGen/AttrOrTypeDefGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
rename to mlir/lib/TableGen/AttrOrTypeDefGen.cpp
index 55bc0714c20ec..4f792b2cfa076 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
+++ b/mlir/lib/TableGen/AttrOrTypeDefGen.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "AttrOrTypeFormatGen.h"
+#include "mlir/TableGen/AttrOrTypeFormatGen.h"
#include "mlir/TableGen/AttrOrTypeDef.h"
#include "mlir/TableGen/Class.h"
#include "mlir/TableGen/CodeGenHelpers.h"
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/lib/TableGen/AttrOrTypeFormatGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
rename to mlir/lib/TableGen/AttrOrTypeFormatGen.cpp
index abd1fbdaf8c64..bba237ddb47f1 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
+++ b/mlir/lib/TableGen/AttrOrTypeFormatGen.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "AttrOrTypeFormatGen.h"
-#include "FormatGen.h"
+#include "mlir/TableGen/AttrOrTypeFormatGen.h"
+#include "mlir/TableGen/FormatGen.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/TableGen/AttrOrTypeDef.h"
diff --git a/mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp b/mlir/lib/TableGen/BytecodeDialectGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp
rename to mlir/lib/TableGen/BytecodeDialectGen.cpp
diff --git a/mlir/lib/TableGen/CMakeLists.txt b/mlir/lib/TableGen/CMakeLists.txt
index 61e14feb6dc12..e7a3ec433c926 100644
--- a/mlir/lib/TableGen/CMakeLists.txt
+++ b/mlir/lib/TableGen/CMakeLists.txt
@@ -13,22 +13,44 @@
# this means that MLIRSupport (outside of header-only access) cannot be used.
llvm_add_library(MLIRTableGen STATIC
Argument.cpp
- Attribute.cpp
AttrOrTypeDef.cpp
+ AttrOrTypeDefGen.cpp
+ AttrOrTypeFormatGen.cpp
+ Attribute.cpp
Builder.cpp
+ BytecodeDialectGen.cpp
Class.cpp
CodeGenHelpers.cpp
Constraint.cpp
Dialect.cpp
+ DialectGen.cpp
+ DirectiveCommonGen.cpp
+ EnumPythonBindingGen.cpp
+ EnumsGen.cpp
Format.cpp
+ FormatGen.cpp
GenInfo.cpp
Interfaces.cpp
+ LLVMIRConversionGen.cpp
+ LLVMIRIntrinsicGen.cpp
+ OpClass.cpp
+ OpDefinitionsGen.cpp
+ OpDocGen.cpp
+ OpFormatGen.cpp
+ OpGenHelpers.cpp
+ OpInterfacesGen.cpp
+ OpPythonBindingGen.cpp
Operator.cpp
Pass.cpp
+ PassCAPIGen.cpp
+ PassDocGen.cpp
+ PassGen.cpp
Pattern.cpp
Predicate.cpp
Property.cpp
Region.cpp
+ RewriterGen.cpp
+ SPIRVUtilsGen.cpp
SideEffects.cpp
Successor.cpp
Trait.cpp
diff --git a/mlir/tools/mlir-tblgen/DialectGen.cpp b/mlir/lib/TableGen/DialectGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/DialectGen.cpp
rename to mlir/lib/TableGen/DialectGen.cpp
index 46e585a351a2b..8b4cdc52adc8a 100644
--- a/mlir/tools/mlir-tblgen/DialectGen.cpp
+++ b/mlir/lib/TableGen/DialectGen.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "DialectGenUtilities.h"
+#include "mlir/TableGen/DialectGenUtilities.h"
#include "mlir/TableGen/Class.h"
#include "mlir/TableGen/CodeGenHelpers.h"
#include "mlir/TableGen/Format.h"
diff --git a/mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp b/mlir/lib/TableGen/DirectiveCommonGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/DirectiveCommonGen.cpp
rename to mlir/lib/TableGen/DirectiveCommonGen.cpp
diff --git a/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp b/mlir/lib/TableGen/EnumPythonBindingGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp
rename to mlir/lib/TableGen/EnumPythonBindingGen.cpp
index f4ced0803772e..63f4ad6ccbdd1 100644
--- a/mlir/tools/mlir-tblgen/EnumPythonBindingGen.cpp
+++ b/mlir/lib/TableGen/EnumPythonBindingGen.cpp
@@ -10,7 +10,7 @@
// generate the corresponding Python binding classes.
//
//===----------------------------------------------------------------------===//
-#include "OpGenHelpers.h"
+#include "mlir/TableGen/OpGenHelpers.h"
#include "mlir/TableGen/AttrOrTypeDef.h"
#include "mlir/TableGen/Attribute.h"
diff --git a/mlir/tools/mlir-tblgen/EnumsGen.cpp b/mlir/lib/TableGen/EnumsGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/EnumsGen.cpp
rename to mlir/lib/TableGen/EnumsGen.cpp
index f1d7a233b66a9..85bd7e8c59e01 100644
--- a/mlir/tools/mlir-tblgen/EnumsGen.cpp
+++ b/mlir/lib/TableGen/EnumsGen.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "FormatGen.h"
+#include "mlir/TableGen/FormatGen.h"
#include "mlir/TableGen/Attribute.h"
#include "mlir/TableGen/Format.h"
#include "mlir/TableGen/GenInfo.h"
diff --git a/mlir/tools/mlir-tblgen/FormatGen.cpp b/mlir/lib/TableGen/FormatGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/FormatGen.cpp
rename to mlir/lib/TableGen/FormatGen.cpp
index 7540e584b8fac..417f7ff89187f 100644
--- a/mlir/tools/mlir-tblgen/FormatGen.cpp
+++ b/mlir/lib/TableGen/FormatGen.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "FormatGen.h"
+#include "mlir/TableGen/FormatGen.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/TableGen/Error.h"
diff --git a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/mlir/lib/TableGen/LLVMIRConversionGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
rename to mlir/lib/TableGen/LLVMIRConversionGen.cpp
diff --git a/mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp b/mlir/lib/TableGen/LLVMIRIntrinsicGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp
rename to mlir/lib/TableGen/LLVMIRIntrinsicGen.cpp
diff --git a/mlir/tools/mlir-tblgen/OpClass.cpp b/mlir/lib/TableGen/OpClass.cpp
similarity index 97%
rename from mlir/tools/mlir-tblgen/OpClass.cpp
rename to mlir/lib/TableGen/OpClass.cpp
index 60fa1833ce625..7d4529835cdb4 100644
--- a/mlir/tools/mlir-tblgen/OpClass.cpp
+++ b/mlir/lib/TableGen/OpClass.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "OpClass.h"
+#include "mlir/TableGen/OpClass.h"
using namespace mlir;
using namespace mlir::tblgen;
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/lib/TableGen/OpDefinitionsGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
rename to mlir/lib/TableGen/OpDefinitionsGen.cpp
index e013ccac5dd0f..a4e702f4b24ac 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/lib/TableGen/OpDefinitionsGen.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "OpClass.h"
-#include "OpFormatGen.h"
-#include "OpGenHelpers.h"
+#include "mlir/TableGen/OpClass.h"
+#include "mlir/TableGen/OpFormatGen.h"
+#include "mlir/TableGen/OpGenHelpers.h"
#include "mlir/TableGen/Argument.h"
#include "mlir/TableGen/Attribute.h"
#include "mlir/TableGen/Class.h"
diff --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/lib/TableGen/OpDocGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/OpDocGen.cpp
rename to mlir/lib/TableGen/OpDocGen.cpp
index 7cd2690ea8155..de77d0a3614ae 100644
--- a/mlir/tools/mlir-tblgen/OpDocGen.cpp
+++ b/mlir/lib/TableGen/OpDocGen.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "DialectGenUtilities.h"
-#include "DocGenUtilities.h"
-#include "OpGenHelpers.h"
+#include "mlir/TableGen/DialectGenUtilities.h"
+#include "mlir/TableGen/DocGenUtilities.h"
+#include "mlir/TableGen/OpGenHelpers.h"
#include "mlir/Support/IndentedOstream.h"
#include "mlir/TableGen/AttrOrTypeDef.h"
#include "mlir/TableGen/GenInfo.h"
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/lib/TableGen/OpFormatGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/OpFormatGen.cpp
rename to mlir/lib/TableGen/OpFormatGen.cpp
index f7cc0a292b8c5..4e157d4092d0e 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/lib/TableGen/OpFormatGen.cpp
@@ -6,9 +6,9 @@
//
//===----------------------------------------------------------------------===//
-#include "OpFormatGen.h"
-#include "FormatGen.h"
-#include "OpClass.h"
+#include "mlir/TableGen/OpFormatGen.h"
+#include "mlir/TableGen/FormatGen.h"
+#include "mlir/TableGen/OpClass.h"
#include "mlir/Support/LLVM.h"
#include "mlir/TableGen/Class.h"
#include "mlir/TableGen/Format.h"
diff --git a/mlir/tools/mlir-tblgen/OpGenHelpers.cpp b/mlir/lib/TableGen/OpGenHelpers.cpp
similarity index 98%
rename from mlir/tools/mlir-tblgen/OpGenHelpers.cpp
rename to mlir/lib/TableGen/OpGenHelpers.cpp
index c2a2423a24026..2dd4cd66b6b66 100644
--- a/mlir/tools/mlir-tblgen/OpGenHelpers.cpp
+++ b/mlir/lib/TableGen/OpGenHelpers.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "OpGenHelpers.h"
+#include "mlir/TableGen/OpGenHelpers.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormatVariadic.h"
diff --git a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp b/mlir/lib/TableGen/OpInterfacesGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
rename to mlir/lib/TableGen/OpInterfacesGen.cpp
index 2a7406f42f34b..a76fbbbbc7a8d 100644
--- a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
+++ b/mlir/lib/TableGen/OpInterfacesGen.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "DocGenUtilities.h"
+#include "mlir/TableGen/DocGenUtilities.h"
#include "mlir/TableGen/Format.h"
#include "mlir/TableGen/GenInfo.h"
#include "mlir/TableGen/Interfaces.h"
diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/lib/TableGen/OpPythonBindingGen.cpp
similarity index 99%
rename from mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
rename to mlir/lib/TableGen/OpPythonBindingGen.cpp
index 052020acdcb76..43389791a4069 100644
--- a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+++ b/mlir/lib/TableGen/OpPythonBindingGen.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "OpGenHelpers.h"
+#include "mlir/TableGen/OpGenHelpers.h"
#include "mlir/TableGen/GenInfo.h"
#include "mlir/TableGen/Operator.h"
diff --git a/mlir/tools/mlir-tblgen/PassCAPIGen.cpp b/mlir/lib/TableGen/PassCAPIGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/PassCAPIGen.cpp
rename to mlir/lib/TableGen/PassCAPIGen.cpp
diff --git a/mlir/tools/mlir-tblgen/PassDocGen.cpp b/mlir/lib/TableGen/PassDocGen.cpp
similarity index 98%
rename from mlir/tools/mlir-tblgen/PassDocGen.cpp
rename to mlir/lib/TableGen/PassDocGen.cpp
index 8febba1915625..ac63d2126b785 100644
--- a/mlir/tools/mlir-tblgen/PassDocGen.cpp
+++ b/mlir/lib/TableGen/PassDocGen.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "DocGenUtilities.h"
+#include "mlir/TableGen/DocGenUtilities.h"
#include "mlir/TableGen/GenInfo.h"
#include "mlir/TableGen/Pass.h"
#include "llvm/Support/FormatVariadic.h"
diff --git a/mlir/tools/mlir-tblgen/PassGen.cpp b/mlir/lib/TableGen/PassGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/PassGen.cpp
rename to mlir/lib/TableGen/PassGen.cpp
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/lib/TableGen/RewriterGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/RewriterGen.cpp
rename to mlir/lib/TableGen/RewriterGen.cpp
diff --git a/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp b/mlir/lib/TableGen/SPIRVUtilsGen.cpp
similarity index 100%
rename from mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
rename to mlir/lib/TableGen/SPIRVUtilsGen.cpp
diff --git a/mlir/lib/Tools/mlir-tblgen/CMakeLists.txt b/mlir/lib/Tools/mlir-tblgen/CMakeLists.txt
index ed0033ff6d7cb..dae3ff9b082d0 100644
--- a/mlir/lib/Tools/mlir-tblgen/CMakeLists.txt
+++ b/mlir/lib/Tools/mlir-tblgen/CMakeLists.txt
@@ -13,7 +13,7 @@ llvm_add_library(MLIRTblgenLib STATIC
LINK_LIBS PUBLIC
MLIRTableGen
- )
+)
mlir_check_all_link_libraries(MLIRTblgenLib)
diff --git a/mlir/tools/mlir-tblgen/CMakeLists.txt b/mlir/tools/mlir-tblgen/CMakeLists.txt
index f2c5e4b3f87af..b8512b912fb7b 100644
--- a/mlir/tools/mlir-tblgen/CMakeLists.txt
+++ b/mlir/tools/mlir-tblgen/CMakeLists.txt
@@ -8,30 +8,8 @@ set(LLVM_LINK_COMPONENTS
add_tablegen(mlir-tblgen MLIR
DESTINATION "${MLIR_TOOLS_INSTALL_DIR}"
EXPORT MLIR
- AttrOrTypeDefGen.cpp
- AttrOrTypeFormatGen.cpp
- BytecodeDialectGen.cpp
- DialectGen.cpp
- DirectiveCommonGen.cpp
- EnumsGen.cpp
- EnumPythonBindingGen.cpp
- FormatGen.cpp
- LLVMIRConversionGen.cpp
- LLVMIRIntrinsicGen.cpp
mlir-tblgen.cpp
- OpClass.cpp
- OpDefinitionsGen.cpp
- OpDocGen.cpp
- OpFormatGen.cpp
- OpGenHelpers.cpp
- OpInterfacesGen.cpp
- OpPythonBindingGen.cpp
- PassCAPIGen.cpp
- PassDocGen.cpp
- PassGen.cpp
- RewriterGen.cpp
- SPIRVUtilsGen.cpp
- )
+)
set_target_properties(mlir-tblgen PROPERTIES FOLDER "Tablegenning")
target_link_libraries(mlir-tblgen
More information about the Mlir-commits
mailing list