Fix opt build failure.
authorJacques Pienaar <jpienaar@google.com>
Mon, 29 Apr 2019 23:12:15 +0000 (16:12 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:21:25 +0000 (08:21 -0700)
--

PiperOrigin-RevId: 245844236

mlir/lib/IR/MLIRContext.cpp
mlir/lib/LLVMIR/CMakeLists.txt
mlir/tools/mlir-opt/CMakeLists.txt

index 7b88414..cad3a28 100644 (file)
@@ -909,7 +909,8 @@ SDBMStripeExpr SDBMStripeExpr::get(SDBMPositiveExpr var,
                                    SDBMConstantExpr stripeFactor) {
   assert(var && "expected SDBM variable expression");
   assert(stripeFactor && "expected non-null stripe factor");
-  assert(stripeFactor.getValue() > 0 && "non-positive stripe factor");
+  if (stripeFactor.getValue() <= 0)
+    llvm::report_fatal_error("non-positive stripe factor");
 
   MLIRContextImpl &impl = var.getContext()->getImpl();
   auto key = std::make_tuple(var, stripeFactor);
index 4314543..edfdd5d 100644 (file)
@@ -7,3 +7,11 @@ add_llvm_library(MLIRLLVMIR
   )
 add_dependencies(MLIRLLVMIR MLIRLLVMOpsIncGen MLIRLLVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
 target_link_libraries(MLIRLLVMIR LLVMAsmParser LLVMCore LLVMSupport)
+add_llvm_library(MLIRNVVMIR
+  IR/NVVMDialect.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/LLVMIR
+  )
+add_dependencies(MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
+target_link_libraries(MLIRNVVMIR LLVMAsmParser LLVMCore LLVMSupport)
index 6a27f2f..6c92f26 100644 (file)
@@ -23,6 +23,7 @@ set(LIBS
   MLIRGPU
   MLIRLinalg
   MLIRLLVMIR
+  MLIRNVVMIR
   MLIRParser
   MLIRPass
   MLIRQuantization