Fix OSS build (Linux)
authorNicolas Vasilache <ntv@google.com>
Thu, 9 May 2019 19:08:13 +0000 (12:08 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 11 May 2019 02:26:10 +0000 (19:26 -0700)
--

PiperOrigin-RevId: 247472005

mlir/include/mlir/CMakeLists.txt
mlir/include/mlir/GPU/CMakeLists.txt [new file with mode: 0644]
mlir/lib/GPU/CMakeLists.txt
mlir/lib/IR/AsmPrinter.cpp

index 21a4b21..af16f85 100644 (file)
@@ -1,5 +1,6 @@
 add_subdirectory(EDSC)
 add_subdirectory(FxpMathOps)
+add_subdirectory(GPU)
 add_subdirectory(Linalg)
 add_subdirectory(LLVMIR)
 add_subdirectory(Quantization)
diff --git a/mlir/include/mlir/GPU/CMakeLists.txt b/mlir/include/mlir/GPU/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5ba59a1
--- /dev/null
@@ -0,0 +1,4 @@
+set(LLVM_TARGET_DEFINITIONS GPUOps.td)
+mlir_tablegen(GPUOps.h.inc -gen-op-decls)
+mlir_tablegen(GPUOps.cpp.inc -gen-op-defs)
+add_public_tablegen_target(MLIRGPUOpsIncGen)
index 36ed3c6..f3b62cf 100644 (file)
@@ -5,5 +5,5 @@ add_llvm_library(MLIRGPU
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/GPU
 )
-add_dependencies(MLIRGPU MLIRIR LLVMSupport)
+add_dependencies(MLIRGPU MLIRGPUOpsIncGen MLIRIR LLVMSupport)
 target_link_libraries(MLIRGPU MLIRIR LLVMSupport)
index 33dc0b7..4355919 100644 (file)
@@ -79,9 +79,10 @@ static llvm::cl::opt<bool>
                        llvm::cl::init(false), llvm::cl::Hidden);
 
 namespace {
+/// A special index constant used for non-kind attribute aliases.
+static constexpr int kNonAttrKindAlias = -1;
+
 class ModuleState {
-  /// A special index constant used for non-kind attribute aliases.
-  static constexpr int kNonAttrKindAlias = -1;
 
 public:
   /// This is the current context if it is knowable, otherwise this is null.