forked from OSchip/llvm-project
Split test-specific passes out of mlir-opt
Instead put their impl in test/lib and link them into mlir-test-opt PiperOrigin-RevId: 254837439
This commit is contained in:
parent
6192978bc0
commit
dac75ae5ff
|
@ -16,8 +16,6 @@ add_llvm_library(MLIRTransforms
|
|||
PipelineDataTransfer.cpp
|
||||
SimplifyAffineStructures.cpp
|
||||
StripDebugInfo.cpp
|
||||
TestConstantFold.cpp
|
||||
TestLoopFusion.cpp
|
||||
Utils/FoldUtils.cpp
|
||||
Utils/GreedyPatternRewriteDriver.cpp
|
||||
Utils/LoopFusionUtils.cpp
|
||||
|
@ -26,7 +24,6 @@ add_llvm_library(MLIRTransforms
|
|||
Utils/Utils.cpp
|
||||
Vectorization
|
||||
Vectorize.cpp
|
||||
Vectorization/VectorizerTestPass.cpp
|
||||
ViewFunctionGraph.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
add_subdirectory(EDSC)
|
||||
add_subdirectory(mlir-cpu-runner)
|
||||
add_subdirectory(SDBM)
|
||||
add_subdirectory(TestDialect)
|
||||
add_subdirectory(lib)
|
||||
|
||||
llvm_canonicalize_cmake_booleans(
|
||||
LLVM_BUILD_EXAMPLES
|
||||
|
@ -32,7 +32,6 @@ set(MLIR_TEST_DEPENDS
|
|||
mlir-opt
|
||||
mlir-sdbm-api-test
|
||||
mlir-tblgen
|
||||
mlir-test-opt
|
||||
mlir-translate
|
||||
cblas
|
||||
cblas_interface
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Test TypeArrayAttr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Test mixed normal and variadic operands
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Test the number of regions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Test mixed normal and variadic results
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
// CHECK: succeededSameOperandAndResultElementType
|
||||
func @succeededSameOperandAndResultElementType(%t10x10 : tensor<10x10xf32>, %t1: tensor<1xf32>, %v1: vector<1xf32>, %t1i: tensor<1xi32>) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt -test-legalize-patterns -split-input-file -verify-diagnostics %s | FileCheck %s --dump-input=fail
|
||||
// RUN: mlir-opt -test-legalize-patterns -split-input-file -verify-diagnostics %s | FileCheck %s --dump-input=fail
|
||||
|
||||
// CHECK-LABEL: verifyDirectPattern
|
||||
func @verifyDirectPattern() -> i32 {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
add_subdirectory(TestDialect)
|
||||
add_subdirectory(Transforms)
|
|
@ -15,25 +15,10 @@ add_llvm_library(MLIRTestDialect
|
|||
)
|
||||
add_dependencies(MLIRTestDialect
|
||||
MLIRTestOpsIncGen
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(MLIRTestDialect
|
||||
LLVMSupport
|
||||
)
|
||||
|
||||
add_llvm_executable(mlir-test-opt
|
||||
${MLIR_MAIN_SRC_DIR}/../tools/mlir-opt/mlir-opt.cpp
|
||||
TestDialect.cpp
|
||||
TestPatterns.cpp
|
||||
)
|
||||
llvm_update_compile_flags(mlir-test-opt)
|
||||
whole_archive_link(mlir-test-opt
|
||||
MLIRStandardOps
|
||||
)
|
||||
target_link_libraries(mlir-test-opt
|
||||
PRIVATE
|
||||
MLIRMlirOptLib
|
||||
MLIROptMain
|
||||
MLIRTypeUtilities
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(MLIRTestDialect
|
||||
MLIRTypeUtilities
|
||||
LLVMSupport
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
add_llvm_library(MLIRTestTransforms
|
||||
TestConstantFold.cpp
|
||||
TestLoopFusion.cpp
|
||||
TestVectorizationUtils.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||
)
|
||||
add_dependencies(MLIRTestTransforms MLIRStandardOpsIncGen)
|
||||
target_link_libraries(MLIRTestTransforms
|
||||
MLIRAffineOps
|
||||
MLIRAnalysis
|
||||
MLIRPass
|
||||
MLIRVectorOps
|
||||
)
|
|
@ -55,7 +55,6 @@ tool_dirs = [config.mlir_tools_dir, config.llvm_tools_dir]
|
|||
tools = [
|
||||
'mlir-opt',
|
||||
'mlir-tblgen',
|
||||
'mlir-test-opt',
|
||||
'mlir-translate',
|
||||
'mlir-edsc-builder-api-test',
|
||||
]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt -test-patterns -mlir-print-debuginfo %s | FileCheck %s
|
||||
// RUN: mlir-opt -test-patterns -mlir-print-debuginfo %s | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: verifyConstantAttr
|
||||
func @verifyConstantAttr(%arg0 : i32) -> i32 {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
||||
|
||||
// -----
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-test-opt -test-patterns %s | FileCheck %s
|
||||
// RUN: mlir-opt -test-patterns %s | FileCheck %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Test 'verifyUnusedValue'
|
||||
|
|
|
@ -35,6 +35,8 @@ set(LIBS
|
|||
MLIRStandardOps
|
||||
MLIRStandardToLLVM
|
||||
MLIRTransforms
|
||||
MLIRTestDialect
|
||||
MLIRTestTransforms
|
||||
MLIRSupport
|
||||
MLIRVectorOps
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue