From b8ee5634491e3b3b0a52dd50ccd44103c918d3fe Mon Sep 17 00:00:00 2001 From: River Riddle Date: Fri, 22 Nov 2019 17:51:23 -0800 Subject: [PATCH] NFC: Remove unnecessarily guarded tablegen includes. Support for including a file multiple times was added in tablegen, removing the need for these extra guards. This is because we already insert c/c++ style header guards within each of the specific .td files. PiperOrigin-RevId: 282076728 --- mlir/examples/toy/Ch2/include/toy/Ops.td | 2 -- mlir/examples/toy/Ch3/include/toy/Ops.td | 2 -- mlir/examples/toy/Ch3/mlir/ToyCombine.td | 2 -- mlir/examples/toy/Ch4/include/toy/Ops.td | 5 ----- .../toy/Ch4/include/toy/ShapeInferenceInterface.td | 2 -- mlir/examples/toy/Ch4/mlir/ToyCombine.td | 2 -- mlir/examples/toy/Ch5/include/toy/Ops.td | 5 ----- .../toy/Ch5/include/toy/ShapeInferenceInterface.td | 2 -- mlir/examples/toy/Ch5/mlir/ToyCombine.td | 2 -- mlir/examples/toy/Ch6/include/toy/Ops.td | 5 ----- .../toy/Ch6/include/toy/ShapeInferenceInterface.td | 2 -- mlir/examples/toy/Ch6/mlir/ToyCombine.td | 2 -- mlir/examples/toy/Ch7/include/toy/Ops.td | 5 ----- .../toy/Ch7/include/toy/ShapeInferenceInterface.td | 2 -- mlir/examples/toy/Ch7/mlir/ToyCombine.td | 2 -- mlir/include/mlir/Analysis/CallInterfaces.td | 2 -- mlir/include/mlir/Analysis/InferTypeOpInterface.td | 2 -- mlir/include/mlir/Dialect/AffineOps/AffineOps.td | 8 +------- .../mlir/Dialect/AffineOps/AffineOpsBase.td | 2 -- mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td | 4 +--- mlir/include/mlir/Dialect/GPU/GPUOps.td | 2 -- mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td | 2 -- mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td | 6 ++---- .../mlir/Dialect/Linalg/IR/LinalgLibraryOps.td | 5 ----- mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td | 5 ----- .../Linalg/Transforms/LinalgTransformPatterns.td | 4 ---- mlir/include/mlir/Dialect/LoopOps/LoopOps.td | 5 ----- mlir/include/mlir/Dialect/QuantOps/QuantOps.td | 3 +-- .../mlir/Dialect/SPIRV/SPIRVArithmeticOps.td | 4 +--- mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td | 2 -- mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td | 4 +--- mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td | 4 +--- .../mlir/Dialect/SPIRV/SPIRVControlFlowOps.td | 7 +------ mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td | 2 -- mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td | 4 +--- mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td | 23 ---------------------- .../mlir/Dialect/SPIRV/SPIRVStructureOps.td | 4 +--- mlir/include/mlir/Dialect/StandardOps/Ops.td | 6 +----- mlir/include/mlir/Dialect/VectorOps/VectorOps.td | 5 ----- mlir/include/mlir/IR/OpAsmInterface.td | 2 -- mlir/include/mlir/Transforms/LoopLikeInterface.td | 2 -- mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td | 5 ----- .../Conversion/StandardToSPIRV/StandardToSPIRV.td | 5 ----- .../TestLinalgTransformPatterns.td | 2 -- mlir/test/mlir-tblgen/reference-impl.td | 2 -- 45 files changed, 12 insertions(+), 163 deletions(-) diff --git a/mlir/examples/toy/Ch2/include/toy/Ops.td b/mlir/examples/toy/Ch2/include/toy/Ops.td index fb41818..de9eebb 100644 --- a/mlir/examples/toy/Ch2/include/toy/Ops.td +++ b/mlir/examples/toy/Ch2/include/toy/Ops.td @@ -22,9 +22,7 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch3/include/toy/Ops.td b/mlir/examples/toy/Ch3/include/toy/Ops.td index 25bf06c..602d96c 100644 --- a/mlir/examples/toy/Ch3/include/toy/Ops.td +++ b/mlir/examples/toy/Ch3/include/toy/Ops.td @@ -22,9 +22,7 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch3/mlir/ToyCombine.td b/mlir/examples/toy/Ch3/mlir/ToyCombine.td index 0a63861..1ca143a 100644 --- a/mlir/examples/toy/Ch3/mlir/ToyCombine.td +++ b/mlir/examples/toy/Ch3/mlir/ToyCombine.td @@ -23,9 +23,7 @@ #ifndef TOY_COMBINE #define TOY_COMBINE -#ifndef OP_BASE include "toy/Ops.td" -#endif // OP_BASE /// Note: The DRR definition used for defining patterns is shown below: /// diff --git a/mlir/examples/toy/Ch4/include/toy/Ops.td b/mlir/examples/toy/Ch4/include/toy/Ops.td index bbbcc48..35f4140 100644 --- a/mlir/examples/toy/Ch4/include/toy/Ops.td +++ b/mlir/examples/toy/Ch4/include/toy/Ops.td @@ -22,13 +22,8 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef MLIR_CALLINTERFACES include "mlir/Analysis/CallInterfaces.td" -#endif // MLIR_CALLINTERFACES - -#ifndef SHAPE_INFERENCE_INTERFACE include "toy/ShapeInferenceInterface.td" -#endif // SHAPE_INFERENCE_INTERFACE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td b/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td index dc34590..6974575 100644 --- a/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td +++ b/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td @@ -22,9 +22,7 @@ #ifndef SHAPE_INFERENCE_INTERFACE #define SHAPE_INFERENCE_INTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> { let description = [{ diff --git a/mlir/examples/toy/Ch4/mlir/ToyCombine.td b/mlir/examples/toy/Ch4/mlir/ToyCombine.td index 0a63861..1ca143a 100644 --- a/mlir/examples/toy/Ch4/mlir/ToyCombine.td +++ b/mlir/examples/toy/Ch4/mlir/ToyCombine.td @@ -23,9 +23,7 @@ #ifndef TOY_COMBINE #define TOY_COMBINE -#ifndef OP_BASE include "toy/Ops.td" -#endif // OP_BASE /// Note: The DRR definition used for defining patterns is shown below: /// diff --git a/mlir/examples/toy/Ch5/include/toy/Ops.td b/mlir/examples/toy/Ch5/include/toy/Ops.td index d9306f4..29df500 100644 --- a/mlir/examples/toy/Ch5/include/toy/Ops.td +++ b/mlir/examples/toy/Ch5/include/toy/Ops.td @@ -22,13 +22,8 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef MLIR_CALLINTERFACES include "mlir/Analysis/CallInterfaces.td" -#endif // MLIR_CALLINTERFACES - -#ifndef SHAPE_INFERENCE_INTERFACE include "toy/ShapeInferenceInterface.td" -#endif // SHAPE_INFERENCE_INTERFACE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td b/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td index dc34590..6974575 100644 --- a/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td +++ b/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td @@ -22,9 +22,7 @@ #ifndef SHAPE_INFERENCE_INTERFACE #define SHAPE_INFERENCE_INTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> { let description = [{ diff --git a/mlir/examples/toy/Ch5/mlir/ToyCombine.td b/mlir/examples/toy/Ch5/mlir/ToyCombine.td index 0a63861..1ca143a 100644 --- a/mlir/examples/toy/Ch5/mlir/ToyCombine.td +++ b/mlir/examples/toy/Ch5/mlir/ToyCombine.td @@ -23,9 +23,7 @@ #ifndef TOY_COMBINE #define TOY_COMBINE -#ifndef OP_BASE include "toy/Ops.td" -#endif // OP_BASE /// Note: The DRR definition used for defining patterns is shown below: /// diff --git a/mlir/examples/toy/Ch6/include/toy/Ops.td b/mlir/examples/toy/Ch6/include/toy/Ops.td index d9306f4..29df500 100644 --- a/mlir/examples/toy/Ch6/include/toy/Ops.td +++ b/mlir/examples/toy/Ch6/include/toy/Ops.td @@ -22,13 +22,8 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef MLIR_CALLINTERFACES include "mlir/Analysis/CallInterfaces.td" -#endif // MLIR_CALLINTERFACES - -#ifndef SHAPE_INFERENCE_INTERFACE include "toy/ShapeInferenceInterface.td" -#endif // SHAPE_INFERENCE_INTERFACE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td b/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td index dc34590..6974575 100644 --- a/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td +++ b/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td @@ -22,9 +22,7 @@ #ifndef SHAPE_INFERENCE_INTERFACE #define SHAPE_INFERENCE_INTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> { let description = [{ diff --git a/mlir/examples/toy/Ch6/mlir/ToyCombine.td b/mlir/examples/toy/Ch6/mlir/ToyCombine.td index 0a63861..1ca143a 100644 --- a/mlir/examples/toy/Ch6/mlir/ToyCombine.td +++ b/mlir/examples/toy/Ch6/mlir/ToyCombine.td @@ -23,9 +23,7 @@ #ifndef TOY_COMBINE #define TOY_COMBINE -#ifndef OP_BASE include "toy/Ops.td" -#endif // OP_BASE /// Note: The DRR definition used for defining patterns is shown below: /// diff --git a/mlir/examples/toy/Ch7/include/toy/Ops.td b/mlir/examples/toy/Ch7/include/toy/Ops.td index d41406a..a3c2095 100644 --- a/mlir/examples/toy/Ch7/include/toy/Ops.td +++ b/mlir/examples/toy/Ch7/include/toy/Ops.td @@ -22,13 +22,8 @@ #ifndef TOY_OPS #define TOY_OPS -#ifndef MLIR_CALLINTERFACES include "mlir/Analysis/CallInterfaces.td" -#endif // MLIR_CALLINTERFACES - -#ifndef SHAPE_INFERENCE_INTERFACE include "toy/ShapeInferenceInterface.td" -#endif // SHAPE_INFERENCE_INTERFACE // Provide a definition of the 'toy' dialect in the ODS framework so that we // can define our operations. diff --git a/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td b/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td index dc34590..6974575 100644 --- a/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td +++ b/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td @@ -22,9 +22,7 @@ #ifndef SHAPE_INFERENCE_INTERFACE #define SHAPE_INFERENCE_INTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> { let description = [{ diff --git a/mlir/examples/toy/Ch7/mlir/ToyCombine.td b/mlir/examples/toy/Ch7/mlir/ToyCombine.td index 0a63861..1ca143a 100644 --- a/mlir/examples/toy/Ch7/mlir/ToyCombine.td +++ b/mlir/examples/toy/Ch7/mlir/ToyCombine.td @@ -23,9 +23,7 @@ #ifndef TOY_COMBINE #define TOY_COMBINE -#ifndef OP_BASE include "toy/Ops.td" -#endif // OP_BASE /// Note: The DRR definition used for defining patterns is shown below: /// diff --git a/mlir/include/mlir/Analysis/CallInterfaces.td b/mlir/include/mlir/Analysis/CallInterfaces.td index 67440b2..043f009 100644 --- a/mlir/include/mlir/Analysis/CallInterfaces.td +++ b/mlir/include/mlir/Analysis/CallInterfaces.td @@ -24,9 +24,7 @@ #ifndef MLIR_CALLINTERFACES #define MLIR_CALLINTERFACES -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE // `CallInterfaceCallable`: This is a type used to represent a single callable // region. A callable is either a symbol, or an SSA value, that is referenced by diff --git a/mlir/include/mlir/Analysis/InferTypeOpInterface.td b/mlir/include/mlir/Analysis/InferTypeOpInterface.td index 325c550..56c7319 100644 --- a/mlir/include/mlir/Analysis/InferTypeOpInterface.td +++ b/mlir/include/mlir/Analysis/InferTypeOpInterface.td @@ -23,9 +23,7 @@ #ifndef MLIR_INFERTYPEOPINTERFACE #define MLIR_INFERTYPEOPINTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE // OpInterface to compute the return type of an operation. The arguments match // those in Operation::create with the exception that the location is optional diff --git a/mlir/include/mlir/Dialect/AffineOps/AffineOps.td b/mlir/include/mlir/Dialect/AffineOps/AffineOps.td index 1b6c777..c57ee50 100644 --- a/mlir/include/mlir/Dialect/AffineOps/AffineOps.td +++ b/mlir/include/mlir/Dialect/AffineOps/AffineOps.td @@ -22,15 +22,9 @@ #ifndef AFFINE_OPS #define AFFINE_OPS -#ifndef OP_BASE +include "mlir/Dialect/AffineOps/AffineOpsBase.td" include "mlir/IR/OpBase.td" -#endif // OP_BASE - -#ifndef MLIR_LOOPLIKEINTERFACE include "mlir/Transforms/LoopLikeInterface.td" -#endif - -include "mlir/Dialect/AffineOps/AffineOpsBase.td" def Affine_Dialect : Dialect { let name = "affine"; diff --git a/mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td b/mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td index 2d6eb14..755f65c 100644 --- a/mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td +++ b/mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td @@ -22,9 +22,7 @@ #ifndef AFFINE_OPS_BASE #define AFFINE_OPS_BASE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE // Attributes containing affine maps. def AffineMapAttr : Attr< diff --git a/mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td b/mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td index aa8b7ec..b1bfb27 100644 --- a/mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td +++ b/mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td @@ -22,10 +22,8 @@ #ifndef DIALECT_FXPMATHOPS_FXPMATH_OPS_ #define DIALECT_FXPMATHOPS_FXPMATH_OPS_ -#ifndef OP_BASE -include "mlir/IR/OpBase.td" -#endif // OP_BASE +include "mlir/IR/OpBase.td" include "mlir/Dialect/QuantOps/QuantPredicates.td" def fxpmath_Dialect : Dialect { diff --git a/mlir/include/mlir/Dialect/GPU/GPUOps.td b/mlir/include/mlir/Dialect/GPU/GPUOps.td index a620d10..4329084 100644 --- a/mlir/include/mlir/Dialect/GPU/GPUOps.td +++ b/mlir/include/mlir/Dialect/GPU/GPUOps.td @@ -22,9 +22,7 @@ #ifndef GPU_OPS #define GPU_OPS -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def GPU_Dialect : Dialect { let name = "gpu"; diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td index 37c8315..f8c8277 100644 --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td @@ -23,9 +23,7 @@ #ifndef LLVMIR_OP_BASE #define LLVMIR_OP_BASE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def LLVM_Dialect : Dialect { let name = "llvm"; diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td index a2c302f..ca1b58d 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td @@ -19,13 +19,11 @@ // //===----------------------------------------------------------------------===// -#ifndef OP_BASE -include "mlir/IR/OpBase.td" -#endif // OP_BASE - #ifndef LINALG_BASE #define LINALG_BASE +include "mlir/IR/OpBase.td" + def Linalg_Dialect : Dialect { let name = "linalg"; let description = [{ diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td index dd16498..92b325b 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td @@ -23,13 +23,8 @@ #ifndef LINALG_LIBRARY_OPS #define LINALG_LIBRARY_OPS -#ifndef AFFINE_OPS_BASE include "mlir/Dialect/AffineOps/AffineOpsBase.td" -#endif // AFFINE_OPS_BASE - -#ifndef LINALG_BASE include "mlir/Dialect/Linalg/IR/LinalgBase.td" -#endif // LINALG_BASE class LinalgParametricNativeOpTrait : NativeOpTrait<"linalg::" # prop # parameters> diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td index 96974de..414a586 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td @@ -22,13 +22,8 @@ #ifndef LINALG_OPS #define LINALG_OPS -#ifndef AFFINE_OPS_BASE include "mlir/Dialect/AffineOps/AffineOpsBase.td" -#endif // AFFINE_OPS_BASE - -#ifndef LINALG_BASE include "mlir/Dialect/Linalg/IR/LinalgBase.td" -#endif // LINALG_BASE // Base class for Linalg dialect ops that do not correspond to library calls. class Linalg_Op traits = []> : diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td b/mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td index 66a3a16..d243bb2 100644 --- a/mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td +++ b/mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td @@ -22,12 +22,8 @@ #ifndef LINALG_TRANSFORMS #define LINALG_TRANSFORMS -#ifndef LINALG_OPS include "mlir/Dialect/Linalg/IR/LinalgOps.td" -#endif // LINALG_OPS -#ifndef LINALG_LIBRARY_OPS include "mlir/Dialect/Linalg/IR/LinalgLibraryOps.td" -#endif // LINALG_LIBRARY_OPS def HasNoLinalgTransformMarker : CPred<[{ !$0.getAttrOfType(LinalgTransforms::kLinalgTransformMarker) diff --git a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td index 6f228a2..5e0b809 100644 --- a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td +++ b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td @@ -22,13 +22,8 @@ #ifndef LOOP_OPS #define LOOP_OPS -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE - -#ifndef MLIR_LOOPLIKEINTERFACE include "mlir/Transforms/LoopLikeInterface.td" -#endif def Loop_Dialect : Dialect { let name = "loop"; diff --git a/mlir/include/mlir/Dialect/QuantOps/QuantOps.td b/mlir/include/mlir/Dialect/QuantOps/QuantOps.td index 48a1598..85d5cd2 100644 --- a/mlir/include/mlir/Dialect/QuantOps/QuantOps.td +++ b/mlir/include/mlir/Dialect/QuantOps/QuantOps.td @@ -21,10 +21,9 @@ #ifndef DIALECT_QUANTOPS_QUANT_OPS_ #define DIALECT_QUANTOPS_QUANT_OPS_ -#ifndef OP_BASE + include "mlir/IR/OpBase.td" include "mlir/Dialect/QuantOps/QuantPredicates.td" -#endif // OP_BASE def quant_Dialect : Dialect { let name = "quant"; diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td index 6554275..cbcd930 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td @@ -23,9 +23,7 @@ #ifndef SPIRV_ARITHMETIC_OPS #define SPIRV_ARITHMETIC_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE +include "mlir/Dialect/SPIRV/SPIRVBase.td" class SPV_ArithmeticBinaryOp traits = []> : diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td index 44e940a..f88f87e 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td @@ -24,9 +24,7 @@ #ifndef SPIRV_BASE #define SPIRV_BASE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE //===----------------------------------------------------------------------===// // SPIR-V dialect definitions diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td index 0a183af..ba748f8 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td @@ -23,9 +23,7 @@ #ifndef SPIRV_BIT_OPS #define SPIRV_BIT_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE +include "mlir/Dialect/SPIRV/SPIRVBase.td" class SPV_BitBinaryOp traits = []> : // All the operands type used in bit instructions are SPV_Integer. diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td index 1798b9d..2faffb6 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td @@ -23,9 +23,7 @@ #ifndef SPIRV_CAST_OPS #define SPIRV_CAST_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE +include "mlir/Dialect/SPIRV/SPIRVBase.td" class SPV_CastOp traits = []> : diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td index 1e41fa0..a494633 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td @@ -23,13 +23,8 @@ #ifndef SPIRV_CONTROLFLOW_OPS #define SPIRV_CONTROLFLOW_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE - -#ifndef MLIR_CALLINTERFACES +include "mlir/Dialect/SPIRV/SPIRVBase.td" include "mlir/Analysis/CallInterfaces.td" -#endif // MLIR_CALLINTERFACES // ----- diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td index 7d5ae76..217b6d9 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td @@ -22,9 +22,7 @@ #ifndef SPIRV_GLSL_OPS #define SPIRV_GLSL_OPS -#ifndef SPIRV_BASE include "mlir/Dialect/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE //===----------------------------------------------------------------------===// // SPIR-V GLSL 4.50 opcode specification. diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td index 7321938..be9825a 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td @@ -23,9 +23,7 @@ #ifndef SPIRV_LOGICAL_OPS #define SPIRV_LOGICAL_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE +include "mlir/Dialect/SPIRV/SPIRVBase.td" class SPV_LogicalBinaryOp traits = []> : diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td index 9be4898..41d729d 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td @@ -29,39 +29,16 @@ #ifndef SPIRV_OPS #define SPIRV_OPS -#ifndef SPIRV_BASE include "mlir/Dialect/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE - -#ifndef SPIRV_ARITHMETIC_OPS include "mlir/Dialect/SPIRV/SPIRVArithmeticOps.td" -#endif // SPIRV_ARITHMETIC_OPS - -#ifndef SPIRV_BIT_OPS include "mlir/Dialect/SPIRV/SPIRVBitOps.td" -#endif // SPIRV_BIT_OPS - -#ifndef SPIRV_CAST_OPS include "mlir/Dialect/SPIRV/SPIRVCastOps.td" -#endif // SPIRV_CAST_OPS - -#ifndef SPIRV_CONTROLFLOW_OPS include "mlir/Dialect/SPIRV/SPIRVControlFlowOps.td" -#endif // SPIRV_CONTROLFLOW_OPS - -#ifndef SPIRV_LOGICAL_OPS include "mlir/Dialect/SPIRV/SPIRVLogicalOps.td" -#endif // SPIRV_LOGICAL_OPS - -#ifndef SPIRV_STRUCTURE_OPS // Pull in ops for defining the SPIR-V module structure include "mlir/Dialect/SPIRV/SPIRVStructureOps.td" -#endif // SPIRV_STRUCTURE_OPS - -#ifndef SPIRV_GLSL_OPS // Pull in ops for extended instruction set for GLSL include "mlir/Dialect/SPIRV/SPIRVGLSLOps.td" -#endif // SPIRV_GLSL_OPS // ----- diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td index fab97bd..e6b4dac 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td @@ -24,9 +24,7 @@ #ifndef SPIRV_STRUCTURE_OPS #define SPIRV_STRUCTURE_OPS -#ifndef SPIRV_BASE -include "mlir/SPIRV/SPIRVBase.td" -#endif // SPIRV_BASE +include "mlir/Dialect/SPIRV/SPIRVBase.td" def SPV_AddressOfOp : SPV_Op<"_address_of", [InFunctionScope, NoSideEffect]> { let summary = "Get the address of a global variable."; diff --git a/mlir/include/mlir/Dialect/StandardOps/Ops.td b/mlir/include/mlir/Dialect/StandardOps/Ops.td index 66613e0..e335984 100644 --- a/mlir/include/mlir/Dialect/StandardOps/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/Ops.td @@ -22,12 +22,8 @@ #ifndef STANDARD_OPS #define STANDARD_OPS -#ifndef OP_BASE -include "mlir/IR/OpBase.td" -#endif // OP_BASE - -include "mlir/IR/OpAsmInterface.td" include "mlir/Analysis/CallInterfaces.td" +include "mlir/IR/OpAsmInterface.td" def Std_Dialect : Dialect { let name = "std"; diff --git a/mlir/include/mlir/Dialect/VectorOps/VectorOps.td b/mlir/include/mlir/Dialect/VectorOps/VectorOps.td index 3b71e59..ce03750 100644 --- a/mlir/include/mlir/Dialect/VectorOps/VectorOps.td +++ b/mlir/include/mlir/Dialect/VectorOps/VectorOps.td @@ -22,13 +22,8 @@ #ifndef VECTOR_OPS #define VECTOR_OPS -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE - -#ifndef AFFINE_OPS_BASE include "mlir/Dialect/AffineOps/AffineOpsBase.td" -#endif // AFFINE_OPS_BASE def Vector_Dialect : Dialect { let name = "vector"; diff --git a/mlir/include/mlir/IR/OpAsmInterface.td b/mlir/include/mlir/IR/OpAsmInterface.td index 974360e..85726a8 100644 --- a/mlir/include/mlir/IR/OpAsmInterface.td +++ b/mlir/include/mlir/IR/OpAsmInterface.td @@ -23,9 +23,7 @@ #ifndef MLIR_OPASMINTERFACE #define MLIR_OPASMINTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE /// Interface for hooking into the OpAsmPrinter and OpAsmParser. def OpAsmOpInterface : OpInterface<"OpAsmOpInterface"> { diff --git a/mlir/include/mlir/Transforms/LoopLikeInterface.td b/mlir/include/mlir/Transforms/LoopLikeInterface.td index 4ba8917..5c324b7 100644 --- a/mlir/include/mlir/Transforms/LoopLikeInterface.td +++ b/mlir/include/mlir/Transforms/LoopLikeInterface.td @@ -22,9 +22,7 @@ #ifndef MLIR_LOOPLIKEINTERFACE #define MLIR_LOOPLIKEINTERFACE -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> { let description = [{ diff --git a/mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td b/mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td index 5c94069..8c27ba4 100644 --- a/mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td +++ b/mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td @@ -22,13 +22,8 @@ #ifndef MLIR_CONVERSION_GPUTONVVM_TD #define MLIR_CONVERSION_GPUTONVVM_TD -#ifndef GPU_OPS include "mlir/Dialect/GPU/GPUOps.td" -#endif // GPU_OPS - -#ifndef NVVMIR_OPS include "mlir/Dialect/LLVMIR/NVVMOps.td" -#endif // NVVMIR_OPS def : Pat<(GPU_BarrierOp), (NVVM_Barrier0Op)>; diff --git a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td index 769ec58..9ebbea6 100644 --- a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td +++ b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td @@ -13,13 +13,8 @@ #ifndef MLIR_CONVERSION_STANDARDTOSPIRV_TD #define MLIR_CONVERSION_STANDARDTOSPIRV_TD -#ifndef STANDARD_OPS include "mlir/Dialect/StandardOps/Ops.td" -#endif // STANDARD_OPS - -#ifndef SPIRV_OPS include "mlir/Dialect/SPIRV/SPIRVOps.td" -#endif // SPIRV_OPS class BinaryOpPattern : Pat<(src SPV_ScalarOrVector:$l, SPV_ScalarOrVector:$r), diff --git a/mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td b/mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td index c052c74..839671c 100644 --- a/mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td +++ b/mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td @@ -23,9 +23,7 @@ #ifndef TEST_LINALG_TRANSFORMS_PATTERNS #define TEST_LINALG_TRANSFORMS_PATTERNS -#ifndef LINALG_TRANSFORMS include "mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td" -#endif // LINALG_TRANSFORMS //===----------------------------------------------------------------------===// // Test Linalg fusion patterns. diff --git a/mlir/test/mlir-tblgen/reference-impl.td b/mlir/test/mlir-tblgen/reference-impl.td index 53cb705..291b7ea 100644 --- a/mlir/test/mlir-tblgen/reference-impl.td +++ b/mlir/test/mlir-tblgen/reference-impl.td @@ -1,8 +1,6 @@ // RUN: mlir-tblgen -gen-reference-implementations -I %S/../../include %s | FileCheck %s -#ifndef OP_BASE include "mlir/IR/OpBase.td" -#endif // OP_BASE def X_Dialect : Dialect { let name = "x"; -- 2.7.4