diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -141,6 +141,11 @@ include_directories( "include") include_directories( ${MLIR_INCLUDE_DIR}) +# TODO: we shouldn't hardcode this here. It's not clear though if +# using target_include_directories is practical, in particular for +# all the TableGen targets. +include_directories( "core/include") +include_directories( ${CMAKE_CURRENT_BINARY_DIR}/core/include) # Adding tools/mlir-tblgen here as calling add_tablegen sets some variables like # MLIR_TABLEGEN_EXE in PARENT_SCOPE which gets lost if that folder is included @@ -148,7 +153,8 @@ add_subdirectory(tools/mlir-tblgen) add_subdirectory(tools/mlir-linalg-ods-gen) -add_subdirectory(include/mlir) +add_subdirectory(core) +add_subdirectory(include) add_subdirectory(lib) # C API needs all dialects for registration, but should be built before tests. add_subdirectory(lib/CAPI) @@ -183,30 +189,6 @@ endif() if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - install(DIRECTORY include/mlir include/mlir-c - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - COMPONENT mlir-headers - FILES_MATCHING - PATTERN "*.def" - PATTERN "*.h" - PATTERN "*.inc" - PATTERN "*.td" - PATTERN "LICENSE.TXT" - ) - - install(DIRECTORY ${MLIR_INCLUDE_DIR}/mlir ${MLIR_INCLUDE_DIR}/mlir-c - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - COMPONENT mlir-headers - FILES_MATCHING - PATTERN "*.def" - PATTERN "*.h" - PATTERN "*.gen" - PATTERN "*.inc" - PATTERN "*.td" - PATTERN "CMakeFiles" EXCLUDE - PATTERN "config.h" EXCLUDE - ) - if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-mlir-headers DEPENDS mlir-headers diff --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake --- a/mlir/cmake/modules/AddMLIR.cmake +++ b/mlir/cmake/modules/AddMLIR.cmake @@ -460,3 +460,33 @@ endforeach() endif() endfunction(mlir_check_all_link_libraries) + +function(add_mlir_current_dir_public_header_dir) + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + COMPONENT mlir-headers + FILES_MATCHING + PATTERN "*.def" + PATTERN "*.h" + PATTERN "*.inc" + PATTERN "*.td" + PATTERN "LICENSE.TXT" + PATTERN "CMakeFiles" EXCLUDE + PATTERN "config.h" EXCLUDE + ) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + COMPONENT mlir-headers + FILES_MATCHING + PATTERN "*.def" + PATTERN "*.h" + PATTERN "*.gen" + PATTERN "*.inc" + PATTERN "*.td" + PATTERN "CMakeFiles" EXCLUDE + PATTERN "config.h" EXCLUDE + ) + endif() +endfunction(add_mlir_current_dir_public_header_dir) \ No newline at end of file diff --git a/mlir/core/CMakeLists.txt b/mlir/core/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/mlir/core/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(Interfaces) +add_subdirectory(IR) +add_subdirectory(include) diff --git a/mlir/lib/IR/AffineExpr.cpp b/mlir/core/IR/AffineExpr.cpp rename from mlir/lib/IR/AffineExpr.cpp rename to mlir/core/IR/AffineExpr.cpp diff --git a/mlir/lib/IR/AffineExprDetail.h b/mlir/core/IR/AffineExprDetail.h rename from mlir/lib/IR/AffineExprDetail.h rename to mlir/core/IR/AffineExprDetail.h diff --git a/mlir/lib/IR/AffineMap.cpp b/mlir/core/IR/AffineMap.cpp rename from mlir/lib/IR/AffineMap.cpp rename to mlir/core/IR/AffineMap.cpp diff --git a/mlir/lib/IR/AffineMapDetail.h b/mlir/core/IR/AffineMapDetail.h rename from mlir/lib/IR/AffineMapDetail.h rename to mlir/core/IR/AffineMapDetail.h diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/core/IR/AsmPrinter.cpp rename from mlir/lib/IR/AsmPrinter.cpp rename to mlir/core/IR/AsmPrinter.cpp diff --git a/mlir/lib/IR/AttributeDetail.h b/mlir/core/IR/AttributeDetail.h rename from mlir/lib/IR/AttributeDetail.h rename to mlir/core/IR/AttributeDetail.h diff --git a/mlir/lib/IR/Attributes.cpp b/mlir/core/IR/Attributes.cpp rename from mlir/lib/IR/Attributes.cpp rename to mlir/core/IR/Attributes.cpp diff --git a/mlir/lib/IR/Block.cpp b/mlir/core/IR/Block.cpp rename from mlir/lib/IR/Block.cpp rename to mlir/core/IR/Block.cpp diff --git a/mlir/lib/IR/Builders.cpp b/mlir/core/IR/Builders.cpp rename from mlir/lib/IR/Builders.cpp rename to mlir/core/IR/Builders.cpp diff --git a/mlir/lib/IR/BuiltinAttributeInterfaces.cpp b/mlir/core/IR/BuiltinAttributeInterfaces.cpp rename from mlir/lib/IR/BuiltinAttributeInterfaces.cpp rename to mlir/core/IR/BuiltinAttributeInterfaces.cpp diff --git a/mlir/lib/IR/BuiltinAttributes.cpp b/mlir/core/IR/BuiltinAttributes.cpp rename from mlir/lib/IR/BuiltinAttributes.cpp rename to mlir/core/IR/BuiltinAttributes.cpp diff --git a/mlir/lib/IR/BuiltinDialect.cpp b/mlir/core/IR/BuiltinDialect.cpp rename from mlir/lib/IR/BuiltinDialect.cpp rename to mlir/core/IR/BuiltinDialect.cpp diff --git a/mlir/lib/IR/BuiltinTypeInterfaces.cpp b/mlir/core/IR/BuiltinTypeInterfaces.cpp rename from mlir/lib/IR/BuiltinTypeInterfaces.cpp rename to mlir/core/IR/BuiltinTypeInterfaces.cpp diff --git a/mlir/lib/IR/BuiltinTypes.cpp b/mlir/core/IR/BuiltinTypes.cpp rename from mlir/lib/IR/BuiltinTypes.cpp rename to mlir/core/IR/BuiltinTypes.cpp diff --git a/mlir/lib/IR/CMakeLists.txt b/mlir/core/IR/CMakeLists.txt rename from mlir/lib/IR/CMakeLists.txt rename to mlir/core/IR/CMakeLists.txt --- a/mlir/lib/IR/CMakeLists.txt +++ b/mlir/core/IR/CMakeLists.txt @@ -57,3 +57,6 @@ LINK_LIBS PUBLIC MLIRSupport ) +target_include_directories(MLIRIR PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../include/ +) diff --git a/mlir/lib/IR/Diagnostics.cpp b/mlir/core/IR/Diagnostics.cpp rename from mlir/lib/IR/Diagnostics.cpp rename to mlir/core/IR/Diagnostics.cpp diff --git a/mlir/lib/IR/Dialect.cpp b/mlir/core/IR/Dialect.cpp rename from mlir/lib/IR/Dialect.cpp rename to mlir/core/IR/Dialect.cpp diff --git a/mlir/lib/IR/Dominance.cpp b/mlir/core/IR/Dominance.cpp rename from mlir/lib/IR/Dominance.cpp rename to mlir/core/IR/Dominance.cpp diff --git a/mlir/lib/IR/FunctionImplementation.cpp b/mlir/core/IR/FunctionImplementation.cpp rename from mlir/lib/IR/FunctionImplementation.cpp rename to mlir/core/IR/FunctionImplementation.cpp diff --git a/mlir/lib/IR/FunctionInterfaces.cpp b/mlir/core/IR/FunctionInterfaces.cpp rename from mlir/lib/IR/FunctionInterfaces.cpp rename to mlir/core/IR/FunctionInterfaces.cpp diff --git a/mlir/lib/IR/IntegerSet.cpp b/mlir/core/IR/IntegerSet.cpp rename from mlir/lib/IR/IntegerSet.cpp rename to mlir/core/IR/IntegerSet.cpp diff --git a/mlir/lib/IR/IntegerSetDetail.h b/mlir/core/IR/IntegerSetDetail.h rename from mlir/lib/IR/IntegerSetDetail.h rename to mlir/core/IR/IntegerSetDetail.h diff --git a/mlir/lib/IR/Location.cpp b/mlir/core/IR/Location.cpp rename from mlir/lib/IR/Location.cpp rename to mlir/core/IR/Location.cpp diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/core/IR/MLIRContext.cpp rename from mlir/lib/IR/MLIRContext.cpp rename to mlir/core/IR/MLIRContext.cpp diff --git a/mlir/lib/IR/Operation.cpp b/mlir/core/IR/Operation.cpp rename from mlir/lib/IR/Operation.cpp rename to mlir/core/IR/Operation.cpp diff --git a/mlir/lib/IR/OperationSupport.cpp b/mlir/core/IR/OperationSupport.cpp rename from mlir/lib/IR/OperationSupport.cpp rename to mlir/core/IR/OperationSupport.cpp diff --git a/mlir/lib/IR/PatternMatch.cpp b/mlir/core/IR/PatternMatch.cpp rename from mlir/lib/IR/PatternMatch.cpp rename to mlir/core/IR/PatternMatch.cpp diff --git a/mlir/lib/IR/Region.cpp b/mlir/core/IR/Region.cpp rename from mlir/lib/IR/Region.cpp rename to mlir/core/IR/Region.cpp diff --git a/mlir/lib/IR/RegionKindInterface.cpp b/mlir/core/IR/RegionKindInterface.cpp rename from mlir/lib/IR/RegionKindInterface.cpp rename to mlir/core/IR/RegionKindInterface.cpp diff --git a/mlir/lib/IR/SubElementInterfaces.cpp b/mlir/core/IR/SubElementInterfaces.cpp rename from mlir/lib/IR/SubElementInterfaces.cpp rename to mlir/core/IR/SubElementInterfaces.cpp diff --git a/mlir/lib/IR/SymbolTable.cpp b/mlir/core/IR/SymbolTable.cpp rename from mlir/lib/IR/SymbolTable.cpp rename to mlir/core/IR/SymbolTable.cpp diff --git a/mlir/lib/IR/TensorEncoding.cpp b/mlir/core/IR/TensorEncoding.cpp rename from mlir/lib/IR/TensorEncoding.cpp rename to mlir/core/IR/TensorEncoding.cpp diff --git a/mlir/lib/IR/TypeDetail.h b/mlir/core/IR/TypeDetail.h rename from mlir/lib/IR/TypeDetail.h rename to mlir/core/IR/TypeDetail.h diff --git a/mlir/lib/IR/TypeRange.cpp b/mlir/core/IR/TypeRange.cpp rename from mlir/lib/IR/TypeRange.cpp rename to mlir/core/IR/TypeRange.cpp diff --git a/mlir/lib/IR/TypeUtilities.cpp b/mlir/core/IR/TypeUtilities.cpp rename from mlir/lib/IR/TypeUtilities.cpp rename to mlir/core/IR/TypeUtilities.cpp diff --git a/mlir/lib/IR/Types.cpp b/mlir/core/IR/Types.cpp rename from mlir/lib/IR/Types.cpp rename to mlir/core/IR/Types.cpp diff --git a/mlir/lib/IR/Value.cpp b/mlir/core/IR/Value.cpp rename from mlir/lib/IR/Value.cpp rename to mlir/core/IR/Value.cpp diff --git a/mlir/lib/IR/Verifier.cpp b/mlir/core/IR/Verifier.cpp rename from mlir/lib/IR/Verifier.cpp rename to mlir/core/IR/Verifier.cpp diff --git a/mlir/lib/IR/Visitors.cpp b/mlir/core/IR/Visitors.cpp rename from mlir/lib/IR/Visitors.cpp rename to mlir/core/IR/Visitors.cpp diff --git a/mlir/lib/Interfaces/CMakeLists.txt b/mlir/core/Interfaces/CMakeLists.txt rename from mlir/lib/Interfaces/CMakeLists.txt rename to mlir/core/Interfaces/CMakeLists.txt diff --git a/mlir/lib/Interfaces/CallInterfaces.cpp b/mlir/core/Interfaces/CallInterfaces.cpp rename from mlir/lib/Interfaces/CallInterfaces.cpp rename to mlir/core/Interfaces/CallInterfaces.cpp diff --git a/mlir/lib/Interfaces/CastInterfaces.cpp b/mlir/core/Interfaces/CastInterfaces.cpp rename from mlir/lib/Interfaces/CastInterfaces.cpp rename to mlir/core/Interfaces/CastInterfaces.cpp diff --git a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp b/mlir/core/Interfaces/ControlFlowInterfaces.cpp rename from mlir/lib/Interfaces/ControlFlowInterfaces.cpp rename to mlir/core/Interfaces/ControlFlowInterfaces.cpp diff --git a/mlir/lib/Interfaces/CopyOpInterface.cpp b/mlir/core/Interfaces/CopyOpInterface.cpp rename from mlir/lib/Interfaces/CopyOpInterface.cpp rename to mlir/core/Interfaces/CopyOpInterface.cpp diff --git a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp b/mlir/core/Interfaces/DataLayoutInterfaces.cpp rename from mlir/lib/Interfaces/DataLayoutInterfaces.cpp rename to mlir/core/Interfaces/DataLayoutInterfaces.cpp diff --git a/mlir/lib/Interfaces/DerivedAttributeOpInterface.cpp b/mlir/core/Interfaces/DerivedAttributeOpInterface.cpp rename from mlir/lib/Interfaces/DerivedAttributeOpInterface.cpp rename to mlir/core/Interfaces/DerivedAttributeOpInterface.cpp diff --git a/mlir/lib/Interfaces/InferTypeOpInterface.cpp b/mlir/core/Interfaces/InferTypeOpInterface.cpp rename from mlir/lib/Interfaces/InferTypeOpInterface.cpp rename to mlir/core/Interfaces/InferTypeOpInterface.cpp diff --git a/mlir/lib/Interfaces/LoopLikeInterface.cpp b/mlir/core/Interfaces/LoopLikeInterface.cpp rename from mlir/lib/Interfaces/LoopLikeInterface.cpp rename to mlir/core/Interfaces/LoopLikeInterface.cpp diff --git a/mlir/lib/Interfaces/SideEffectInterfaces.cpp b/mlir/core/Interfaces/SideEffectInterfaces.cpp rename from mlir/lib/Interfaces/SideEffectInterfaces.cpp rename to mlir/core/Interfaces/SideEffectInterfaces.cpp diff --git a/mlir/lib/Interfaces/TilingInterface.cpp b/mlir/core/Interfaces/TilingInterface.cpp rename from mlir/lib/Interfaces/TilingInterface.cpp rename to mlir/core/Interfaces/TilingInterface.cpp diff --git a/mlir/lib/Interfaces/VectorInterfaces.cpp b/mlir/core/Interfaces/VectorInterfaces.cpp rename from mlir/lib/Interfaces/VectorInterfaces.cpp rename to mlir/core/Interfaces/VectorInterfaces.cpp diff --git a/mlir/lib/Interfaces/ViewLikeInterface.cpp b/mlir/core/Interfaces/ViewLikeInterface.cpp rename from mlir/lib/Interfaces/ViewLikeInterface.cpp rename to mlir/core/Interfaces/ViewLikeInterface.cpp diff --git a/mlir/core/include/CMakeLists.txt b/mlir/core/include/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/mlir/core/include/CMakeLists.txt @@ -0,0 +1,3 @@ +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +add_subdirectory(mlir) diff --git a/mlir/core/include/mlir/CMakeLists.txt b/mlir/core/include/mlir/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/mlir/core/include/mlir/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(IR) +add_subdirectory(Interfaces) +add_mlir_current_dir_public_header_dir() diff --git a/mlir/include/mlir/IR/AffineExpr.h b/mlir/core/include/mlir/IR/AffineExpr.h rename from mlir/include/mlir/IR/AffineExpr.h rename to mlir/core/include/mlir/IR/AffineExpr.h diff --git a/mlir/include/mlir/IR/AffineExprVisitor.h b/mlir/core/include/mlir/IR/AffineExprVisitor.h rename from mlir/include/mlir/IR/AffineExprVisitor.h rename to mlir/core/include/mlir/IR/AffineExprVisitor.h diff --git a/mlir/include/mlir/IR/AffineMap.h b/mlir/core/include/mlir/IR/AffineMap.h rename from mlir/include/mlir/IR/AffineMap.h rename to mlir/core/include/mlir/IR/AffineMap.h diff --git a/mlir/include/mlir/IR/AsmState.h b/mlir/core/include/mlir/IR/AsmState.h rename from mlir/include/mlir/IR/AsmState.h rename to mlir/core/include/mlir/IR/AsmState.h diff --git a/mlir/include/mlir/IR/AttributeSupport.h b/mlir/core/include/mlir/IR/AttributeSupport.h rename from mlir/include/mlir/IR/AttributeSupport.h rename to mlir/core/include/mlir/IR/AttributeSupport.h diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/core/include/mlir/IR/Attributes.h rename from mlir/include/mlir/IR/Attributes.h rename to mlir/core/include/mlir/IR/Attributes.h diff --git a/mlir/include/mlir/IR/Block.h b/mlir/core/include/mlir/IR/Block.h rename from mlir/include/mlir/IR/Block.h rename to mlir/core/include/mlir/IR/Block.h diff --git a/mlir/include/mlir/IR/BlockAndValueMapping.h b/mlir/core/include/mlir/IR/BlockAndValueMapping.h rename from mlir/include/mlir/IR/BlockAndValueMapping.h rename to mlir/core/include/mlir/IR/BlockAndValueMapping.h diff --git a/mlir/include/mlir/IR/BlockSupport.h b/mlir/core/include/mlir/IR/BlockSupport.h rename from mlir/include/mlir/IR/BlockSupport.h rename to mlir/core/include/mlir/IR/BlockSupport.h diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/core/include/mlir/IR/Builders.h rename from mlir/include/mlir/IR/Builders.h rename to mlir/core/include/mlir/IR/Builders.h diff --git a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h b/mlir/core/include/mlir/IR/BuiltinAttributeInterfaces.h rename from mlir/include/mlir/IR/BuiltinAttributeInterfaces.h rename to mlir/core/include/mlir/IR/BuiltinAttributeInterfaces.h diff --git a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td b/mlir/core/include/mlir/IR/BuiltinAttributeInterfaces.td rename from mlir/include/mlir/IR/BuiltinAttributeInterfaces.td rename to mlir/core/include/mlir/IR/BuiltinAttributeInterfaces.td diff --git a/mlir/include/mlir/IR/BuiltinAttributes.h b/mlir/core/include/mlir/IR/BuiltinAttributes.h rename from mlir/include/mlir/IR/BuiltinAttributes.h rename to mlir/core/include/mlir/IR/BuiltinAttributes.h diff --git a/mlir/include/mlir/IR/BuiltinAttributes.td b/mlir/core/include/mlir/IR/BuiltinAttributes.td rename from mlir/include/mlir/IR/BuiltinAttributes.td rename to mlir/core/include/mlir/IR/BuiltinAttributes.td diff --git a/mlir/include/mlir/IR/BuiltinDialect.h b/mlir/core/include/mlir/IR/BuiltinDialect.h rename from mlir/include/mlir/IR/BuiltinDialect.h rename to mlir/core/include/mlir/IR/BuiltinDialect.h diff --git a/mlir/include/mlir/IR/BuiltinDialect.td b/mlir/core/include/mlir/IR/BuiltinDialect.td rename from mlir/include/mlir/IR/BuiltinDialect.td rename to mlir/core/include/mlir/IR/BuiltinDialect.td diff --git a/mlir/include/mlir/IR/BuiltinLocationAttributes.td b/mlir/core/include/mlir/IR/BuiltinLocationAttributes.td rename from mlir/include/mlir/IR/BuiltinLocationAttributes.td rename to mlir/core/include/mlir/IR/BuiltinLocationAttributes.td diff --git a/mlir/include/mlir/IR/BuiltinOps.h b/mlir/core/include/mlir/IR/BuiltinOps.h rename from mlir/include/mlir/IR/BuiltinOps.h rename to mlir/core/include/mlir/IR/BuiltinOps.h diff --git a/mlir/include/mlir/IR/BuiltinOps.td b/mlir/core/include/mlir/IR/BuiltinOps.td rename from mlir/include/mlir/IR/BuiltinOps.td rename to mlir/core/include/mlir/IR/BuiltinOps.td diff --git a/mlir/include/mlir/IR/BuiltinTypeInterfaces.td b/mlir/core/include/mlir/IR/BuiltinTypeInterfaces.td rename from mlir/include/mlir/IR/BuiltinTypeInterfaces.td rename to mlir/core/include/mlir/IR/BuiltinTypeInterfaces.td diff --git a/mlir/include/mlir/IR/BuiltinTypes.h b/mlir/core/include/mlir/IR/BuiltinTypes.h rename from mlir/include/mlir/IR/BuiltinTypes.h rename to mlir/core/include/mlir/IR/BuiltinTypes.h diff --git a/mlir/include/mlir/IR/BuiltinTypes.td b/mlir/core/include/mlir/IR/BuiltinTypes.td rename from mlir/include/mlir/IR/BuiltinTypes.td rename to mlir/core/include/mlir/IR/BuiltinTypes.td diff --git a/mlir/include/mlir/IR/CMakeLists.txt b/mlir/core/include/mlir/IR/CMakeLists.txt rename from mlir/include/mlir/IR/CMakeLists.txt rename to mlir/core/include/mlir/IR/CMakeLists.txt diff --git a/mlir/include/mlir/IR/Diagnostics.h b/mlir/core/include/mlir/IR/Diagnostics.h rename from mlir/include/mlir/IR/Diagnostics.h rename to mlir/core/include/mlir/IR/Diagnostics.h diff --git a/mlir/include/mlir/IR/Dialect.h b/mlir/core/include/mlir/IR/Dialect.h rename from mlir/include/mlir/IR/Dialect.h rename to mlir/core/include/mlir/IR/Dialect.h diff --git a/mlir/include/mlir/IR/DialectImplementation.h b/mlir/core/include/mlir/IR/DialectImplementation.h rename from mlir/include/mlir/IR/DialectImplementation.h rename to mlir/core/include/mlir/IR/DialectImplementation.h diff --git a/mlir/include/mlir/IR/DialectInterface.h b/mlir/core/include/mlir/IR/DialectInterface.h rename from mlir/include/mlir/IR/DialectInterface.h rename to mlir/core/include/mlir/IR/DialectInterface.h diff --git a/mlir/include/mlir/IR/Dominance.h b/mlir/core/include/mlir/IR/Dominance.h rename from mlir/include/mlir/IR/Dominance.h rename to mlir/core/include/mlir/IR/Dominance.h diff --git a/mlir/include/mlir/IR/EnumAttr.td b/mlir/core/include/mlir/IR/EnumAttr.td rename from mlir/include/mlir/IR/EnumAttr.td rename to mlir/core/include/mlir/IR/EnumAttr.td diff --git a/mlir/include/mlir/IR/FunctionImplementation.h b/mlir/core/include/mlir/IR/FunctionImplementation.h rename from mlir/include/mlir/IR/FunctionImplementation.h rename to mlir/core/include/mlir/IR/FunctionImplementation.h diff --git a/mlir/include/mlir/IR/FunctionInterfaces.h b/mlir/core/include/mlir/IR/FunctionInterfaces.h rename from mlir/include/mlir/IR/FunctionInterfaces.h rename to mlir/core/include/mlir/IR/FunctionInterfaces.h diff --git a/mlir/include/mlir/IR/FunctionInterfaces.td b/mlir/core/include/mlir/IR/FunctionInterfaces.td rename from mlir/include/mlir/IR/FunctionInterfaces.td rename to mlir/core/include/mlir/IR/FunctionInterfaces.td diff --git a/mlir/include/mlir/IR/ImplicitLocOpBuilder.h b/mlir/core/include/mlir/IR/ImplicitLocOpBuilder.h rename from mlir/include/mlir/IR/ImplicitLocOpBuilder.h rename to mlir/core/include/mlir/IR/ImplicitLocOpBuilder.h diff --git a/mlir/include/mlir/IR/IntegerSet.h b/mlir/core/include/mlir/IR/IntegerSet.h rename from mlir/include/mlir/IR/IntegerSet.h rename to mlir/core/include/mlir/IR/IntegerSet.h diff --git a/mlir/include/mlir/IR/Location.h b/mlir/core/include/mlir/IR/Location.h rename from mlir/include/mlir/IR/Location.h rename to mlir/core/include/mlir/IR/Location.h diff --git a/mlir/include/mlir/IR/MLIRContext.h b/mlir/core/include/mlir/IR/MLIRContext.h rename from mlir/include/mlir/IR/MLIRContext.h rename to mlir/core/include/mlir/IR/MLIRContext.h diff --git a/mlir/include/mlir/IR/Matchers.h b/mlir/core/include/mlir/IR/Matchers.h rename from mlir/include/mlir/IR/Matchers.h rename to mlir/core/include/mlir/IR/Matchers.h diff --git a/mlir/include/mlir/IR/OpAsmInterface.td b/mlir/core/include/mlir/IR/OpAsmInterface.td rename from mlir/include/mlir/IR/OpAsmInterface.td rename to mlir/core/include/mlir/IR/OpAsmInterface.td diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/core/include/mlir/IR/OpBase.td rename from mlir/include/mlir/IR/OpBase.td rename to mlir/core/include/mlir/IR/OpBase.td diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/core/include/mlir/IR/OpDefinition.h rename from mlir/include/mlir/IR/OpDefinition.h rename to mlir/core/include/mlir/IR/OpDefinition.h diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/core/include/mlir/IR/OpImplementation.h rename from mlir/include/mlir/IR/OpImplementation.h rename to mlir/core/include/mlir/IR/OpImplementation.h diff --git a/mlir/include/mlir/IR/Operation.h b/mlir/core/include/mlir/IR/Operation.h rename from mlir/include/mlir/IR/Operation.h rename to mlir/core/include/mlir/IR/Operation.h diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/core/include/mlir/IR/OperationSupport.h rename from mlir/include/mlir/IR/OperationSupport.h rename to mlir/core/include/mlir/IR/OperationSupport.h diff --git a/mlir/include/mlir/IR/OwningOpRef.h b/mlir/core/include/mlir/IR/OwningOpRef.h rename from mlir/include/mlir/IR/OwningOpRef.h rename to mlir/core/include/mlir/IR/OwningOpRef.h diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/core/include/mlir/IR/PatternMatch.h rename from mlir/include/mlir/IR/PatternMatch.h rename to mlir/core/include/mlir/IR/PatternMatch.h diff --git a/mlir/include/mlir/IR/Region.h b/mlir/core/include/mlir/IR/Region.h rename from mlir/include/mlir/IR/Region.h rename to mlir/core/include/mlir/IR/Region.h diff --git a/mlir/include/mlir/IR/RegionGraphTraits.h b/mlir/core/include/mlir/IR/RegionGraphTraits.h rename from mlir/include/mlir/IR/RegionGraphTraits.h rename to mlir/core/include/mlir/IR/RegionGraphTraits.h diff --git a/mlir/include/mlir/IR/RegionKindInterface.h b/mlir/core/include/mlir/IR/RegionKindInterface.h rename from mlir/include/mlir/IR/RegionKindInterface.h rename to mlir/core/include/mlir/IR/RegionKindInterface.h diff --git a/mlir/include/mlir/IR/RegionKindInterface.td b/mlir/core/include/mlir/IR/RegionKindInterface.td rename from mlir/include/mlir/IR/RegionKindInterface.td rename to mlir/core/include/mlir/IR/RegionKindInterface.td diff --git a/mlir/include/mlir/IR/StorageUniquerSupport.h b/mlir/core/include/mlir/IR/StorageUniquerSupport.h rename from mlir/include/mlir/IR/StorageUniquerSupport.h rename to mlir/core/include/mlir/IR/StorageUniquerSupport.h diff --git a/mlir/include/mlir/IR/SubElementInterfaces.h b/mlir/core/include/mlir/IR/SubElementInterfaces.h rename from mlir/include/mlir/IR/SubElementInterfaces.h rename to mlir/core/include/mlir/IR/SubElementInterfaces.h diff --git a/mlir/include/mlir/IR/SubElementInterfaces.td b/mlir/core/include/mlir/IR/SubElementInterfaces.td rename from mlir/include/mlir/IR/SubElementInterfaces.td rename to mlir/core/include/mlir/IR/SubElementInterfaces.td diff --git a/mlir/include/mlir/IR/SymbolInterfaces.td b/mlir/core/include/mlir/IR/SymbolInterfaces.td rename from mlir/include/mlir/IR/SymbolInterfaces.td rename to mlir/core/include/mlir/IR/SymbolInterfaces.td diff --git a/mlir/include/mlir/IR/SymbolTable.h b/mlir/core/include/mlir/IR/SymbolTable.h rename from mlir/include/mlir/IR/SymbolTable.h rename to mlir/core/include/mlir/IR/SymbolTable.h diff --git a/mlir/include/mlir/IR/TensorEncoding.h b/mlir/core/include/mlir/IR/TensorEncoding.h rename from mlir/include/mlir/IR/TensorEncoding.h rename to mlir/core/include/mlir/IR/TensorEncoding.h diff --git a/mlir/include/mlir/IR/TensorEncoding.td b/mlir/core/include/mlir/IR/TensorEncoding.td rename from mlir/include/mlir/IR/TensorEncoding.td rename to mlir/core/include/mlir/IR/TensorEncoding.td diff --git a/mlir/include/mlir/IR/Threading.h b/mlir/core/include/mlir/IR/Threading.h rename from mlir/include/mlir/IR/Threading.h rename to mlir/core/include/mlir/IR/Threading.h diff --git a/mlir/include/mlir/IR/TypeRange.h b/mlir/core/include/mlir/IR/TypeRange.h rename from mlir/include/mlir/IR/TypeRange.h rename to mlir/core/include/mlir/IR/TypeRange.h diff --git a/mlir/include/mlir/IR/TypeSupport.h b/mlir/core/include/mlir/IR/TypeSupport.h rename from mlir/include/mlir/IR/TypeSupport.h rename to mlir/core/include/mlir/IR/TypeSupport.h diff --git a/mlir/include/mlir/IR/TypeUtilities.h b/mlir/core/include/mlir/IR/TypeUtilities.h rename from mlir/include/mlir/IR/TypeUtilities.h rename to mlir/core/include/mlir/IR/TypeUtilities.h diff --git a/mlir/include/mlir/IR/Types.h b/mlir/core/include/mlir/IR/Types.h rename from mlir/include/mlir/IR/Types.h rename to mlir/core/include/mlir/IR/Types.h diff --git a/mlir/include/mlir/IR/UseDefLists.h b/mlir/core/include/mlir/IR/UseDefLists.h rename from mlir/include/mlir/IR/UseDefLists.h rename to mlir/core/include/mlir/IR/UseDefLists.h diff --git a/mlir/include/mlir/IR/Value.h b/mlir/core/include/mlir/IR/Value.h rename from mlir/include/mlir/IR/Value.h rename to mlir/core/include/mlir/IR/Value.h diff --git a/mlir/include/mlir/IR/Verifier.h b/mlir/core/include/mlir/IR/Verifier.h rename from mlir/include/mlir/IR/Verifier.h rename to mlir/core/include/mlir/IR/Verifier.h diff --git a/mlir/include/mlir/IR/Visitors.h b/mlir/core/include/mlir/IR/Visitors.h rename from mlir/include/mlir/IR/Visitors.h rename to mlir/core/include/mlir/IR/Visitors.h diff --git a/mlir/include/mlir/Interfaces/CMakeLists.txt b/mlir/core/include/mlir/Interfaces/CMakeLists.txt rename from mlir/include/mlir/Interfaces/CMakeLists.txt rename to mlir/core/include/mlir/Interfaces/CMakeLists.txt diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.h b/mlir/core/include/mlir/Interfaces/CallInterfaces.h rename from mlir/include/mlir/Interfaces/CallInterfaces.h rename to mlir/core/include/mlir/Interfaces/CallInterfaces.h diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.td b/mlir/core/include/mlir/Interfaces/CallInterfaces.td rename from mlir/include/mlir/Interfaces/CallInterfaces.td rename to mlir/core/include/mlir/Interfaces/CallInterfaces.td diff --git a/mlir/include/mlir/Interfaces/CastInterfaces.h b/mlir/core/include/mlir/Interfaces/CastInterfaces.h rename from mlir/include/mlir/Interfaces/CastInterfaces.h rename to mlir/core/include/mlir/Interfaces/CastInterfaces.h diff --git a/mlir/include/mlir/Interfaces/CastInterfaces.td b/mlir/core/include/mlir/Interfaces/CastInterfaces.td rename from mlir/include/mlir/Interfaces/CastInterfaces.td rename to mlir/core/include/mlir/Interfaces/CastInterfaces.td diff --git a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h b/mlir/core/include/mlir/Interfaces/ControlFlowInterfaces.h rename from mlir/include/mlir/Interfaces/ControlFlowInterfaces.h rename to mlir/core/include/mlir/Interfaces/ControlFlowInterfaces.h diff --git a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.td b/mlir/core/include/mlir/Interfaces/ControlFlowInterfaces.td rename from mlir/include/mlir/Interfaces/ControlFlowInterfaces.td rename to mlir/core/include/mlir/Interfaces/ControlFlowInterfaces.td diff --git a/mlir/include/mlir/Interfaces/CopyOpInterface.h b/mlir/core/include/mlir/Interfaces/CopyOpInterface.h rename from mlir/include/mlir/Interfaces/CopyOpInterface.h rename to mlir/core/include/mlir/Interfaces/CopyOpInterface.h diff --git a/mlir/include/mlir/Interfaces/CopyOpInterface.td b/mlir/core/include/mlir/Interfaces/CopyOpInterface.td rename from mlir/include/mlir/Interfaces/CopyOpInterface.td rename to mlir/core/include/mlir/Interfaces/CopyOpInterface.td diff --git a/mlir/include/mlir/Interfaces/DataLayoutInterfaces.h b/mlir/core/include/mlir/Interfaces/DataLayoutInterfaces.h rename from mlir/include/mlir/Interfaces/DataLayoutInterfaces.h rename to mlir/core/include/mlir/Interfaces/DataLayoutInterfaces.h diff --git a/mlir/include/mlir/Interfaces/DataLayoutInterfaces.td b/mlir/core/include/mlir/Interfaces/DataLayoutInterfaces.td rename from mlir/include/mlir/Interfaces/DataLayoutInterfaces.td rename to mlir/core/include/mlir/Interfaces/DataLayoutInterfaces.td diff --git a/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h b/mlir/core/include/mlir/Interfaces/DecodeAttributesInterfaces.h rename from mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h rename to mlir/core/include/mlir/Interfaces/DecodeAttributesInterfaces.h diff --git a/mlir/include/mlir/Interfaces/DerivedAttributeOpInterface.h b/mlir/core/include/mlir/Interfaces/DerivedAttributeOpInterface.h rename from mlir/include/mlir/Interfaces/DerivedAttributeOpInterface.h rename to mlir/core/include/mlir/Interfaces/DerivedAttributeOpInterface.h diff --git a/mlir/include/mlir/Interfaces/DerivedAttributeOpInterface.td b/mlir/core/include/mlir/Interfaces/DerivedAttributeOpInterface.td rename from mlir/include/mlir/Interfaces/DerivedAttributeOpInterface.td rename to mlir/core/include/mlir/Interfaces/DerivedAttributeOpInterface.td diff --git a/mlir/include/mlir/Interfaces/FoldInterfaces.h b/mlir/core/include/mlir/Interfaces/FoldInterfaces.h rename from mlir/include/mlir/Interfaces/FoldInterfaces.h rename to mlir/core/include/mlir/Interfaces/FoldInterfaces.h diff --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h b/mlir/core/include/mlir/Interfaces/InferTypeOpInterface.h rename from mlir/include/mlir/Interfaces/InferTypeOpInterface.h rename to mlir/core/include/mlir/Interfaces/InferTypeOpInterface.h diff --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.td b/mlir/core/include/mlir/Interfaces/InferTypeOpInterface.td rename from mlir/include/mlir/Interfaces/InferTypeOpInterface.td rename to mlir/core/include/mlir/Interfaces/InferTypeOpInterface.td diff --git a/mlir/include/mlir/Interfaces/LoopLikeInterface.h b/mlir/core/include/mlir/Interfaces/LoopLikeInterface.h rename from mlir/include/mlir/Interfaces/LoopLikeInterface.h rename to mlir/core/include/mlir/Interfaces/LoopLikeInterface.h diff --git a/mlir/include/mlir/Interfaces/LoopLikeInterface.td b/mlir/core/include/mlir/Interfaces/LoopLikeInterface.td rename from mlir/include/mlir/Interfaces/LoopLikeInterface.td rename to mlir/core/include/mlir/Interfaces/LoopLikeInterface.td diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaceBase.td b/mlir/core/include/mlir/Interfaces/SideEffectInterfaceBase.td rename from mlir/include/mlir/Interfaces/SideEffectInterfaceBase.td rename to mlir/core/include/mlir/Interfaces/SideEffectInterfaceBase.td diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h b/mlir/core/include/mlir/Interfaces/SideEffectInterfaces.h rename from mlir/include/mlir/Interfaces/SideEffectInterfaces.h rename to mlir/core/include/mlir/Interfaces/SideEffectInterfaces.h diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td b/mlir/core/include/mlir/Interfaces/SideEffectInterfaces.td rename from mlir/include/mlir/Interfaces/SideEffectInterfaces.td rename to mlir/core/include/mlir/Interfaces/SideEffectInterfaces.td diff --git a/mlir/include/mlir/Interfaces/TilingInterface.h b/mlir/core/include/mlir/Interfaces/TilingInterface.h rename from mlir/include/mlir/Interfaces/TilingInterface.h rename to mlir/core/include/mlir/Interfaces/TilingInterface.h diff --git a/mlir/include/mlir/Interfaces/TilingInterface.td b/mlir/core/include/mlir/Interfaces/TilingInterface.td rename from mlir/include/mlir/Interfaces/TilingInterface.td rename to mlir/core/include/mlir/Interfaces/TilingInterface.td diff --git a/mlir/include/mlir/Interfaces/VectorInterfaces.h b/mlir/core/include/mlir/Interfaces/VectorInterfaces.h rename from mlir/include/mlir/Interfaces/VectorInterfaces.h rename to mlir/core/include/mlir/Interfaces/VectorInterfaces.h diff --git a/mlir/include/mlir/Interfaces/VectorInterfaces.td b/mlir/core/include/mlir/Interfaces/VectorInterfaces.td rename from mlir/include/mlir/Interfaces/VectorInterfaces.td rename to mlir/core/include/mlir/Interfaces/VectorInterfaces.td diff --git a/mlir/include/mlir/Interfaces/ViewLikeInterface.h b/mlir/core/include/mlir/Interfaces/ViewLikeInterface.h rename from mlir/include/mlir/Interfaces/ViewLikeInterface.h rename to mlir/core/include/mlir/Interfaces/ViewLikeInterface.h diff --git a/mlir/include/mlir/Interfaces/ViewLikeInterface.td b/mlir/core/include/mlir/Interfaces/ViewLikeInterface.td rename from mlir/include/mlir/Interfaces/ViewLikeInterface.td rename to mlir/core/include/mlir/Interfaces/ViewLikeInterface.td diff --git a/mlir/include/CMakeLists.txt b/mlir/include/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/mlir/include/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(mlir) +add_subdirectory(mlir-c) diff --git a/mlir/include/mlir-c/CMakeLists.txt b/mlir/include/mlir-c/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/mlir/include/mlir-c/CMakeLists.txt @@ -0,0 +1 @@ +add_mlir_current_dir_public_header_dir() diff --git a/mlir/include/mlir/CMakeLists.txt b/mlir/include/mlir/CMakeLists.txt --- a/mlir/include/mlir/CMakeLists.txt +++ b/mlir/include/mlir/CMakeLists.txt @@ -1,6 +1,6 @@ +add_mlir_current_dir_public_header_dir() + add_subdirectory(Conversion) add_subdirectory(Dialect) -add_subdirectory(IR) -add_subdirectory(Interfaces) add_subdirectory(Reducer) add_subdirectory(Transforms) diff --git a/mlir/lib/CMakeLists.txt b/mlir/lib/CMakeLists.txt --- a/mlir/lib/CMakeLists.txt +++ b/mlir/lib/CMakeLists.txt @@ -4,8 +4,6 @@ add_subdirectory(Analysis) add_subdirectory(Conversion) add_subdirectory(Dialect) -add_subdirectory(IR) -add_subdirectory(Interfaces) add_subdirectory(Parser) add_subdirectory(Pass) add_subdirectory(Reducer) diff --git a/mlir/test/mlir-pdll/CodeGen/MLIR/expr.pdll b/mlir/test/mlir-pdll/CodeGen/MLIR/expr.pdll --- a/mlir/test/mlir-pdll/CodeGen/MLIR/expr.pdll +++ b/mlir/test/mlir-pdll/CodeGen/MLIR/expr.pdll @@ -1,4 +1,4 @@ -// RUN: mlir-pdll %s -I %S -I %S/../../../../include -split-input-file -x mlir | FileCheck %s +// RUN: mlir-pdll %s -I %S -I %S/../../../../core/include -split-input-file -x mlir | FileCheck %s //===----------------------------------------------------------------------===// // AttributeExpr diff --git a/mlir/test/mlir-pdll/Parser/expr-failure.pdll b/mlir/test/mlir-pdll/Parser/expr-failure.pdll --- a/mlir/test/mlir-pdll/Parser/expr-failure.pdll +++ b/mlir/test/mlir-pdll/Parser/expr-failure.pdll @@ -1,4 +1,4 @@ -// RUN: not mlir-pdll %s -I %S -I %S/../../../include -split-input-file 2>&1 | FileCheck %s +// RUN: not mlir-pdll %s -I %S -I %S/../../../core/include -split-input-file 2>&1 | FileCheck %s //===----------------------------------------------------------------------===// // Reference Expr diff --git a/mlir/test/mlir-pdll/Parser/expr.pdll b/mlir/test/mlir-pdll/Parser/expr.pdll --- a/mlir/test/mlir-pdll/Parser/expr.pdll +++ b/mlir/test/mlir-pdll/Parser/expr.pdll @@ -1,4 +1,4 @@ -// RUN: mlir-pdll %s -I %S -I %S/../../../include -split-input-file | FileCheck %s +// RUN: mlir-pdll %s -I %S -I %S/../../../core/include -split-input-file | FileCheck %s //===----------------------------------------------------------------------===// // AttrExpr diff --git a/mlir/test/mlir-pdll/Parser/include_td.pdll b/mlir/test/mlir-pdll/Parser/include_td.pdll --- a/mlir/test/mlir-pdll/Parser/include_td.pdll +++ b/mlir/test/mlir-pdll/Parser/include_td.pdll @@ -1,4 +1,4 @@ -// RUN: mlir-pdll %s -I %S -I %S/../../../include -dump-ods 2>&1 | FileCheck %s +// RUN: mlir-pdll %s -I %S -I %S/../../../core/include -dump-ods 2>&1 | FileCheck %s #include "include/ops.td" diff --git a/mlir/test/mlir-pdll/Parser/stmt-failure.pdll b/mlir/test/mlir-pdll/Parser/stmt-failure.pdll --- a/mlir/test/mlir-pdll/Parser/stmt-failure.pdll +++ b/mlir/test/mlir-pdll/Parser/stmt-failure.pdll @@ -1,4 +1,4 @@ -// RUN: not mlir-pdll %s -I %S -I %S/../../../include -split-input-file 2>&1 | FileCheck %s +// RUN: not mlir-pdll %s -I %S -I %S/../../../core/include -split-input-file 2>&1 | FileCheck %s // CHECK: expected top-level declaration, such as a `Pattern` 10 diff --git a/mlir/test/mlir-tblgen/attr-or-type-format-invalid.td b/mlir/test/mlir-tblgen/attr-or-type-format-invalid.td --- a/mlir/test/mlir-tblgen/attr-or-type-format-invalid.td +++ b/mlir/test/mlir-tblgen/attr-or-type-format-invalid.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../include -asmformat-error-is-fatal=false %s 2>&1 | FileCheck %s +// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../core/include -asmformat-error-is-fatal=false %s 2>&1 | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/attr-or-type-format.td b/mlir/test/mlir-tblgen/attr-or-type-format.td --- a/mlir/test/mlir-tblgen/attr-or-type-format.td +++ b/mlir/test/mlir-tblgen/attr-or-type-format.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../include %s | FileCheck %s --check-prefix=ATTR -// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../include %s | FileCheck %s --check-prefix=TYPE +// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=ATTR +// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=TYPE include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/attrdefs.td b/mlir/test/mlir-tblgen/attrdefs.td --- a/mlir/test/mlir-tblgen/attrdefs.td +++ b/mlir/test/mlir-tblgen/attrdefs.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-attrdef-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL -// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF +// RUN: mlir-tblgen -gen-attrdef-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=DECL +// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=DEF include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/constraint-unique.td b/mlir/test/mlir-tblgen/constraint-unique.td --- a/mlir/test/mlir-tblgen/constraint-unique.td +++ b/mlir/test/mlir-tblgen/constraint-unique.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/default-type-attr-print-parser.td b/mlir/test/mlir-tblgen/default-type-attr-print-parser.td --- a/mlir/test/mlir-tblgen/default-type-attr-print-parser.td +++ b/mlir/test/mlir-tblgen/default-type-attr-print-parser.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../include %s | FileCheck %s --check-prefix=ATTR -// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../include %s | FileCheck %s --check-prefix=TYPE +// RUN: mlir-tblgen -gen-attrdef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=ATTR +// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=TYPE include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/dialect.td b/mlir/test/mlir-tblgen/dialect.td --- a/mlir/test/mlir-tblgen/dialect.td +++ b/mlir/test/mlir-tblgen/dialect.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-op-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF +// RUN: mlir-tblgen -gen-op-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=DECL +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=DEF include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/expect-symbol.td b/mlir/test/mlir-tblgen/expect-symbol.td --- a/mlir/test/mlir-tblgen/expect-symbol.td +++ b/mlir/test/mlir-tblgen/expect-symbol.td @@ -1,4 +1,4 @@ -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include %s 2>&1 | FileCheck %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include %s 2>&1 | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/gen-dialect-doc.td b/mlir/test/mlir-tblgen/gen-dialect-doc.td --- a/mlir/test/mlir-tblgen/gen-dialect-doc.td +++ b/mlir/test/mlir-tblgen/gen-dialect-doc.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-dialect-doc -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-dialect-doc -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" include "mlir/Interfaces/SideEffectInterfaces.td" diff --git a/mlir/test/mlir-tblgen/llvm-intrinsics.td b/mlir/test/mlir-tblgen/llvm-intrinsics.td --- a/mlir/test/mlir-tblgen/llvm-intrinsics.td +++ b/mlir/test/mlir-tblgen/llvm-intrinsics.td @@ -84,7 +84,7 @@ // RUN: cat %S/../../../llvm/include/llvm/IR/Intrinsics.td \ // RUN: | grep -v "llvm/IR/Intrinsics" \ // RUN: | mlir-tblgen -gen-llvmir-intrinsics -I %S/../../../llvm/include/ --llvmir-intrinsics-filter=vastart \ -// RUN: | mlir-tblgen -gen-op-decls -I %S/../../include \ +// RUN: | mlir-tblgen -gen-op-decls -I %S/../../core/include -I %S/../../include \ // RUN: | FileCheck --check-prefix=ODS %s // ODS-LABEL: class vastart diff --git a/mlir/test/mlir-tblgen/op-attribute.td b/mlir/test/mlir-tblgen/op-attribute.td --- a/mlir/test/mlir-tblgen/op-attribute.td +++ b/mlir/test/mlir-tblgen/op-attribute.td @@ -1,6 +1,6 @@ -// RUN: mlir-tblgen -gen-op-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF -// RUN: mlir-tblgen -print-records -I %S/../../include %s | FileCheck %s --check-prefix=RECORD +// RUN: mlir-tblgen -gen-op-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=DECL +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=DEF +// RUN: mlir-tblgen -print-records -I %S/../../core/include %s | FileCheck %s --check-prefix=RECORD include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/op-decl-and-defs.td b/mlir/test/mlir-tblgen/op-decl-and-defs.td --- a/mlir/test/mlir-tblgen/op-decl-and-defs.td +++ b/mlir/test/mlir-tblgen/op-decl-and-defs.td @@ -1,8 +1,8 @@ -// RUN: mlir-tblgen -gen-op-decls -I %S/../../include %s | FileCheck %s -// RUN: mlir-tblgen -gen-op-decls -op-include-regex="test.a_op" -I %S/../../include %s | FileCheck %s --check-prefix=REDUCE_INC -// RUN: mlir-tblgen -gen-op-decls -op-exclude-regex="test.a_op" -I %S/../../include %s | FileCheck %s --check-prefix=REDUCE_EXC +// RUN: mlir-tblgen -gen-op-decls -I %S/../../core/include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-decls -op-include-regex="test.a_op" -I %S/../../core/include %s | FileCheck %s --check-prefix=REDUCE_INC +// RUN: mlir-tblgen -gen-op-decls -op-exclude-regex="test.a_op" -I %S/../../core/include %s | FileCheck %s --check-prefix=REDUCE_EXC -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEFS +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=DEFS include "mlir/IR/OpBase.td" include "mlir/Interfaces/InferTypeOpInterface.td" diff --git a/mlir/test/mlir-tblgen/op-error.td b/mlir/test/mlir-tblgen/op-error.td --- a/mlir/test/mlir-tblgen/op-error.td +++ b/mlir/test/mlir-tblgen/op-error.td @@ -1,16 +1,16 @@ -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR4 %s 2>&1 | FileCheck --check-prefix=ERROR4 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR5 %s 2>&1 | FileCheck --check-prefix=ERROR5 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR6 %s 2>&1 | FileCheck --check-prefix=ERROR6 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR7 %s 2>&1 | FileCheck --check-prefix=ERROR7 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR8 %s 2>&1 | FileCheck --check-prefix=ERROR8 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR9 %s 2>&1 | FileCheck --check-prefix=ERROR9 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR10 %s 2>&1 | FileCheck --check-prefix=ERROR10 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR11 %s 2>&1 | FileCheck --check-prefix=ERROR11 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR12 %s 2>&1 | FileCheck --check-prefix=ERROR12 %s -// RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR13 %s 2>&1 | FileCheck --check-prefix=ERROR13 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR4 %s 2>&1 | FileCheck --check-prefix=ERROR4 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR5 %s 2>&1 | FileCheck --check-prefix=ERROR5 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR6 %s 2>&1 | FileCheck --check-prefix=ERROR6 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR7 %s 2>&1 | FileCheck --check-prefix=ERROR7 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR8 %s 2>&1 | FileCheck --check-prefix=ERROR8 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR9 %s 2>&1 | FileCheck --check-prefix=ERROR9 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR10 %s 2>&1 | FileCheck --check-prefix=ERROR10 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR11 %s 2>&1 | FileCheck --check-prefix=ERROR11 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR12 %s 2>&1 | FileCheck --check-prefix=ERROR12 %s +// RUN: not mlir-tblgen -gen-op-decls -I %S/../../core/include -DERROR13 %s 2>&1 | FileCheck --check-prefix=ERROR13 %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/op-format-spec.td b/mlir/test/mlir-tblgen/op-format-spec.td --- a/mlir/test/mlir-tblgen/op-format-spec.td +++ b/mlir/test/mlir-tblgen/op-format-spec.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-decls -asmformat-error-is-fatal=false -I %S/../../include %s -o=%t 2>&1 | FileCheck %s +// RUN: mlir-tblgen -gen-op-decls -asmformat-error-is-fatal=false -I %S/../../core/include %s -o=%t 2>&1 | FileCheck %s // This file contains tests for the specification of the declarative op format. diff --git a/mlir/test/mlir-tblgen/op-interface.td b/mlir/test/mlir-tblgen/op-interface.td --- a/mlir/test/mlir-tblgen/op-interface.td +++ b/mlir/test/mlir-tblgen/op-interface.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-op-interface-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL -// RUN: mlir-tblgen -gen-op-decls -I %S/../../include %s | FileCheck %s --check-prefix=OP_DECL +// RUN: mlir-tblgen -gen-op-interface-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=DECL +// RUN: mlir-tblgen -gen-op-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=OP_DECL include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/op-operand.td b/mlir/test/mlir-tblgen/op-operand.td --- a/mlir/test/mlir-tblgen/op-operand.td +++ b/mlir/test/mlir-tblgen/op-operand.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/op-python-bindings.td b/mlir/test/mlir-tblgen/op-python-bindings.td --- a/mlir/test/mlir-tblgen/op-python-bindings.td +++ b/mlir/test/mlir-tblgen/op-python-bindings.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-python-op-bindings -bind-dialect=test -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-python-op-bindings -bind-dialect=test -I %S/../../core/include -I %S/../../include %s | FileCheck %s include "mlir/IR/OpBase.td" include "mlir/Interfaces/InferTypeOpInterface.td" diff --git a/mlir/test/mlir-tblgen/op-result.td b/mlir/test/mlir-tblgen/op-result.td --- a/mlir/test/mlir-tblgen/op-result.td +++ b/mlir/test/mlir-tblgen/op-result.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" include "mlir/Interfaces/InferTypeOpInterface.td" diff --git a/mlir/test/mlir-tblgen/op-side-effects.td b/mlir/test/mlir-tblgen/op-side-effects.td --- a/mlir/test/mlir-tblgen/op-side-effects.td +++ b/mlir/test/mlir-tblgen/op-side-effects.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s include "mlir/Interfaces/SideEffectInterfaces.td" diff --git a/mlir/test/mlir-tblgen/predicate.td b/mlir/test/mlir-tblgen/predicate.td --- a/mlir/test/mlir-tblgen/predicate.td +++ b/mlir/test/mlir-tblgen/predicate.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-op-defs -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-op-defs -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/rewriter-errors.td b/mlir/test/mlir-tblgen/rewriter-errors.td --- a/mlir/test/mlir-tblgen/rewriter-errors.td +++ b/mlir/test/mlir-tblgen/rewriter-errors.td @@ -1,10 +1,10 @@ -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR4 %s 2>&1 | FileCheck --check-prefix=ERROR4 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR5 %s 2>&1 | FileCheck --check-prefix=ERROR5 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR6 %s 2>&1 | FileCheck --check-prefix=ERROR6 %s -// RUN: not mlir-tblgen -gen-rewriters -I %S/../../include -DERROR7 %s 2>&1 | FileCheck --check-prefix=ERROR7 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR4 %s 2>&1 | FileCheck --check-prefix=ERROR4 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR5 %s 2>&1 | FileCheck --check-prefix=ERROR5 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR6 %s 2>&1 | FileCheck --check-prefix=ERROR6 %s +// RUN: not mlir-tblgen -gen-rewriters -I %S/../../core/include -DERROR7 %s 2>&1 | FileCheck --check-prefix=ERROR7 %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/rewriter-indexing.td b/mlir/test/mlir-tblgen/rewriter-indexing.td --- a/mlir/test/mlir-tblgen/rewriter-indexing.td +++ b/mlir/test/mlir-tblgen/rewriter-indexing.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-rewriters -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-rewriters -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/rewriter-static-matcher.td b/mlir/test/mlir-tblgen/rewriter-static-matcher.td --- a/mlir/test/mlir-tblgen/rewriter-static-matcher.td +++ b/mlir/test/mlir-tblgen/rewriter-static-matcher.td @@ -1,4 +1,4 @@ -// RUN: mlir-tblgen -gen-rewriters -I %S/../../include %s | FileCheck %s +// RUN: mlir-tblgen -gen-rewriters -I %S/../../core/include %s | FileCheck %s include "mlir/IR/OpBase.td" diff --git a/mlir/test/mlir-tblgen/typedefs.td b/mlir/test/mlir-tblgen/typedefs.td --- a/mlir/test/mlir-tblgen/typedefs.td +++ b/mlir/test/mlir-tblgen/typedefs.td @@ -1,5 +1,5 @@ -// RUN: mlir-tblgen -gen-typedef-decls -I %S/../../include %s | FileCheck %s --check-prefix=DECL -// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../include %s | FileCheck %s --check-prefix=DEF +// RUN: mlir-tblgen -gen-typedef-decls -I %S/../../core/include %s | FileCheck %s --check-prefix=DECL +// RUN: mlir-tblgen -gen-typedef-defs -I %S/../../core/include %s | FileCheck %s --check-prefix=DEF include "mlir/IR/OpBase.td"