forked from OSchip/llvm-project
[mlir][NFC] Move passes in test/lib/Transforms/ to a directory that mirrors what they test
test/lib/Transforms/ has bitrot and become somewhat of a dumping grounds for testing pretty much any part of the project. This revision cleans this up, and moves the files within to a directory that reflects what is actually being tested. Differential Revision: https://reviews.llvm.org/D102456
This commit is contained in:
parent
1dbfeb463b
commit
3fef2d26a3
|
@ -1,17 +1,20 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRTestAnalysis
|
||||
TestAliasAnalysis.cpp
|
||||
TestCallGraph.cpp
|
||||
TestLiveness.cpp
|
||||
TestMemRefBoundCheck.cpp
|
||||
TestMemRefDependenceCheck.cpp
|
||||
TestMemRefStrideCalculation.cpp
|
||||
TestNumberOfExecutions.cpp
|
||||
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||
|
||||
DEPENDS
|
||||
MLIRStandardOpsIncGen
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRAnalysis
|
||||
MLIRMemRef
|
||||
MLIRPass
|
||||
MLIRTestDialect
|
||||
)
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "mlir/Analysis/AffineStructures.h"
|
||||
#include "mlir/Analysis/Utils.h"
|
||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
|
@ -14,7 +14,6 @@
|
|||
#include "mlir/Analysis/AffineStructures.h"
|
||||
#include "mlir/Analysis/Utils.h"
|
||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
#include "llvm/Support/Debug.h"
|
|
@ -7,10 +7,8 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/BuiltinTypes.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
#include "mlir/Transforms/Passes.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
add_subdirectory(Analysis)
|
||||
add_subdirectory(Conversion)
|
||||
add_subdirectory(Dialect)
|
||||
add_subdirectory(IR)
|
||||
add_subdirectory(Pass)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(StandardToLLVM)
|
|
@ -0,0 +1,16 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRTestStandardToLLVM
|
||||
TestConvertCallOp.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRLLVMIR
|
||||
MLIRLLVMIRTransforms
|
||||
MLIRPass
|
||||
MLIRStandardToLLVM
|
||||
MLIRTestDialect
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../Dialect/Test)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../../Dialect/Test)
|
|
@ -2,6 +2,7 @@
|
|||
add_mlir_library(MLIRAffineTransformsTestPasses
|
||||
TestAffineDataCopy.cpp
|
||||
TestAffineLoopUnswitching.cpp
|
||||
TestAffineLoopParametricTiling.cpp
|
||||
TestLoopPermutation.cpp
|
||||
TestVectorizationUtils.cpp
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
add_subdirectory(Affine)
|
||||
add_subdirectory(DLTI)
|
||||
add_subdirectory(GPU)
|
||||
add_subdirectory(Linalg)
|
||||
add_subdirectory(Math)
|
||||
add_subdirectory(SCF)
|
||||
add_subdirectory(Shape)
|
||||
add_subdirectory(SPIRV)
|
||||
add_subdirectory(StandardOps)
|
||||
add_subdirectory(Test)
|
||||
add_subdirectory(Tosa)
|
||||
add_subdirectory(Vector)
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRDLTITestPasses
|
||||
TestDataLayoutQuery.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRDLTI
|
||||
MLIRPass
|
||||
MLIRTestDialect
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Test)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../Test)
|
|
@ -0,0 +1,24 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRGPUTestPasses
|
||||
TestConvertGPUKernelToCubin.cpp
|
||||
TestConvertGPUKernelToHsaco.cpp
|
||||
TestGpuMemoryPromotion.cpp
|
||||
TestGpuParallelLoopMapping.cpp
|
||||
TestGpuRewrite.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRGPU
|
||||
MLIRGPUToGPURuntimeTransforms
|
||||
MLIRLLVMToLLVMIRTranslation
|
||||
MLIRNVVMIR
|
||||
MLIRNVVMToLLVMIRTranslation
|
||||
MLIRPass
|
||||
MLIRROCDLIR
|
||||
MLIRROCDLToLLVMIRTranslation
|
||||
MLIRSCF
|
||||
MLIRStandard
|
||||
MLIRTransformUtils
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRLinalgTestPasses
|
||||
TestConvVectorization.cpp
|
||||
TestLinalgCodegenStrategy.cpp
|
||||
TestLinalgElementwiseFusion.cpp
|
||||
TestLinalgFusionTransforms.cpp
|
||||
TestLinalgHoisting.cpp
|
||||
TestLinalgTransforms.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRGPU
|
||||
MLIRLinalg
|
||||
MLIRLinalgTransforms
|
||||
MLIRLLVMToLLVMIRTranslation
|
||||
MLIRPass
|
||||
MLIRStandard
|
||||
MLIRTransformUtils
|
||||
MLIRVector
|
||||
MLIRVectorToSCF
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRMathTestPasses
|
||||
TestExpandTanh.cpp
|
||||
TestPolynomialApproximation.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRMathTransforms
|
||||
MLIRPass
|
||||
MLIRTransformUtils
|
||||
MLIRVector
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRSCFTestPasses
|
||||
TestSCFUtils.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRPass
|
||||
MLIRSCF
|
||||
MLIRSCFTransforms
|
||||
MLIRTransformUtils
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRStandardOpsTestPasses
|
||||
TestDecomposeCallGraphTypes.cpp
|
||||
TestComposeSubView.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRPass
|
||||
MLIRStandardOpsTransforms
|
||||
MLIRTestDialect
|
||||
MLIRTransformUtils
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Test)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../Test)
|
|
@ -0,0 +1,18 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRVectorTestPasses
|
||||
TestVectorTransforms.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRAnalysis
|
||||
MLIRLinalg
|
||||
MLIRMemRef
|
||||
MLIRPass
|
||||
MLIRSCF
|
||||
MLIRStandard
|
||||
MLIRTransformUtils
|
||||
MLIRVector
|
||||
MLIRVectorToSCF
|
||||
)
|
|
@ -1,8 +1,10 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRTestIR
|
||||
TestDominance.cpp
|
||||
TestFunc.cpp
|
||||
TestInterfaces.cpp
|
||||
TestMatchers.cpp
|
||||
TestOpaqueLoc.cpp
|
||||
TestPrintDefUse.cpp
|
||||
TestPrintNesting.cpp
|
||||
TestSideEffects.cpp
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRTestPass
|
||||
TestDynamicPipeline.cpp
|
||||
TestPassManager.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
|
|
@ -10,12 +10,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/SCF/SCF.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
#include "mlir/Pass/PassManager.h"
|
||||
#include "mlir/Transforms/LoopUtils.h"
|
||||
#include "mlir/Transforms/Passes.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
|
@ -1,75 +1,19 @@
|
|||
# Exclude tests from libMLIR.so
|
||||
add_mlir_library(MLIRTestTransforms
|
||||
TestAffineLoopParametricTiling.cpp
|
||||
TestExpandTanh.cpp
|
||||
TestCallGraph.cpp
|
||||
TestDecomposeCallGraphTypes.cpp
|
||||
TestConstantFold.cpp
|
||||
TestConvVectorization.cpp
|
||||
TestConvertCallOp.cpp
|
||||
TestConvertGPUKernelToCubin.cpp
|
||||
TestConvertGPUKernelToHsaco.cpp
|
||||
TestDataLayoutQuery.cpp
|
||||
TestDominance.cpp
|
||||
TestDynamicPipeline.cpp
|
||||
TestComposeSubView.cpp
|
||||
TestLoopFusion.cpp
|
||||
TestGpuMemoryPromotion.cpp
|
||||
TestGpuParallelLoopMapping.cpp
|
||||
TestGpuRewrite.cpp
|
||||
TestInlining.cpp
|
||||
TestLinalgCodegenStrategy.cpp
|
||||
TestLinalgElementwiseFusion.cpp
|
||||
TestLinalgFusionTransforms.cpp
|
||||
TestLinalgHoisting.cpp
|
||||
TestLinalgTransforms.cpp
|
||||
TestLiveness.cpp
|
||||
TestLoopFusion.cpp
|
||||
TestLoopMapping.cpp
|
||||
TestLoopParametricTiling.cpp
|
||||
TestLoopUnrolling.cpp
|
||||
TestNumberOfExecutions.cpp
|
||||
TestOpaqueLoc.cpp
|
||||
TestPolynomialApproximation.cpp
|
||||
TestMemRefBoundCheck.cpp
|
||||
TestMemRefDependenceCheck.cpp
|
||||
TestMemRefStrideCalculation.cpp
|
||||
TestSCFUtils.cpp
|
||||
TestVectorTransforms.cpp
|
||||
|
||||
EXCLUDE_FROM_LIBMLIR
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
||||
|
||||
DEPENDS
|
||||
MLIRStandardOpsIncGen
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRAnalysis
|
||||
MLIREDSC
|
||||
MLIRGPU
|
||||
MLIRGPU
|
||||
MLIRGPUToGPURuntimeTransforms
|
||||
MLIRLinalg
|
||||
MLIRLinalgTransforms
|
||||
MLIRLLVMToLLVMIRTranslation
|
||||
MLIRMathTransforms
|
||||
MLIRNVVMIR
|
||||
MLIRNVVMToLLVMIRTranslation
|
||||
MLIRPass
|
||||
MLIRROCDLIR
|
||||
MLIRROCDLToLLVMIRTranslation
|
||||
MLIRSCF
|
||||
MLIRSCFTransforms
|
||||
MLIRStandardOpsTransforms
|
||||
MLIRSparseTensor
|
||||
MLIRSparseTensorTransforms
|
||||
MLIRTargetLLVMIRExport
|
||||
MLIRTestDialect
|
||||
MLIRTransformUtils
|
||||
MLIRVector
|
||||
MLIRVectorToSCF
|
||||
MLIRTransforms
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Dialect/Test)
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/IR/BuiltinOps.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
#include "mlir/Transforms/FoldUtils.h"
|
||||
#include "mlir/Transforms/Passes.h"
|
||||
|
|
|
@ -12,9 +12,17 @@ set(LLVM_LINK_COMPONENTS
|
|||
|
||||
if(MLIR_INCLUDE_TESTS)
|
||||
set(test_libs
|
||||
MLIRTestStandardToLLVM
|
||||
MLIRAffineTransformsTestPasses
|
||||
MLIRDLTITestPasses
|
||||
MLIRGPUTestPasses
|
||||
MLIRLinalgTestPasses
|
||||
MLIRMathTestPasses
|
||||
MLIRSCFTestPasses
|
||||
MLIRShapeTestPasses
|
||||
MLIRSPIRVTestPasses
|
||||
MLIRStandardOpsTestPasses
|
||||
MLIRVectorTestPasses
|
||||
MLIRTestAnalysis
|
||||
MLIRTestDialect
|
||||
MLIRTestIR
|
||||
|
|
Loading…
Reference in New Issue