forked from OSchip/llvm-project
[mlir][NFC] Move the operation interfaces out of Analysis/ and into a new Interfaces/ directory.
The interfaces themselves aren't really analyses, they may be used by analyses though. Having them in Analysis can also create cyclic dependencies if an analysis depends on a specific dialect, that also provides one of the interfaces. Differential Revision: https://reviews.llvm.org/D75867
This commit is contained in:
parent
c8f0d27ef3
commit
7ce1e7ab07
|
@ -291,5 +291,5 @@ function, the reference implementation of the operation will be used to derive
|
|||
the shape function. The reference implementation is general and can support the
|
||||
arbitrary computations needed to specify output shapes.
|
||||
|
||||
[InferTypeOpInterface]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Analysis/InferTypeOpInterface.td
|
||||
[InferTypeOpInterface]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Interfaces/InferTypeOpInterface.td
|
||||
[ShapedType]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/IR/StandardTypes.h
|
||||
|
|
|
@ -108,7 +108,7 @@ To add this interface we just need to include the definition into our operation
|
|||
specification file (`Ops.td`):
|
||||
|
||||
```tablegen
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
```
|
||||
|
||||
and add it to the traits list of `GenericCallOp`:
|
||||
|
|
|
@ -20,7 +20,6 @@ add_toy_chapter(toyc-ch4
|
|||
ToyCh4OpsIncGen
|
||||
ToyCh4ShapeInferenceInterfaceIncGen
|
||||
ToyCh4CombineIncGen
|
||||
MLIRCallOpInterfacesIncGen
|
||||
)
|
||||
|
||||
include_directories(include/)
|
||||
|
@ -29,6 +28,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
|||
target_link_libraries(toyc-ch4
|
||||
PRIVATE
|
||||
MLIRAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRIR
|
||||
MLIRParser
|
||||
MLIRPass
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef TOY_OPS
|
||||
#define TOY_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "toy/ShapeInferenceInterface.td"
|
||||
|
||||
// Provide a definition of the 'toy' dialect in the ODS framework so that we
|
||||
|
|
|
@ -21,7 +21,6 @@ add_toy_chapter(toyc-ch5
|
|||
ToyCh5ShapeInferenceInterfaceIncGen
|
||||
ToyCh5OpsIncGen
|
||||
ToyCh5CombineIncGen
|
||||
MLIRCallOpInterfacesIncGen
|
||||
)
|
||||
|
||||
include_directories(include/)
|
||||
|
@ -32,6 +31,7 @@ target_link_libraries(toyc-ch5
|
|||
PRIVATE
|
||||
${dialect_libs}
|
||||
MLIRAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRIR
|
||||
MLIRParser
|
||||
MLIRPass
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef TOY_OPS
|
||||
#define TOY_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "toy/ShapeInferenceInterface.td"
|
||||
|
||||
// Provide a definition of the 'toy' dialect in the ODS framework so that we
|
||||
|
|
|
@ -23,7 +23,6 @@ add_toy_chapter(toyc-ch6
|
|||
ToyCh6ShapeInferenceInterfaceIncGen
|
||||
ToyCh6OpsIncGen
|
||||
ToyCh6CombineIncGen
|
||||
MLIRCallOpInterfacesIncGen
|
||||
)
|
||||
|
||||
include_directories(include/)
|
||||
|
@ -36,6 +35,7 @@ target_link_libraries(toyc-ch6
|
|||
${dialect_libs}
|
||||
${conversion_libs}
|
||||
MLIRAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRExecutionEngine
|
||||
MLIRIR
|
||||
MLIRLLVMIR
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef TOY_OPS
|
||||
#define TOY_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "toy/ShapeInferenceInterface.td"
|
||||
|
||||
// Provide a definition of the 'toy' dialect in the ODS framework so that we
|
||||
|
|
|
@ -23,7 +23,6 @@ add_toy_chapter(toyc-ch7
|
|||
ToyCh7ShapeInferenceInterfaceIncGen
|
||||
ToyCh7OpsIncGen
|
||||
ToyCh7CombineIncGen
|
||||
MLIRCallOpInterfacesIncGen
|
||||
)
|
||||
|
||||
include_directories(include/)
|
||||
|
@ -36,6 +35,7 @@ target_link_libraries(toyc-ch7
|
|||
${dialect_libs}
|
||||
${conversion_libs}
|
||||
MLIRAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRExecutionEngine
|
||||
MLIRIR
|
||||
MLIRParser
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef TOY_OPS
|
||||
#define TOY_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "toy/ShapeInferenceInterface.td"
|
||||
|
||||
// Provide a definition of the 'toy' dialect in the ODS framework so that we
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_subdirectory(Analysis)
|
||||
add_subdirectory(Dialect)
|
||||
add_subdirectory(IR)
|
||||
add_subdirectory(Interfaces)
|
||||
add_subdirectory(Transforms)
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
#ifndef MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
|
||||
#define MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
|
||||
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "mlir/IR/Function.h"
|
||||
#include "mlir/IR/OpDefinition.h"
|
||||
#include "mlir/IR/OpImplementation.h"
|
||||
#include "mlir/IR/TypeSupport.h"
|
||||
#include "mlir/IR/Types.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#define LLVMIR_OPS
|
||||
|
||||
include "mlir/Dialect/LLVMIR/LLVMOpBase.td"
|
||||
include "mlir/Analysis/ControlFlowInterfaces.td"
|
||||
include "mlir/Interfaces/ControlFlowInterfaces.td"
|
||||
|
||||
class LLVM_Builder<string builder> {
|
||||
string llvmBuilder = builder;
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#define SPIRV_CONTROLFLOW_OPS
|
||||
|
||||
include "mlir/Dialect/SPIRV/SPIRVBase.td"
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Analysis/ControlFlowInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "mlir/Interfaces/ControlFlowInterfaces.td"
|
||||
|
||||
// -----
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
#ifndef MLIR_DIALECT_SPIRV_SPIRVOPS_H_
|
||||
#define MLIR_DIALECT_SPIRV_SPIRVOPS_H_
|
||||
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
|
||||
#include "mlir/IR/Function.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
#include "llvm/Support/PointerLikeTypeTraits.h"
|
||||
|
||||
namespace mlir {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#ifndef SPIRV_STRUCTURE_OPS
|
||||
#define SPIRV_STRUCTURE_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "mlir/Dialect/SPIRV/SPIRVBase.td"
|
||||
|
||||
// -----
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#ifndef MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
||||
#define MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.h"
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "mlir/IR/OpImplementation.h"
|
||||
#include "mlir/IR/StandardTypes.h"
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
|
||||
// Pull in all enum type definitions and utility function declarations.
|
||||
#include "mlir/Dialect/StandardOps/IR/OpsEnums.h.inc"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#ifndef STANDARD_OPS
|
||||
#define STANDARD_OPS
|
||||
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Analysis/ControlFlowInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "mlir/Interfaces/ControlFlowInterfaces.td"
|
||||
include "mlir/IR/OpAsmInterface.td"
|
||||
include "mlir/IR/SideEffects.td"
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
#ifndef MLIR_IR_FUNCTION_H
|
||||
#define MLIR_IR_FUNCTION_H
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.h"
|
||||
#include "mlir/IR/Block.h"
|
||||
#include "mlir/IR/FunctionSupport.h"
|
||||
#include "mlir/IR/OpDefinition.h"
|
||||
#include "mlir/IR/SymbolTable.h"
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
#include "llvm/Support/PointerLikeTypeTraits.h"
|
||||
|
||||
namespace mlir {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
set(LLVM_TARGET_DEFINITIONS CallInterfaces.td)
|
||||
mlir_tablegen(CallInterfaces.h.inc -gen-op-interface-decls)
|
||||
mlir_tablegen(CallInterfaces.cpp.inc -gen-op-interface-defs)
|
||||
add_public_tablegen_target(MLIRCallOpInterfacesIncGen)
|
||||
add_public_tablegen_target(MLIRCallInterfacesIncGen)
|
||||
|
||||
set(LLVM_TARGET_DEFINITIONS ControlFlowInterfaces.td)
|
||||
mlir_tablegen(ControlFlowInterfaces.h.inc -gen-op-interface-decls)
|
||||
|
@ -11,4 +11,4 @@ add_public_tablegen_target(MLIRControlFlowInterfacesIncGen)
|
|||
set(LLVM_TARGET_DEFINITIONS InferTypeOpInterface.td)
|
||||
mlir_tablegen(InferTypeOpInterface.h.inc -gen-op-interface-decls)
|
||||
mlir_tablegen(InferTypeOpInterface.cpp.inc -gen-op-interface-defs)
|
||||
add_public_tablegen_target(MLIRTypeInferOpInterfaceIncGen)
|
||||
add_public_tablegen_target(MLIRInferTypeOpInterfaceIncGen)
|
|
@ -11,8 +11,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef MLIR_ANALYSIS_CALLINTERFACES_H
|
||||
#define MLIR_ANALYSIS_CALLINTERFACES_H
|
||||
#ifndef MLIR_INTERFACES_CALLINTERFACES_H
|
||||
#define MLIR_INTERFACES_CALLINTERFACES_H
|
||||
|
||||
#include "mlir/IR/SymbolTable.h"
|
||||
#include "llvm/ADT/PointerUnion.h"
|
||||
|
@ -24,7 +24,7 @@ struct CallInterfaceCallable : public PointerUnion<SymbolRefAttr, Value> {
|
|||
using PointerUnion<SymbolRefAttr, Value>::PointerUnion;
|
||||
};
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.h.inc"
|
||||
#include "mlir/Interfaces/CallInterfaces.h.inc"
|
||||
} // end namespace mlir
|
||||
|
||||
#endif // MLIR_ANALYSIS_CALLINTERFACES_H
|
||||
#endif // MLIR_INTERFACES_CALLINTERFACES_H
|
|
@ -1,4 +1,4 @@
|
|||
//===- CallInterfaces.td - Call Interfaces for ops -*- tablegen ---------*-===//
|
||||
//===- CallInterfaces.td - Call Interfaces for ops ---------*- tablegen -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
|
@ -12,8 +12,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef MLIR_CALLINTERFACES
|
||||
#define MLIR_CALLINTERFACES
|
||||
#ifndef MLIR_INTERFACES_CALLINTERFACES
|
||||
#define MLIR_INTERFACES_CALLINTERFACES
|
||||
|
||||
include "mlir/IR/OpBase.td"
|
||||
|
||||
|
@ -87,4 +87,4 @@ def CallableOpInterface : OpInterface<"CallableOpInterface"> {
|
|||
];
|
||||
}
|
||||
|
||||
#endif // MLIR_CALLINTERFACES
|
||||
#endif // MLIR_INTERFACES_CALLINTERFACES
|
|
@ -11,8 +11,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef MLIR_ANALYSIS_CONTROLFLOWINTERFACES_H
|
||||
#define MLIR_ANALYSIS_CONTROLFLOWINTERFACES_H
|
||||
#ifndef MLIR_INTERFACES_CONTROLFLOWINTERFACES_H
|
||||
#define MLIR_INTERFACES_CONTROLFLOWINTERFACES_H
|
||||
|
||||
#include "mlir/IR/OpDefinition.h"
|
||||
|
||||
|
@ -37,7 +37,7 @@ LogicalResult verifyBranchSuccessorOperands(Operation *op, unsigned succNo,
|
|||
Optional<OperandRange> operands);
|
||||
} // namespace detail
|
||||
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h.inc"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h.inc"
|
||||
} // end namespace mlir
|
||||
|
||||
#endif // MLIR_ANALYSIS_CONTROLFLOWINTERFACES_H
|
||||
#endif // MLIR_INTERFACES_CONTROLFLOWINTERFACES_H
|
|
@ -11,8 +11,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef MLIR_ANALYSIS_CONTROLFLOWINTERFACES
|
||||
#define MLIR_ANALYSIS_CONTROLFLOWINTERFACES
|
||||
#ifndef MLIR_INTERFACES_CONTROLFLOWINTERFACES
|
||||
#define MLIR_INTERFACES_CONTROLFLOWINTERFACES
|
||||
|
||||
include "mlir/IR/OpBase.td"
|
||||
|
||||
|
@ -82,4 +82,4 @@ def BranchOpInterface : OpInterface<"BranchOpInterface"> {
|
|||
}];
|
||||
}
|
||||
|
||||
#endif // MLIR_ANALYSIS_CONTROLFLOWINTERFACES
|
||||
#endif // MLIR_INTERFACES_CONTROLFLOWINTERFACES
|
|
@ -11,8 +11,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef MLIR_ANALYSIS_INFERTYPEOPINTERFACE_H_
|
||||
#define MLIR_ANALYSIS_INFERTYPEOPINTERFACE_H_
|
||||
#ifndef MLIR_INTERFACES_INFERTYPEOPINTERFACE_H_
|
||||
#define MLIR_INTERFACES_INFERTYPEOPINTERFACE_H_
|
||||
|
||||
#include "mlir/IR/Attributes.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
|
@ -94,7 +94,7 @@ LogicalResult inferReturnTensorTypes(
|
|||
LogicalResult verifyInferredResultTypes(Operation *op);
|
||||
} // namespace detail
|
||||
|
||||
#include "mlir/Analysis/InferTypeOpInterface.h.inc"
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.h.inc"
|
||||
|
||||
namespace OpTrait {
|
||||
|
||||
|
@ -118,4 +118,4 @@ public:
|
|||
} // namespace OpTrait
|
||||
} // namespace mlir
|
||||
|
||||
#endif // MLIR_ANALYSIS_INFERTYPEOPINTERFACE_H_
|
||||
#endif // MLIR_INTERFACES_INFERTYPEOPINTERFACE_H_
|
|
@ -2,9 +2,7 @@ set(LLVM_OPTIONAL_SOURCES
|
|||
AffineAnalysis.cpp
|
||||
AffineStructures.cpp
|
||||
CallGraph.cpp
|
||||
ControlFlowInterfaces.cpp
|
||||
Dominance.cpp
|
||||
InferTypeOpInterface.cpp
|
||||
Liveness.cpp
|
||||
LoopAnalysis.cpp
|
||||
NestedMatcher.cpp
|
||||
|
@ -13,23 +11,8 @@ set(LLVM_OPTIONAL_SOURCES
|
|||
Verifier.cpp
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRControlFlowAnalysis
|
||||
ControlFlowInterfaces.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||
|
||||
DEPENDS
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
)
|
||||
target_link_libraries(MLIRControlFlowAnalysis
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRAnalysis
|
||||
CallGraph.cpp
|
||||
InferTypeOpInterface.cpp
|
||||
Liveness.cpp
|
||||
SliceAnalysis.cpp
|
||||
Dominance.cpp
|
||||
|
@ -37,15 +20,14 @@ add_mlir_library(MLIRAnalysis
|
|||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||
|
||||
DEPENDS
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRTypeInferOpInterfaceIncGen
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRAnalysis
|
||||
PUBLIC
|
||||
MLIRAffineOps
|
||||
MLIRCallInterfaces
|
||||
MLIRControlFlowInterfaces
|
||||
MLIRInferTypeOpInterface
|
||||
MLIRLoopOps
|
||||
)
|
||||
|
||||
|
@ -58,13 +40,12 @@ add_mlir_library(MLIRLoopAnalysis
|
|||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||
|
||||
DEPENDS
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRTypeInferOpInterfaceIncGen
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRLoopAnalysis
|
||||
PUBLIC
|
||||
MLIRAffineOps
|
||||
MLIRCallInterfaces
|
||||
MLIRControlFlowInterfaces
|
||||
MLIRInferTypeOpInterface
|
||||
MLIRLoopOps)
|
||||
|
|
|
@ -11,21 +11,15 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Analysis/CallGraph.h"
|
||||
#include "mlir/Analysis/CallInterfaces.h"
|
||||
#include "mlir/IR/Operation.h"
|
||||
#include "mlir/IR/SymbolTable.h"
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
#include "llvm/ADT/PointerUnion.h"
|
||||
#include "llvm/ADT/SCCIterator.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// CallInterfaces
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.cpp.inc"
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// CallGraphNode
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -4,6 +4,7 @@ add_subdirectory(Dialect)
|
|||
add_subdirectory(EDSC)
|
||||
add_subdirectory(ExecutionEngine)
|
||||
add_subdirectory(IR)
|
||||
add_subdirectory(Interfaces)
|
||||
add_subdirectory(Parser)
|
||||
add_subdirectory(Pass)
|
||||
add_subdirectory(Quantizer)
|
||||
|
|
|
@ -5,7 +5,6 @@ add_mlir_dialect_library(MLIRLLVMIR
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||
|
||||
DEPENDS
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRLLVMOpsIncGen
|
||||
MLIRLLVMConversionsIncGen
|
||||
)
|
||||
|
@ -15,7 +14,8 @@ target_link_libraries(MLIRLLVMIR
|
|||
LLVMCore
|
||||
LLVMSupport
|
||||
LLVMFrontendOpenMP
|
||||
MLIRAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRControlFlowInterfaces
|
||||
MLIROpenMP
|
||||
MLIRIR
|
||||
MLIRSupport
|
||||
|
|
|
@ -15,7 +15,6 @@ add_mlir_dialect_library(MLIRSPIRV
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
||||
|
||||
DEPENDS
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRSPIRVAvailabilityIncGen
|
||||
MLIRSPIRVCanonicalizationIncGen
|
||||
MLIRSPIRVEnumAvailabilityIncGen
|
||||
|
@ -26,6 +25,7 @@ add_mlir_dialect_library(MLIRSPIRV
|
|||
)
|
||||
target_link_libraries(MLIRSPIRV
|
||||
PUBLIC
|
||||
MLIRControlFlowInterfaces
|
||||
MLIRIR
|
||||
MLIRParser
|
||||
MLIRSupport
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.h"
|
||||
#include "mlir/Dialect/SPIRV/SPIRVDialect.h"
|
||||
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
|
@ -20,6 +19,7 @@
|
|||
#include "mlir/IR/FunctionImplementation.h"
|
||||
#include "mlir/IR/OpImplementation.h"
|
||||
#include "mlir/IR/StandardTypes.h"
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
#include "mlir/Support/StringExtras.h"
|
||||
#include "llvm/ADT/bit.h"
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@ add_mlir_dialect_library(MLIRStandardOps
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
|
||||
|
||||
DEPENDS
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRStandardOpsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRStandardOps
|
||||
PUBLIC
|
||||
MLIRControlFlowAnalysis
|
||||
MLIRCallInterfaces
|
||||
MLIRControlFlowInterfaces
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
LLVMSupport
|
||||
|
|
|
@ -6,7 +6,7 @@ add_mlir_library(MLIRIR
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
||||
|
||||
DEPENDS
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRCallInterfacesIncGen
|
||||
MLIRSideEffectOpInterfacesIncGen
|
||||
MLIROpAsmInterfacesIncGen
|
||||
)
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
set(LLVM_OPTIONAL_SOURCES
|
||||
CallInterfaces.cpp
|
||||
ControlFlowInterfaces.cpp
|
||||
InferTypeOpInterface.cpp
|
||||
)
|
||||
|
||||
add_llvm_library(MLIRCallInterfaces
|
||||
CallInterfaces.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
|
||||
)
|
||||
add_dependencies(MLIRCallInterfaces
|
||||
MLIRCallInterfacesIncGen
|
||||
)
|
||||
target_link_libraries(MLIRCallInterfaces
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
)
|
||||
|
||||
add_llvm_library(MLIRControlFlowInterfaces
|
||||
ControlFlowInterfaces.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
|
||||
)
|
||||
add_dependencies(MLIRControlFlowInterfaces
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
)
|
||||
target_link_libraries(MLIRControlFlowInterfaces
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
)
|
||||
|
||||
add_llvm_library(MLIRInferTypeOpInterface
|
||||
InferTypeOpInterface.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
|
||||
)
|
||||
add_dependencies(MLIRInferTypeOpInterface
|
||||
MLIRInferTypeOpInterfaceIncGen
|
||||
)
|
||||
target_link_libraries(MLIRInferTypeOpInterface
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
//===- CallInterfaces.cpp - ControlFlow Interfaces ------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// CallInterfaces
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Interfaces/CallInterfaces.cpp.inc"
|
|
@ -1,4 +1,4 @@
|
|||
//===- ControlFlowInterfaces.h - ControlFlow Interfaces -------------------===//
|
||||
//===- ControlFlowInterfaces.cpp - ControlFlow Interfaces -----------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
#include "mlir/IR/StandardTypes.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
@ -15,7 +15,7 @@ using namespace mlir;
|
|||
// ControlFlowInterfaces
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.cpp.inc"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.cpp.inc"
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// BranchOpInterface
|
|
@ -11,14 +11,14 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Analysis/InferTypeOpInterface.h"
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.h"
|
||||
|
||||
#include "mlir/IR/StandardTypes.h"
|
||||
|
||||
using namespace mlir;
|
||||
|
||||
namespace mlir {
|
||||
#include "mlir/Analysis/InferTypeOpInterface.cpp.inc"
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.cpp.inc"
|
||||
} // namespace mlir
|
||||
|
||||
LogicalResult mlir::detail::inferReturnTensorTypes(
|
|
@ -7,11 +7,11 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Transforms/RegionUtils.h"
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/IR/Block.h"
|
||||
#include "mlir/IR/Operation.h"
|
||||
#include "mlir/IR/RegionGraphTraits.h"
|
||||
#include "mlir/IR/Value.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
|
||||
#include "llvm/ADT/DepthFirstIterator.h"
|
||||
#include "llvm/ADT/PostOrderIterator.h"
|
||||
|
|
|
@ -12,4 +12,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
|
|||
target_link_libraries(MLIRTestIR
|
||||
PUBLIC
|
||||
MLIRPass
|
||||
MLIRTestDialect
|
||||
)
|
||||
|
|
|
@ -16,13 +16,11 @@ add_llvm_library(MLIRTestDialect
|
|||
TestPatterns.cpp
|
||||
|
||||
DEPENDS
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRTestOpsIncGen
|
||||
MLIRTypeInferOpInterfaceIncGen
|
||||
)
|
||||
target_link_libraries(MLIRTestDialect
|
||||
PUBLIC
|
||||
MLIRAnalysis
|
||||
MLIRControlFlowInterfaces
|
||||
MLIRDialect
|
||||
MLIRIR
|
||||
MLIRLinalgTransforms
|
||||
|
@ -30,5 +28,6 @@ target_link_libraries(MLIRTestDialect
|
|||
MLIRStandardOps
|
||||
MLIRTransforms
|
||||
MLIRTransformUtils
|
||||
MLIRInferTypeOpInterface
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
#ifndef MLIR_TESTDIALECT_H
|
||||
#define MLIR_TESTDIALECT_H
|
||||
|
||||
#include "mlir/Analysis/CallInterfaces.h"
|
||||
#include "mlir/Analysis/ControlFlowInterfaces.h"
|
||||
#include "mlir/Analysis/InferTypeOpInterface.h"
|
||||
#include "mlir/Dialect/Traits.h"
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "mlir/IR/OpDefinition.h"
|
||||
#include "mlir/IR/OpImplementation.h"
|
||||
#include "mlir/IR/StandardTypes.h"
|
||||
#include "mlir/IR/SymbolTable.h"
|
||||
#include "mlir/Interfaces/CallInterfaces.h"
|
||||
#include "mlir/Interfaces/ControlFlowInterfaces.h"
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.h"
|
||||
|
||||
#include "TestOpEnums.h.inc"
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
include "mlir/IR/OpBase.td"
|
||||
include "mlir/IR/OpAsmInterface.td"
|
||||
include "mlir/IR/SideEffects.td"
|
||||
include "mlir/Analysis/ControlFlowInterfaces.td"
|
||||
include "mlir/Analysis/CallInterfaces.td"
|
||||
include "mlir/Analysis/InferTypeOpInterface.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "mlir/Interfaces/ControlFlowInterfaces.td"
|
||||
include "mlir/Interfaces/InferTypeOpInterface.td"
|
||||
|
||||
def TEST_Dialect : Dialect {
|
||||
let name = "test";
|
||||
|
|
Loading…
Reference in New Issue