From 0e1fdceb1328f7099d371ddff3e22ea38b1e3537 Mon Sep 17 00:00:00 2001 From: hanhanW Date: Thu, 12 Mar 2026 15:56:39 -0700 Subject: [PATCH] [DispatchCreation] Drop redundant `public` from struct inheritance. 4/5 Signed-off-by: hanhanW --- .../BitcastUnsupportedElementTypes.cpp | 2 +- .../DispatchCreation/BubbleUpExpandShapes.cpp | 13 ++++++------- .../CloneProducersIntoDispatchRegions.cpp | 2 +- .../DispatchCreation/CollapseDimensions.cpp | 2 +- .../ConvertDispatchRegionsToWorkgroups.cpp | 2 +- .../DispatchCreation/ConvertEncodingToFlow.cpp | 2 +- .../DispatchCreation/ConvertTensorToFlow.cpp | 2 +- .../DispatchCreation/ElementwiseOpFusion.cpp | 4 ++-- .../FoldReshapesIntoTensorBarriers.cpp | 6 +++--- .../DispatchCreation/FoldUnitExtentDims.cpp | 5 ++--- .../DispatchCreation/FormDispatchRegions.cpp | 2 +- .../DispatchCreation/FormScalarDispatches.cpp | 2 +- .../FormSplitReductionDispatches.cpp | 2 +- .../DispatchCreation/FuseHorizontalContractions.cpp | 3 +-- .../FuseMultiUseElementwiseProducer.cpp | 2 +- .../DispatchCreation/FusionPreprocessing.cpp | 6 +++--- .../compiler/DispatchCreation/HoistEncodingOps.cpp | 8 +++----- .../DispatchCreation/HoistUniformScalarCompute.cpp | 2 +- .../DispatchCreation/InsertTensorBarriers.cpp | 2 +- .../MaterializeDefaultWorkgroupCountRegion.cpp | 2 +- .../src/iree/compiler/DispatchCreation/Passes.h | 2 +- .../DispatchCreation/PropagateEncodings.cpp | 4 ++-- .../DispatchCreation/RemoveTensorBarriers.cpp | 2 +- .../DispatchCreation/SetSplitReductionSizes.cpp | 2 +- .../iree/compiler/DispatchCreation/SinkReshapes.cpp | 3 +-- .../compiler/DispatchCreation/SplitReduction.cpp | 2 +- .../TensorPadToTensorInsertSlice.cpp | 4 ++-- .../DispatchCreation/TransposeGenericOps.cpp | 9 ++++----- 28 files changed, 46 insertions(+), 53 deletions(-) diff --git a/compiler/src/iree/compiler/DispatchCreation/BitcastUnsupportedElementTypes.cpp b/compiler/src/iree/compiler/DispatchCreation/BitcastUnsupportedElementTypes.cpp index d6779d445544..6f55a38a486f 100644 --- a/compiler/src/iree/compiler/DispatchCreation/BitcastUnsupportedElementTypes.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/BitcastUnsupportedElementTypes.cpp @@ -257,7 +257,7 @@ bitcastWorkgroupsOutputs(RewriterBase &rewriter, namespace { struct BitcastUnsupportedElementTypesPass - : public impl::BitcastUnsupportedElementTypesPassBase< + : impl::BitcastUnsupportedElementTypesPassBase< BitcastUnsupportedElementTypesPass> { using Base::Base; void runOnOperation() override; diff --git a/compiler/src/iree/compiler/DispatchCreation/BubbleUpExpandShapes.cpp b/compiler/src/iree/compiler/DispatchCreation/BubbleUpExpandShapes.cpp index 38716949664e..dd4e1c764107 100644 --- a/compiler/src/iree/compiler/DispatchCreation/BubbleUpExpandShapes.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/BubbleUpExpandShapes.cpp @@ -46,7 +46,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct BubbleUpExpandShapesPass final - : public impl::BubbleUpExpandShapesPassBase { + : impl::BubbleUpExpandShapesPassBase { using Base::Base; void runOnOperation() override; }; @@ -142,8 +142,7 @@ struct BubbleUpExtract : OpRewritePattern { /// tensor.extract_slice(%init)) even when the linalg.fill has multiple users. /// Bubbles up tensor.extract_slice when encountered with linalg.fill and the /// former can be folded away. -struct SwapExtractSliceOfFill final - : public OpRewritePattern { +struct SwapExtractSliceOfFill final : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(tensor::ExtractSliceOp extractOp, @@ -169,7 +168,7 @@ struct SwapExtractSliceOfFill final /// are dynamic. /// TODO: move this upstream with other tensor bubbling patterns. struct BubbleExpandThroughExtract final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; @@ -273,7 +272,7 @@ struct BubbleExpandThroughExtract final }; struct BubbleExpandThroughConcat final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(tensor::ExpandShapeOp expandOp, @@ -383,7 +382,7 @@ struct BubbleExpandThroughConcat final /// Bubble expand_shape through bitcast: expand_shape(bitcast(x)) -> /// bitcast(expand_shape(x)). struct BubbleExpandThroughBitCast final - : public OpRewritePattern { + : OpRewritePattern { using OpRewritePattern::OpRewritePattern; LogicalResult matchAndRewrite(tensor::ExpandShapeOp expandOp, @@ -485,7 +484,7 @@ struct BubbleExpandThroughBitCast final /// Sink collapse_shape through bitcast: bitcast(collapse_shape(x)) -> /// collapse_shape(bitcast(x)). struct SinkCollapseThroughBitCast final - : public OpRewritePattern { + : OpRewritePattern { using OpRewritePattern::OpRewritePattern; LogicalResult matchAndRewrite(IREE::TensorExt::BitCastOp bitcastOp, diff --git a/compiler/src/iree/compiler/DispatchCreation/CloneProducersIntoDispatchRegions.cpp b/compiler/src/iree/compiler/DispatchCreation/CloneProducersIntoDispatchRegions.cpp index 1063d0dfddc4..d0f706dd166e 100644 --- a/compiler/src/iree/compiler/DispatchCreation/CloneProducersIntoDispatchRegions.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/CloneProducersIntoDispatchRegions.cpp @@ -25,7 +25,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct CloneProducersIntoDispatchRegionsPass final - : public impl::CloneProducersIntoDispatchRegionsPassBase< + : impl::CloneProducersIntoDispatchRegionsPassBase< CloneProducersIntoDispatchRegionsPass> { using Base::Base; void runOnOperation() override { diff --git a/compiler/src/iree/compiler/DispatchCreation/CollapseDimensions.cpp b/compiler/src/iree/compiler/DispatchCreation/CollapseDimensions.cpp index 9562ca285ce8..c0106ec4c830 100644 --- a/compiler/src/iree/compiler/DispatchCreation/CollapseDimensions.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/CollapseDimensions.cpp @@ -52,7 +52,7 @@ using IREE::LinalgExt::LinalgFusionOpInterface; namespace { /// Pass declaration. struct CollapseDimensionsPass final - : public impl::CollapseDimensionsPassBase { + : impl::CollapseDimensionsPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/ConvertDispatchRegionsToWorkgroups.cpp b/compiler/src/iree/compiler/DispatchCreation/ConvertDispatchRegionsToWorkgroups.cpp index 7ea310b89bd0..55c011f099ba 100644 --- a/compiler/src/iree/compiler/DispatchCreation/ConvertDispatchRegionsToWorkgroups.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/ConvertDispatchRegionsToWorkgroups.cpp @@ -29,7 +29,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct ConvertDispatchRegionsToWorkgroupsPass - : public impl::ConvertDispatchRegionsToWorkgroupsPassBase< + : impl::ConvertDispatchRegionsToWorkgroupsPassBase< ConvertDispatchRegionsToWorkgroupsPass> { using Base::Base; void runOnOperation() override; diff --git a/compiler/src/iree/compiler/DispatchCreation/ConvertEncodingToFlow.cpp b/compiler/src/iree/compiler/DispatchCreation/ConvertEncodingToFlow.cpp index 6eda6bb5714e..e6f997fc5500 100644 --- a/compiler/src/iree/compiler/DispatchCreation/ConvertEncodingToFlow.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/ConvertEncodingToFlow.cpp @@ -22,7 +22,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct ConvertEncodingToFlowPass - : public impl::ConvertEncodingToFlowPassBase { + : impl::ConvertEncodingToFlowPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/ConvertTensorToFlow.cpp b/compiler/src/iree/compiler/DispatchCreation/ConvertTensorToFlow.cpp index 56eea555be8e..4de877b7de8e 100644 --- a/compiler/src/iree/compiler/DispatchCreation/ConvertTensorToFlow.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/ConvertTensorToFlow.cpp @@ -156,7 +156,7 @@ static FailureOr convertExtractSliceOps( namespace { struct ConvertTensorToFlowPass - : public impl::ConvertTensorToFlowPassBase { + : impl::ConvertTensorToFlowPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/ElementwiseOpFusion.cpp b/compiler/src/iree/compiler/DispatchCreation/ElementwiseOpFusion.cpp index c0bff40d7084..ec3a8ddfd228 100644 --- a/compiler/src/iree/compiler/DispatchCreation/ElementwiseOpFusion.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/ElementwiseOpFusion.cpp @@ -30,7 +30,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct ElementwiseOpFusionPass final - : public impl::ElementwiseOpFusionPassBase { + : impl::ElementwiseOpFusionPassBase { using Base::Base; void runOnOperation() override; }; @@ -56,7 +56,7 @@ static SmallVector applyProjectedPermutation(const SmallVectorImpl &input, // relationship between the two generics. This is because the indexing // is not affine (index values come from a tensor). namespace { -struct GatherFusionPattern final : public OpRewritePattern { +struct GatherFusionPattern final : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(tensor::ExtractOp extractOp, PatternRewriter &rewriter) const override { diff --git a/compiler/src/iree/compiler/DispatchCreation/FoldReshapesIntoTensorBarriers.cpp b/compiler/src/iree/compiler/DispatchCreation/FoldReshapesIntoTensorBarriers.cpp index 07c8353d3aea..73a11c745239 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FoldReshapesIntoTensorBarriers.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FoldReshapesIntoTensorBarriers.cpp @@ -19,7 +19,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { // Move tensor.expand_shape/collapse_shape above compute_barrier.start -struct MoveReshapeAboveBarrierStart : public RewritePattern { +struct MoveReshapeAboveBarrierStart : RewritePattern { MoveReshapeAboveBarrierStart(MLIRContext *context, PatternBenefit benefit = 1) : RewritePattern(MatchAnyOpTypeTag(), benefit, context) {} @@ -58,7 +58,7 @@ struct MoveReshapeAboveBarrierStart : public RewritePattern { // Move tensor.expand_shape/collapse_shape below compute_barrier.end struct MoveReshapeBelowBarrierEnd - : public OpRewritePattern { + : OpRewritePattern { using OpRewritePattern::OpRewritePattern; LogicalResult @@ -87,7 +87,7 @@ struct MoveReshapeBelowBarrierEnd }; struct FoldReshapesIntoTensorBarriersPass final - : public impl::FoldReshapesIntoTensorBarriersPassBase< + : impl::FoldReshapesIntoTensorBarriersPassBase< FoldReshapesIntoTensorBarriersPass> { using Base::Base; diff --git a/compiler/src/iree/compiler/DispatchCreation/FoldUnitExtentDims.cpp b/compiler/src/iree/compiler/DispatchCreation/FoldUnitExtentDims.cpp index e27822480663..319d5da74164 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FoldUnitExtentDims.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FoldUnitExtentDims.cpp @@ -455,13 +455,12 @@ foldUnitDimsOnGlobal(IRRewriter &rewriter, IREE::Util::GlobalOpInterface global, namespace { struct FoldUnitExtentDimsPass final - : public impl::FoldUnitExtentDimsPassBase { + : impl::FoldUnitExtentDimsPassBase { void runOnOperation() override; }; struct FoldUnitExtentDimsForFuncPass final - : public impl::FoldUnitExtentDimsForFuncPassBase< - FoldUnitExtentDimsForFuncPass> { + : impl::FoldUnitExtentDimsForFuncPassBase { void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/FormDispatchRegions.cpp b/compiler/src/iree/compiler/DispatchCreation/FormDispatchRegions.cpp index 11b98f42c0ff..712bfcf40074 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FormDispatchRegions.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FormDispatchRegions.cpp @@ -1044,7 +1044,7 @@ createFusionGroups(TensorDimTrackingRewriter &rewriter, namespace { /// Pass declaration. struct FormDispatchRegionsPass final - : public impl::FormDispatchRegionsPassBase { + : impl::FormDispatchRegionsPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/FormScalarDispatches.cpp b/compiler/src/iree/compiler/DispatchCreation/FormScalarDispatches.cpp index 859f9691e94c..a92d74974ee9 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FormScalarDispatches.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FormScalarDispatches.cpp @@ -29,7 +29,7 @@ namespace { /// Pass declaration. struct FormScalarDispatchesPass final - : public impl::FormScalarDispatchesPassBase { + : impl::FormScalarDispatchesPassBase { void runOnOperation() override; }; } // namespace diff --git a/compiler/src/iree/compiler/DispatchCreation/FormSplitReductionDispatches.cpp b/compiler/src/iree/compiler/DispatchCreation/FormSplitReductionDispatches.cpp index c8693ae22c5a..cfbf108b67ee 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FormSplitReductionDispatches.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FormSplitReductionDispatches.cpp @@ -30,7 +30,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct FormSplitReductionDispatchesPass final - : public impl::FormSplitReductionDispatchesPassBase< + : impl::FormSplitReductionDispatchesPassBase< FormSplitReductionDispatchesPass> { using Base::Base; void runOnOperation() override; diff --git a/compiler/src/iree/compiler/DispatchCreation/FuseHorizontalContractions.cpp b/compiler/src/iree/compiler/DispatchCreation/FuseHorizontalContractions.cpp index 4ba7f6b420b6..19b9dcdf7e05 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FuseHorizontalContractions.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FuseHorizontalContractions.cpp @@ -50,8 +50,7 @@ static bool operator!=(const linalg::ContractionDimensions &lhs, } struct FuseHorizontalContractionsPass final - : public impl::FuseHorizontalContractionsPassBase< - FuseHorizontalContractionsPass> { + : impl::FuseHorizontalContractionsPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/FuseMultiUseElementwiseProducer.cpp b/compiler/src/iree/compiler/DispatchCreation/FuseMultiUseElementwiseProducer.cpp index 3510b6209d4b..0b77919bb9e3 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FuseMultiUseElementwiseProducer.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FuseMultiUseElementwiseProducer.cpp @@ -261,7 +261,7 @@ namespace { /// Pass to fuse linalg on tensor operations as well as fusion of hal.interface* /// operations with linalg.tensor_reshape operation. struct FuseMultiUseElementwiseProducerPass final - : public impl::FuseMultiUseElementwiseProducerPassBase< + : impl::FuseMultiUseElementwiseProducerPassBase< FuseMultiUseElementwiseProducerPass> { using Base::Base; void runOnOperation() override; diff --git a/compiler/src/iree/compiler/DispatchCreation/FusionPreprocessing.cpp b/compiler/src/iree/compiler/DispatchCreation/FusionPreprocessing.cpp index 0136587fbed6..d7c7635a331e 100644 --- a/compiler/src/iree/compiler/DispatchCreation/FusionPreprocessing.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/FusionPreprocessing.cpp @@ -45,7 +45,7 @@ namespace { // If possible, interchange indexing maps to make input maps all identity. struct ElementwiseOpInterchangePattern final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(linalg::GenericOp genericOp, PatternRewriter &rewriter) const override { @@ -98,7 +98,7 @@ struct ElementwiseOpInterchangePattern final /// %3 = tensor.insert_slice %a into %2 /// ``` struct FoldSuccessiveTensorInsertSliceOps final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(tensor::InsertSliceOp sliceOp, PatternRewriter &rewriter) const override { @@ -149,7 +149,7 @@ struct FoldSuccessiveTensorInsertSliceOps final }; struct FusionPreprocessingPass final - : public impl::FusionPreprocessingPassBase { + : impl::FusionPreprocessingPassBase { void runOnOperation() override { RewritePatternSet patterns(&getContext()); patterns.add { + : impl::HoistEncodingOpsPassBase { using Base::Base; void runOnOperation() override; }; @@ -189,8 +189,7 @@ struct HoistEncodingOpsPass /// Pattern to bubble SetEncoding ops upwards through producers. This pattern /// runs until bubbling is not possible, or until the SetEncoding op is outside /// of a dispatch. -struct BubbleUpSetEncodingOp - : public OpRewritePattern { +struct BubbleUpSetEncodingOp : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(IREE::Encoding::SetEncodingOp encodingOp, @@ -215,8 +214,7 @@ struct BubbleUpSetEncodingOp }; /// Pattern to sink UnsetEncoding ops down through consumers. -struct SinkUnsetEncodingOp - : public OpRewritePattern { +struct SinkUnsetEncodingOp : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(IREE::Encoding::UnsetEncodingOp encodingOp, diff --git a/compiler/src/iree/compiler/DispatchCreation/HoistUniformScalarCompute.cpp b/compiler/src/iree/compiler/DispatchCreation/HoistUniformScalarCompute.cpp index bcd624f0eee4..e0c60964ef35 100644 --- a/compiler/src/iree/compiler/DispatchCreation/HoistUniformScalarCompute.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/HoistUniformScalarCompute.cpp @@ -41,7 +41,7 @@ static bool isUniformScalarForDispatch(Operation *op, Operation *dispatch) { namespace { struct HoistUniformScalarComputePass - : public DispatchCreation::impl::HoistUniformScalarComputePassBase< + : DispatchCreation::impl::HoistUniformScalarComputePassBase< HoistUniformScalarComputePass> { void runOnOperation() override { mlir::FunctionOpInterface funcOp = getOperation(); diff --git a/compiler/src/iree/compiler/DispatchCreation/InsertTensorBarriers.cpp b/compiler/src/iree/compiler/DispatchCreation/InsertTensorBarriers.cpp index 38e7e5a882d8..ba7c8252863b 100644 --- a/compiler/src/iree/compiler/DispatchCreation/InsertTensorBarriers.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/InsertTensorBarriers.cpp @@ -62,7 +62,7 @@ static void collectInputsToComputeRegion(Value val, } struct InsertTensorBarriersPass final - : public impl::InsertTensorBarriersPassBase { + : impl::InsertTensorBarriersPassBase { using Base::Base; void runOnOperation() override { diff --git a/compiler/src/iree/compiler/DispatchCreation/MaterializeDefaultWorkgroupCountRegion.cpp b/compiler/src/iree/compiler/DispatchCreation/MaterializeDefaultWorkgroupCountRegion.cpp index 1936ba45bc68..2dd0b67c4e08 100644 --- a/compiler/src/iree/compiler/DispatchCreation/MaterializeDefaultWorkgroupCountRegion.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/MaterializeDefaultWorkgroupCountRegion.cpp @@ -129,7 +129,7 @@ static LogicalResult createDefaultWorkgroupCountRegion( namespace { struct MaterializeDefaultWorkgroupCountRegionPass - : public impl::MaterializeDefaultWorkgroupCountRegionPassBase< + : impl::MaterializeDefaultWorkgroupCountRegionPassBase< MaterializeDefaultWorkgroupCountRegionPass> { using Base::Base; void runOnOperation() override; diff --git a/compiler/src/iree/compiler/DispatchCreation/Passes.h b/compiler/src/iree/compiler/DispatchCreation/Passes.h index ec95da796703..cc1f2b3ab707 100644 --- a/compiler/src/iree/compiler/DispatchCreation/Passes.h +++ b/compiler/src/iree/compiler/DispatchCreation/Passes.h @@ -23,7 +23,7 @@ enum class EncodingOptions { Padding, Generic }; // Pipelines //===----------------------------------------------------------------------===// -struct TransformOptions : public PassPipelineOptions { +struct TransformOptions : PassPipelineOptions { Option enableAggressiveFusion{ *this, "aggressive-fusion", diff --git a/compiler/src/iree/compiler/DispatchCreation/PropagateEncodings.cpp b/compiler/src/iree/compiler/DispatchCreation/PropagateEncodings.cpp index 9fd2b17c57f9..927e199556a7 100644 --- a/compiler/src/iree/compiler/DispatchCreation/PropagateEncodings.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/PropagateEncodings.cpp @@ -77,7 +77,7 @@ namespace { /// Pattern to swap `tensor.cast` -> `iree_encoding.set_encoding`. struct SwapEncodingOpWithTensorCastOp - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(IREE::Encoding::SetEncodingOp encodingOp, PatternRewriter &rewriter) const override { @@ -94,7 +94,7 @@ struct SwapEncodingOpWithTensorCastOp // TODO(#20179): Support the propagation through interfaces. It is supposed to // be done with data-flow analysis. struct PropagateEncodingsPass - : public DispatchCreation::impl::PropagateEncodingsPassBase< + : DispatchCreation::impl::PropagateEncodingsPassBase< PropagateEncodingsPass> { void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/RemoveTensorBarriers.cpp b/compiler/src/iree/compiler/DispatchCreation/RemoveTensorBarriers.cpp index f7e93c79e2b5..37f9311a4f35 100644 --- a/compiler/src/iree/compiler/DispatchCreation/RemoveTensorBarriers.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/RemoveTensorBarriers.cpp @@ -16,7 +16,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { struct RemoveTensorBarriersPass final - : public impl::RemoveTensorBarriersPassBase { + : impl::RemoveTensorBarriersPassBase { using Base::Base; void runOnOperation() override { diff --git a/compiler/src/iree/compiler/DispatchCreation/SetSplitReductionSizes.cpp b/compiler/src/iree/compiler/DispatchCreation/SetSplitReductionSizes.cpp index 6b6fdb49b7ec..ec99af62e80d 100644 --- a/compiler/src/iree/compiler/DispatchCreation/SetSplitReductionSizes.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/SetSplitReductionSizes.cpp @@ -445,7 +445,7 @@ getArgCompareReductionSizes(PartialReductionOpInterface op, } struct SetSplitReductionSizesPass final - : public impl::SetSplitReductionSizesPassBase { + : impl::SetSplitReductionSizesPassBase { using Base::Base; void runOnOperation() override { // Skip pass if no target is set. diff --git a/compiler/src/iree/compiler/DispatchCreation/SinkReshapes.cpp b/compiler/src/iree/compiler/DispatchCreation/SinkReshapes.cpp index fa3e4499e0b9..40a641bda719 100644 --- a/compiler/src/iree/compiler/DispatchCreation/SinkReshapes.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/SinkReshapes.cpp @@ -37,8 +37,7 @@ namespace mlir::iree_compiler::DispatchCreation { namespace { -struct SinkReshapesPass final - : public impl::SinkReshapesPassBase { +struct SinkReshapesPass final : impl::SinkReshapesPassBase { using Base::Base; void runOnOperation() override; }; diff --git a/compiler/src/iree/compiler/DispatchCreation/SplitReduction.cpp b/compiler/src/iree/compiler/DispatchCreation/SplitReduction.cpp index 85619157e1a6..143e7f00529b 100644 --- a/compiler/src/iree/compiler/DispatchCreation/SplitReduction.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/SplitReduction.cpp @@ -75,7 +75,7 @@ static LogicalResult splitReductionOnMatmul( namespace { struct SplitReductionPass final - : public impl::SplitReductionPassBase { + : impl::SplitReductionPassBase { void runOnOperation() override { if (splitMatmulReductionRatio.getValue() <= 1 && topkSplitReductionRatio.empty() && diff --git a/compiler/src/iree/compiler/DispatchCreation/TensorPadToTensorInsertSlice.cpp b/compiler/src/iree/compiler/DispatchCreation/TensorPadToTensorInsertSlice.cpp index dceb76824250..d711fe15bbb4 100644 --- a/compiler/src/iree/compiler/DispatchCreation/TensorPadToTensorInsertSlice.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/TensorPadToTensorInsertSlice.cpp @@ -34,7 +34,7 @@ namespace { /// Pattern to convert a tensor.tensor operation into a fill + /// tensor.insert_slice. This is needed till tensor.pad op can be fused with its /// consumers. -struct TensorPadOpConversion : public OpRewritePattern { +struct TensorPadOpConversion : OpRewritePattern { using Base::Base; TensorPadOpConversion(MLIRContext *context, bool skipSingleLinalgOpUses) : OpRewritePattern(context, skipSingleLinalgOpUses), @@ -90,7 +90,7 @@ struct TensorPadOpConversion : public OpRewritePattern { }; struct TensorPadToTensorInsertSlicePass final - : public impl::TensorPadToTensorInsertSlicePassBase< + : impl::TensorPadToTensorInsertSlicePassBase< TensorPadToTensorInsertSlicePass> { using Base::Base; void runOnOperation() override { diff --git a/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp b/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp index fe1f107eb9dc..1a43f2b3907e 100644 --- a/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp @@ -30,7 +30,7 @@ namespace { /// For generic ops that are reduction, make the reduction the innermost /// dimension. struct MakeReductionInnermostPattern final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(linalg::GenericOp genericOp, PatternRewriter &rewriter) const override { @@ -65,8 +65,7 @@ struct MakeReductionInnermostPattern final /// ops), the dispatch region fusion logic requires the indexing maps to be /// identity (or projections that are not transposing as well). This pattern /// fixes up elementwise operations for which that is not the case. -struct TransposeGenericOpPattern final - : public OpRewritePattern { +struct TransposeGenericOpPattern final : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(linalg::GenericOp genericOp, PatternRewriter &rewriter) const override { @@ -122,7 +121,7 @@ struct TransposeGenericOpPattern final /// Normalize the order of reduction dimensions in generic ops to make them /// appear in ascending order in the indexing maps. struct NormalizeReductionDimsPattern final - : public OpRewritePattern { + : OpRewritePattern { using Base::Base; LogicalResult matchAndRewrite(linalg::GenericOp genericOp, PatternRewriter &rewriter) const override { @@ -185,7 +184,7 @@ struct NormalizeReductionDimsPattern final }; struct TransposeGenericOpsPass final - : public impl::TransposeGenericOpsPassBase { + : impl::TransposeGenericOpsPassBase { void runOnOperation() override { RewritePatternSet patterns(&getContext()); patterns.add