[Mlir-commits] [mlir] 146192a - [MLIR] Normalize usage of intrinsics_gen

Stephen Neuendorffer llvmlistbot at llvm.org
Mon May 4 20:48:35 PDT 2020


Author: Stephen Neuendorffer
Date: 2020-05-04T20:47:57-07:00
New Revision: 146192ade44072c784ce7eb67ec6db9aa8fe653b

URL: https://github.com/llvm/llvm-project/commit/146192ade44072c784ce7eb67ec6db9aa8fe653b
DIFF: https://github.com/llvm/llvm-project/commit/146192ade44072c784ce7eb67ec6db9aa8fe653b.diff

LOG: [MLIR] Normalize usage of intrinsics_gen

Portions of MLIR which depend on LLVMIR generally need to depend on
intrinsics_gen, to ensure that tablegen'd header files from LLVM are built
first.  Without this, we get errors, typically about llvm/IR/Attributes.inc
not being found.

Note that previously the Linalg Dialect depended on intrinsics_gen, but it
doesn't need to, since it doesn't use LLVMIR.

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

Added: 
    

Modified: 
    mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
    mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
    mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
    mlir/lib/ExecutionEngine/CMakeLists.txt
    mlir/lib/Support/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt b/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
index a4c98e555322..a64280e9ded9 100644
--- a/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
+++ b/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
@@ -20,6 +20,7 @@ add_mlir_conversion_library(MLIRGPUtoCUDATransforms
 
   DEPENDS
   MLIRConversionPassIncGen
+  intrinsics_gen
 )
 target_link_libraries(MLIRGPUtoCUDATransforms
   PUBLIC

diff  --git a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
index 9fd15670382b..aa2dd990de4c 100644
--- a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
@@ -6,7 +6,8 @@ add_mlir_conversion_library(MLIRLinalgToLLVM
 
   DEPENDS
   MLIRConversionPassIncGen
-)
+  intrinsics_gen
+  )
 
 target_link_libraries(MLIRLinalgToLLVM
   PUBLIC

diff  --git a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
index ef7ad11d93ef..ba746f78b495 100644
--- a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
@@ -6,7 +6,8 @@ add_mlir_conversion_library(MLIRStandardToLLVM
 
   DEPENDS
   MLIRConversionPassIncGen
-)
+  intrinsics_gen
+  )
 target_link_libraries(
   MLIRStandardToLLVM
   PUBLIC

diff  --git a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
index 6d6b3b87c073..1f8abc5a9091 100644
--- a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
@@ -6,7 +6,8 @@ add_mlir_conversion_library(MLIRVectorToLLVM
 
   DEPENDS
   MLIRConversionPassIncGen
-)
+  intrinsics_gen
+  )
 
 target_link_libraries(MLIRVectorToLLVM
   PUBLIC

diff  --git a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
index bd1f25c9f355..1a30c94dc4e9 100644
--- a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
+++ b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
@@ -9,6 +9,7 @@ add_mlir_dialect_library(MLIRLLVMIR
   DEPENDS
   MLIRLLVMOpsIncGen
   MLIRLLVMConversionsIncGen
+  intrinsics_gen
   )
 target_link_libraries(MLIRLLVMIR
   PUBLIC
@@ -35,6 +36,7 @@ add_mlir_dialect_library(MLIRLLVMAVX512
   DEPENDS
   MLIRLLVMAVX512IncGen
   MLIRLLVMAVX512ConversionsIncGen
+  intrinsics_gen
   )
 target_link_libraries(MLIRLLVMAVX512
   PUBLIC
@@ -55,6 +57,7 @@ add_mlir_dialect_library(MLIRNVVMIR
   DEPENDS
   MLIRNVVMOpsIncGen
   MLIRNVVMConversionsIncGen
+  intrinsics_gen
   )
 target_link_libraries(MLIRNVVMIR
   PUBLIC
@@ -75,6 +78,7 @@ add_mlir_dialect_library(MLIRROCDLIR
   DEPENDS
   MLIRROCDLOpsIncGen
   MLIRROCDLConversionsIncGen
+  intrinsics_gen
   )
 target_link_libraries(MLIRROCDLIR
   PUBLIC

diff  --git a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
index acb2ab6d91d7..794648929f27 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
@@ -3,9 +3,6 @@ add_mlir_dialect_library(MLIRLinalgAnalysis
   
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-
-  DEPENDS
-  intrinsics_gen
   )
 
 target_link_libraries(MLIRLinalgAnalysis

diff  --git a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
index 8ec3c6dd7d22..d6f03f372965 100644
--- a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
@@ -3,9 +3,6 @@ add_mlir_dialect_library(MLIRLinalgEDSC
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-
-  DEPENDS
-  intrinsics_gen
   )
 
 target_link_libraries(MLIRLinalgEDSC

diff  --git a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
index e8a47a3d1f16..f088e4fdbc8e 100644
--- a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
@@ -6,7 +6,6 @@ add_mlir_dialect_library(MLIRLinalgOps
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
 
   DEPENDS
-  intrinsics_gen
   MLIRLinalgOpsIncGen
   MLIRLinalgStructuredOpsIncGen
   MLIRLinalgStructuredOpsInterfaceIncGen

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index c8464e277cbb..0d8c4938fbd0 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -11,7 +11,6 @@ add_mlir_dialect_library(MLIRLinalgTransforms
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
 
   DEPENDS
-  intrinsics_gen
   MLIRLinalgPassIncGen
   )
 target_link_libraries(MLIRLinalgTransforms

diff  --git a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
index 681a47d31271..544c8e6df46e 100644
--- a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
@@ -3,8 +3,6 @@ add_mlir_dialect_library(MLIRLinalgUtils
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-  DEPENDS
-  intrinsics_gen
   )
 
 target_link_libraries(MLIRLinalgUtils

diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index df3268a49d59..61509b35b71c 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -12,6 +12,9 @@ add_mlir_library(MLIRExecutionEngine
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/ExecutionEngine
+
+  DEPENDS
+  intrinsics_gen
   )
 target_link_libraries(MLIRExecutionEngine
   PUBLIC

diff  --git a/mlir/lib/Support/CMakeLists.txt b/mlir/lib/Support/CMakeLists.txt
index a21a8cc29e0f..193c7b41f599 100644
--- a/mlir/lib/Support/CMakeLists.txt
+++ b/mlir/lib/Support/CMakeLists.txt
@@ -35,6 +35,9 @@ target_link_libraries(MLIROptLib
 
 add_llvm_library(MLIRJitRunner
   JitRunner.cpp
+
+  DEPENDS
+  intrinsics_gen
 )
 target_link_libraries(MLIRJitRunner
   PUBLIC


        


More information about the Mlir-commits mailing list