[Mlir-commits] [mlir] be0a7e9 - Adjust "end namespace" comment in MLIR to match new agree'd coding style
Mehdi Amini
llvmlistbot at llvm.org
Tue Dec 7 22:05:44 PST 2021
Author: Mehdi Amini
Date: 2021-12-08T06:05:26Z
New Revision: be0a7e9f27083ada6072fcc0711ffa5630daa5ec
URL: https://github.com/llvm/llvm-project/commit/be0a7e9f27083ada6072fcc0711ffa5630daa5ec
DIFF: https://github.com/llvm/llvm-project/commit/be0a7e9f27083ada6072fcc0711ffa5630daa5ec.diff
LOG: Adjust "end namespace" comment in MLIR to match new agree'd coding style
See D115115 and this mailing list discussion:
https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html
Differential Revision: https://reviews.llvm.org/D115309
Added:
Modified:
mlir/docs/PassManagement.md
mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
mlir/examples/toy/Ch4/include/toy/Passes.h
mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
mlir/examples/toy/Ch5/include/toy/Passes.h
mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
mlir/examples/toy/Ch6/include/toy/Passes.h
mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
mlir/examples/toy/Ch7/include/toy/Dialect.h
mlir/examples/toy/Ch7/include/toy/Passes.h
mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
mlir/examples/toy/Ch7/mlir/Dialect.cpp
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
mlir/include/mlir/Analysis/AffineAnalysis.h
mlir/include/mlir/Analysis/AffineStructures.h
mlir/include/mlir/Analysis/AliasAnalysis.h
mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h
mlir/include/mlir/Analysis/CallGraph.h
mlir/include/mlir/Analysis/DataFlowAnalysis.h
mlir/include/mlir/Analysis/Liveness.h
mlir/include/mlir/Analysis/LoopAnalysis.h
mlir/include/mlir/Analysis/NestedMatcher.h
mlir/include/mlir/Analysis/NumberOfExecutions.h
mlir/include/mlir/Analysis/SliceAnalysis.h
mlir/include/mlir/Analysis/Utils.h
mlir/include/mlir/CAPI/Utils.h
mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h
mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h
mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
mlir/include/mlir/Dialect/Affine/Passes.h
mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h
mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.h
mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
mlir/include/mlir/Dialect/GPU/GPUDialect.h
mlir/include/mlir/Dialect/GPU/MemoryPromotion.h
mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
mlir/include/mlir/Dialect/OpenACC/OpenACC.h
mlir/include/mlir/Dialect/SCF/SCF.h
mlir/include/mlir/Dialect/SCF/Utils.h
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h
mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
mlir/include/mlir/Dialect/Traits.h
mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
mlir/include/mlir/Dialect/Vector/VectorOps.h
mlir/include/mlir/Dialect/Vector/VectorUtils.h
mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
mlir/include/mlir/ExecutionEngine/OptUtils.h
mlir/include/mlir/IR/AffineExprVisitor.h
mlir/include/mlir/IR/AffineMap.h
mlir/include/mlir/IR/AsmState.h
mlir/include/mlir/IR/AttributeSupport.h
mlir/include/mlir/IR/Attributes.h
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/BlockAndValueMapping.h
mlir/include/mlir/IR/BlockSupport.h
mlir/include/mlir/IR/BuiltinAttributeInterfaces.h
mlir/include/mlir/IR/BuiltinAttributes.h
mlir/include/mlir/IR/BuiltinOps.h
mlir/include/mlir/IR/BuiltinTypes.h
mlir/include/mlir/IR/Diagnostics.h
mlir/include/mlir/IR/Dialect.h
mlir/include/mlir/IR/DialectImplementation.h
mlir/include/mlir/IR/DialectInterface.h
mlir/include/mlir/IR/Dominance.h
mlir/include/mlir/IR/FunctionSupport.h
mlir/include/mlir/IR/Identifier.h
mlir/include/mlir/IR/IntegerSet.h
mlir/include/mlir/IR/Location.h
mlir/include/mlir/IR/MLIRContext.h
mlir/include/mlir/IR/Matchers.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/OpImplementation.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/OperationSupport.h
mlir/include/mlir/IR/OwningOpRef.h
mlir/include/mlir/IR/PatternMatch.h
mlir/include/mlir/IR/Region.h
mlir/include/mlir/IR/SymbolTable.h
mlir/include/mlir/IR/Threading.h
mlir/include/mlir/IR/TypeSupport.h
mlir/include/mlir/IR/TypeUtilities.h
mlir/include/mlir/IR/Types.h
mlir/include/mlir/IR/Value.h
mlir/include/mlir/IR/Verifier.h
mlir/include/mlir/IR/Visitors.h
mlir/include/mlir/Interfaces/CallInterfaces.h
mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
mlir/include/mlir/Interfaces/FoldInterfaces.h
mlir/include/mlir/Interfaces/SideEffectInterfaces.h
mlir/include/mlir/Parser.h
mlir/include/mlir/Parser/AsmParserState.h
mlir/include/mlir/Pass/AnalysisManager.h
mlir/include/mlir/Pass/Pass.h
mlir/include/mlir/Pass/PassInstrumentation.h
mlir/include/mlir/Pass/PassManager.h
mlir/include/mlir/Pass/PassOptions.h
mlir/include/mlir/Pass/PassRegistry.h
mlir/include/mlir/Reducer/PassDetail.h
mlir/include/mlir/Reducer/Passes.h
mlir/include/mlir/Reducer/ReductionNode.h
mlir/include/mlir/Reducer/ReductionPatternInterface.h
mlir/include/mlir/Reducer/Tester.h
mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
mlir/include/mlir/Rewrite/PatternApplicator.h
mlir/include/mlir/Support/DebugAction.h
mlir/include/mlir/Support/InterfaceSupport.h
mlir/include/mlir/Support/LLVM.h
mlir/include/mlir/Support/MathExtras.h
mlir/include/mlir/Support/MlirOptMain.h
mlir/include/mlir/Support/StorageUniquer.h
mlir/include/mlir/Support/ThreadLocalCache.h
mlir/include/mlir/Support/TypeID.h
mlir/include/mlir/TableGen/Argument.h
mlir/include/mlir/TableGen/AttrOrTypeDef.h
mlir/include/mlir/TableGen/Attribute.h
mlir/include/mlir/TableGen/Builder.h
mlir/include/mlir/TableGen/Class.h
mlir/include/mlir/TableGen/CodeGenHelpers.h
mlir/include/mlir/TableGen/Constraint.h
mlir/include/mlir/TableGen/Dialect.h
mlir/include/mlir/TableGen/Format.h
mlir/include/mlir/TableGen/GenInfo.h
mlir/include/mlir/TableGen/GenNameParser.h
mlir/include/mlir/TableGen/Interfaces.h
mlir/include/mlir/TableGen/Operator.h
mlir/include/mlir/TableGen/Pass.h
mlir/include/mlir/TableGen/Pattern.h
mlir/include/mlir/TableGen/Predicate.h
mlir/include/mlir/TableGen/Region.h
mlir/include/mlir/TableGen/SideEffects.h
mlir/include/mlir/TableGen/Successor.h
mlir/include/mlir/TableGen/Trait.h
mlir/include/mlir/TableGen/Type.h
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
mlir/include/mlir/Target/SPIRV/Deserialization.h
mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
mlir/include/mlir/Target/SPIRV/Serialization.h
mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h
mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h
mlir/include/mlir/Transforms/BufferUtils.h
mlir/include/mlir/Transforms/DialectConversion.h
mlir/include/mlir/Transforms/FoldUtils.h
mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
mlir/include/mlir/Transforms/InliningUtils.h
mlir/include/mlir/Transforms/LocationSnapshot.h
mlir/include/mlir/Transforms/LoopFusionUtils.h
mlir/include/mlir/Transforms/LoopUtils.h
mlir/include/mlir/Transforms/Passes.h
mlir/include/mlir/Transforms/Utils.h
mlir/include/mlir/Transforms/ViewOpGraph.h
mlir/lib/Analysis/AffineStructures.cpp
mlir/lib/Analysis/DataFlowAnalysis.cpp
mlir/lib/Analysis/NestedMatcher.cpp
mlir/lib/Analysis/Presburger/Simplex.cpp
mlir/lib/Bindings/Python/ExecutionEngineModule.cpp
mlir/lib/Bindings/Python/IRAffine.cpp
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/Bindings/Python/Pass.cpp
mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp
mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
mlir/lib/Conversion/PDLToPDLInterp/Predicate.h
mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.h
mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h
mlir/lib/Conversion/PassDetail.h
mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
mlir/lib/Conversion/SPIRVCommon/Pattern.h
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
mlir/lib/Dialect/Affine/Transforms/PassDetail.h
mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp
mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp
mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
mlir/lib/Dialect/Async/Transforms/PassDetail.h
mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/Dialect/GPU/Transforms/PassDetail.h
mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h
mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
mlir/lib/Dialect/Linalg/Transforms/PassDetail.h
mlir/lib/Dialect/Math/IR/MathDialect.cpp
mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
mlir/lib/Dialect/Quant/Transforms/PassDetail.h
mlir/lib/Dialect/SCF/SCF.cpp
mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
mlir/lib/Dialect/SCF/Transforms/PassDetail.h
mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp
mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h
mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp
mlir/lib/Dialect/Shape/Transforms/PassDetail.h
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
mlir/lib/Dialect/Tensor/Transforms/PassDetail.h
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
mlir/lib/Dialect/Vector/VectorOps.cpp
mlir/lib/ExecutionEngine/JitRunner.cpp
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
mlir/lib/IR/AffineExprDetail.h
mlir/lib/IR/AffineMap.cpp
mlir/lib/IR/AffineMapDetail.h
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/BuiltinDialect.cpp
mlir/lib/IR/Diagnostics.cpp
mlir/lib/IR/Dialect.cpp
mlir/lib/IR/IntegerSetDetail.h
mlir/lib/IR/MLIRContext.cpp
mlir/lib/IR/SymbolTable.cpp
mlir/lib/IR/Verifier.cpp
mlir/lib/Parser/AffineParser.cpp
mlir/lib/Parser/AsmParserImpl.h
mlir/lib/Parser/AttributeParser.cpp
mlir/lib/Parser/Lexer.h
mlir/lib/Parser/Parser.cpp
mlir/lib/Parser/Parser.h
mlir/lib/Parser/ParserState.h
mlir/lib/Parser/Token.h
mlir/lib/Pass/IRPrinting.cpp
mlir/lib/Pass/Pass.cpp
mlir/lib/Pass/PassCrashRecovery.cpp
mlir/lib/Pass/PassDetail.h
mlir/lib/Pass/PassManagerOptions.cpp
mlir/lib/Pass/PassRegistry.cpp
mlir/lib/Pass/PassStatistics.cpp
mlir/lib/Reducer/OptReductionPass.cpp
mlir/lib/Reducer/ReductionTreePass.cpp
mlir/lib/Rewrite/ByteCode.cpp
mlir/lib/Rewrite/ByteCode.h
mlir/lib/Support/DebugCounter.cpp
mlir/lib/Support/StorageUniquer.cpp
mlir/lib/Support/Timing.cpp
mlir/lib/TableGen/Class.cpp
mlir/lib/TableGen/Predicate.cpp
mlir/lib/Target/LLVMIR/DebugTranslation.h
mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp
mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
mlir/lib/Target/LLVMIR/TypeToLLVM.cpp
mlir/lib/Transforms/BufferOptimizations.cpp
mlir/lib/Transforms/BufferResultsToOutParams.cpp
mlir/lib/Transforms/CSE.cpp
mlir/lib/Transforms/Canonicalizer.cpp
mlir/lib/Transforms/Inliner.cpp
mlir/lib/Transforms/LocationSnapshot.cpp
mlir/lib/Transforms/LoopFusion.cpp
mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
mlir/lib/Transforms/NormalizeMemRefs.cpp
mlir/lib/Transforms/PassDetail.h
mlir/lib/Transforms/PipelineDataTransfer.cpp
mlir/lib/Transforms/SCCP.cpp
mlir/lib/Transforms/StripDebugInfo.cpp
mlir/lib/Transforms/SymbolDCE.cpp
mlir/lib/Transforms/Utils/DialectConversion.cpp
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
mlir/lib/Transforms/Utils/RegionUtils.cpp
mlir/test/APITest.h
mlir/test/lib/Analysis/TestAliasAnalysis.cpp
mlir/test/lib/Analysis/TestCallGraph.cpp
mlir/test/lib/Analysis/TestLiveness.cpp
mlir/test/lib/Analysis/TestMatchReduction.cpp
mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp
mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp
mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp
mlir/test/lib/Analysis/TestNumberOfExecutions.cpp
mlir/test/lib/Analysis/TestSlice.cpp
mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp
mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp
mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp
mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp
mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp
mlir/test/lib/Dialect/Math/TestExpandTanh.cpp
mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp
mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp
mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestDialect.h
mlir/test/lib/Dialect/Test/TestPatterns.cpp
mlir/test/lib/Dialect/Test/TestTraits.cpp
mlir/test/lib/Dialect/Test/TestTypes.h
mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp
mlir/test/lib/IR/TestDiagnostics.cpp
mlir/test/lib/IR/TestDominance.cpp
mlir/test/lib/IR/TestFunc.cpp
mlir/test/lib/IR/TestInterfaces.cpp
mlir/test/lib/IR/TestMatchers.cpp
mlir/test/lib/IR/TestOpaqueLoc.cpp
mlir/test/lib/IR/TestOperationEquals.cpp
mlir/test/lib/IR/TestPrintDefUse.cpp
mlir/test/lib/IR/TestPrintNesting.cpp
mlir/test/lib/IR/TestSideEffects.cpp
mlir/test/lib/IR/TestSymbolUses.cpp
mlir/test/lib/IR/TestVisitors.cpp
mlir/test/lib/Pass/TestPassManager.cpp
mlir/test/lib/Reducer/MLIRTestReducer.cpp
mlir/test/lib/Rewrite/TestPDLByteCode.cpp
mlir/test/lib/Transforms/TestConstantFold.cpp
mlir/test/lib/Transforms/TestInlining.cpp
mlir/test/lib/Transforms/TestLoopFusion.cpp
mlir/test/mlir-tblgen/attrdefs.td
mlir/test/mlir-tblgen/default-type-attr-print-parser.td
mlir/test/mlir-tblgen/typedefs.td
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h
mlir/tools/mlir-tblgen/DialectGen.cpp
mlir/tools/mlir-tblgen/FormatGen.h
mlir/tools/mlir-tblgen/OpClass.h
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/tools/mlir-tblgen/OpFormatGen.cpp
mlir/tools/mlir-tblgen/OpFormatGen.h
mlir/tools/mlir-tblgen/OpGenHelpers.h
mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
mlir/tools/mlir-tblgen/RewriterGen.cpp
mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp
mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
mlir/unittests/IR/AttributeTest.cpp
mlir/unittests/IR/DialectTest.cpp
mlir/unittests/IR/InterfaceAttachmentTest.cpp
mlir/unittests/IR/OperationSupportTest.cpp
mlir/unittests/IR/ShapedTypeTest.cpp
mlir/unittests/IR/SubElementInterfaceTest.cpp
mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
mlir/unittests/Pass/AnalysisManagerTest.cpp
mlir/unittests/Pass/PassManagerTest.cpp
Removed:
################################################################################
diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md
index a3920732e109..577cd81f40a1 100644
--- a/mlir/docs/PassManagement.md
+++ b/mlir/docs/PassManagement.md
@@ -82,7 +82,7 @@ struct MyFunctionPass : public PassWrapper<MyFunctionPass,
});
}
};
-} // end anonymous namespace
+} // namespace
/// Register this pass so that it can be built via from a textual pass pipeline.
/// (Pass registration is discussed more below)
diff --git a/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
index 5e74d95d573b..01bd10c2fd17 100644
--- a/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
@@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
-} // end anonymous namespace
+} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x
diff --git a/mlir/examples/toy/Ch4/include/toy/Passes.h b/mlir/examples/toy/Ch4/include/toy/Passes.h
index 14508014eabe..b95e0f095b9f 100644
--- a/mlir/examples/toy/Ch4/include/toy/Passes.h
+++ b/mlir/examples/toy/Ch4/include/toy/Passes.h
@@ -20,7 +20,7 @@ class Pass;
namespace toy {
std::unique_ptr<Pass> createShapeInferencePass();
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H
diff --git a/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h b/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
index c0148ff169cc..cfe5a872e7d6 100644
--- a/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
+++ b/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
@@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_
diff --git a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
index f9f32c22f8d4..d35679cb55ce 100644
--- a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
@@ -105,7 +105,7 @@ class ShapeInferencePass
});
}
};
-} // end anonymous namespace
+} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {
diff --git a/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
index 5e74d95d573b..01bd10c2fd17 100644
--- a/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
@@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
-} // end anonymous namespace
+} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x
diff --git a/mlir/examples/toy/Ch5/include/toy/Passes.h b/mlir/examples/toy/Ch5/include/toy/Passes.h
index 6f07ba64f779..2f496364b62a 100644
--- a/mlir/examples/toy/Ch5/include/toy/Passes.h
+++ b/mlir/examples/toy/Ch5/include/toy/Passes.h
@@ -25,7 +25,7 @@ std::unique_ptr<Pass> createShapeInferencePass();
/// for a subset of the Toy IR (e.g. matmul).
std::unique_ptr<mlir::Pass> createLowerToAffinePass();
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H
diff --git a/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h b/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
index c0148ff169cc..cfe5a872e7d6 100644
--- a/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
+++ b/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
@@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_
diff --git a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
index 4a03534b502d..8ac869df8c66 100644
--- a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
@@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
-} // end anonymous namespace.
+} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
-} // end anonymous namespace.
+} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();
diff --git a/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
index f9f32c22f8d4..d35679cb55ce 100644
--- a/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
@@ -105,7 +105,7 @@ class ShapeInferencePass
});
}
};
-} // end anonymous namespace
+} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {
diff --git a/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
index 5e74d95d573b..01bd10c2fd17 100644
--- a/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
@@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
-} // end anonymous namespace
+} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x
diff --git a/mlir/examples/toy/Ch6/include/toy/Passes.h b/mlir/examples/toy/Ch6/include/toy/Passes.h
index e878d71d711c..b52f236f81e0 100644
--- a/mlir/examples/toy/Ch6/include/toy/Passes.h
+++ b/mlir/examples/toy/Ch6/include/toy/Passes.h
@@ -29,7 +29,7 @@ std::unique_ptr<mlir::Pass> createLowerToAffinePass();
/// well as `Affine` and `Std`, to the LLVM dialect for codegen.
std::unique_ptr<mlir::Pass> createLowerToLLVMPass();
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H
diff --git a/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h b/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
index c0148ff169cc..cfe5a872e7d6 100644
--- a/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
+++ b/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
@@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_
diff --git a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
index 4a03534b502d..8ac869df8c66 100644
--- a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
@@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
-} // end anonymous namespace.
+} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
-} // end anonymous namespace.
+} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();
diff --git a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
index c21f9d77b240..648b9e87e1f8 100644
--- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
@@ -160,7 +160,7 @@ class PrintOpLowering : public ConversionPattern {
globalPtr, ArrayRef<Value>({cst0, cst0}));
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ToyToLLVMLoweringPass
@@ -174,7 +174,7 @@ struct ToyToLLVMLoweringPass
}
void runOnOperation() final;
};
-} // end anonymous namespace
+} // namespace
void ToyToLLVMLoweringPass::runOnOperation() {
// The first thing to define is the conversion target. This will define the
diff --git a/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
index f9f32c22f8d4..d35679cb55ce 100644
--- a/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
@@ -105,7 +105,7 @@ class ShapeInferencePass
});
}
};
-} // end anonymous namespace
+} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {
diff --git a/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
index 5e74d95d573b..01bd10c2fd17 100644
--- a/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
@@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
-} // end anonymous namespace
+} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x
diff --git a/mlir/examples/toy/Ch7/include/toy/Dialect.h b/mlir/examples/toy/Ch7/include/toy/Dialect.h
index 0b88244dc6ef..57e9d134e500 100644
--- a/mlir/examples/toy/Ch7/include/toy/Dialect.h
+++ b/mlir/examples/toy/Ch7/include/toy/Dialect.h
@@ -25,9 +25,9 @@ namespace mlir {
namespace toy {
namespace detail {
struct StructTypeStorage;
-} // end namespace detail
-} // end namespace toy
-} // end namespace mlir
+} // namespace detail
+} // namespace toy
+} // namespace mlir
/// Include the auto-generated header file containing the declaration of the toy
/// dialect.
@@ -70,7 +70,7 @@ class StructType : public mlir::Type::TypeBase<StructType, mlir::Type,
/// Returns the number of element type held by this struct.
size_t getNumElementTypes() { return getElementTypes().size(); }
};
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_DIALECT_H_
diff --git a/mlir/examples/toy/Ch7/include/toy/Passes.h b/mlir/examples/toy/Ch7/include/toy/Passes.h
index e878d71d711c..b52f236f81e0 100644
--- a/mlir/examples/toy/Ch7/include/toy/Passes.h
+++ b/mlir/examples/toy/Ch7/include/toy/Passes.h
@@ -29,7 +29,7 @@ std::unique_ptr<mlir::Pass> createLowerToAffinePass();
/// well as `Affine` and `Std`, to the LLVM dialect for codegen.
std::unique_ptr<mlir::Pass> createLowerToLLVMPass();
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H
diff --git a/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h b/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
index c0148ff169cc..cfe5a872e7d6 100644
--- a/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
+++ b/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
@@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
-} // end namespace toy
-} // end namespace mlir
+} // namespace toy
+} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_
diff --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
index 285d19c03f9f..8b63c0bdeaec 100644
--- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
@@ -461,9 +461,9 @@ struct StructTypeStorage : public mlir::TypeStorage {
/// The following field contains the element types of the struct.
llvm::ArrayRef<mlir::Type> elementTypes;
};
-} // end namespace detail
-} // end namespace toy
-} // end namespace mlir
+} // namespace detail
+} // namespace toy
+} // namespace mlir
/// Create an instance of a `StructType` with the given element types. There
/// *must* be at least one element type.
diff --git a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
index 4a03534b502d..8ac869df8c66 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
@@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
-} // end anonymous namespace.
+} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
-} // end anonymous namespace.
+} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();
diff --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
index c21f9d77b240..648b9e87e1f8 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
@@ -160,7 +160,7 @@ class PrintOpLowering : public ConversionPattern {
globalPtr, ArrayRef<Value>({cst0, cst0}));
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ToyToLLVMLoweringPass
@@ -174,7 +174,7 @@ struct ToyToLLVMLoweringPass
}
void runOnOperation() final;
};
-} // end anonymous namespace
+} // namespace
void ToyToLLVMLoweringPass::runOnOperation() {
// The first thing to define is the conversion target. This will define the
diff --git a/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
index f9f32c22f8d4..d35679cb55ce 100644
--- a/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
@@ -105,7 +105,7 @@ class ShapeInferencePass
});
}
};
-} // end anonymous namespace
+} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {
diff --git a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
index 95072eeef1d2..11dba6f55c4a 100644
--- a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
@@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
-} // end anonymous namespace
+} // namespace
/// Fold constants.
OpFoldResult ConstantOp::fold(ArrayRef<Attribute> operands) { return value(); }
diff --git a/mlir/include/mlir/Analysis/AffineAnalysis.h b/mlir/include/mlir/Analysis/AffineAnalysis.h
index 98b02609724a..120a5be4596a 100644
--- a/mlir/include/mlir/Analysis/AffineAnalysis.h
+++ b/mlir/include/mlir/Analysis/AffineAnalysis.h
@@ -182,6 +182,6 @@ void getDependenceComponents(
AffineForOp forOp, unsigned maxLoopDepth,
std::vector<SmallVector<DependenceComponent, 2>> *depCompsVec);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_AFFINE_ANALYSIS_H
diff --git a/mlir/include/mlir/Analysis/AffineStructures.h b/mlir/include/mlir/Analysis/AffineStructures.h
index 0f763f833f50..8235f03c470b 100644
--- a/mlir/include/mlir/Analysis/AffineStructures.h
+++ b/mlir/include/mlir/Analysis/AffineStructures.h
@@ -1088,6 +1088,6 @@ LogicalResult getRelationFromMap(AffineMap &map, FlatAffineRelation &rel);
LogicalResult getRelationFromMap(const AffineValueMap &map,
FlatAffineRelation &rel);
-} // end namespace mlir.
+} // namespace mlir.
#endif // MLIR_ANALYSIS_AFFINESTRUCTURES_H
diff --git a/mlir/include/mlir/Analysis/AliasAnalysis.h b/mlir/include/mlir/Analysis/AliasAnalysis.h
index 925af24ddd69..3ff9e8e45cc3 100644
--- a/mlir/include/mlir/Analysis/AliasAnalysis.h
+++ b/mlir/include/mlir/Analysis/AliasAnalysis.h
@@ -212,7 +212,7 @@ struct AliasAnalysisTraits {
ImplT impl;
};
};
-} // end namespace detail
+} // namespace detail
//===----------------------------------------------------------------------===//
// AliasAnalysis
@@ -278,6 +278,6 @@ class AliasAnalysis {
SmallVector<std::unique_ptr<Concept>, 4> aliasImpls;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_ALIASANALYSIS_H_
diff --git a/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h b/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h
index d8bf933d81f8..9669a3c13b24 100644
--- a/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h
+++ b/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h
@@ -29,6 +29,6 @@ class LocalAliasAnalysis {
/// Return the modify-reference behavior of `op` on `location`.
ModRefResult getModRef(Operation *op, Value location);
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_ALIASANALYSIS_LOCALALIASANALYSIS_H_
diff --git a/mlir/include/mlir/Analysis/CallGraph.h b/mlir/include/mlir/Analysis/CallGraph.h
index c2b6717e6b7f..9238b95ccc0c 100644
--- a/mlir/include/mlir/Analysis/CallGraph.h
+++ b/mlir/include/mlir/Analysis/CallGraph.h
@@ -216,7 +216,7 @@ class CallGraph {
CallGraphNode externalNode;
};
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
// Provide graph traits for traversing call graphs using standard graph
@@ -253,6 +253,6 @@ struct GraphTraits<const mlir::CallGraph *>
static nodes_iterator nodes_begin(mlir::CallGraph *cg) { return cg->begin(); }
static nodes_iterator nodes_end(mlir::CallGraph *cg) { return cg->end(); }
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_ANALYSIS_CALLGRAPH_H
diff --git a/mlir/include/mlir/Analysis/DataFlowAnalysis.h b/mlir/include/mlir/Analysis/DataFlowAnalysis.h
index 7566c4d21b82..29a610e7aa10 100644
--- a/mlir/include/mlir/Analysis/DataFlowAnalysis.h
+++ b/mlir/include/mlir/Analysis/DataFlowAnalysis.h
@@ -396,6 +396,6 @@ class ForwardDataFlowAnalysis : public detail::ForwardDataFlowAnalysisBase {
MLIRContext *context;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_DATAFLOWANALYSIS_H
diff --git a/mlir/include/mlir/Analysis/Liveness.h b/mlir/include/mlir/Analysis/Liveness.h
index 8c32a0ffda7e..74891520139d 100644
--- a/mlir/include/mlir/Analysis/Liveness.h
+++ b/mlir/include/mlir/Analysis/Liveness.h
@@ -142,6 +142,6 @@ class LivenessBlockInfo {
friend class Liveness;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_LIVENESS_H
diff --git a/mlir/include/mlir/Analysis/LoopAnalysis.h b/mlir/include/mlir/Analysis/LoopAnalysis.h
index 41c0e7c82255..3797398e58e0 100644
--- a/mlir/include/mlir/Analysis/LoopAnalysis.h
+++ b/mlir/include/mlir/Analysis/LoopAnalysis.h
@@ -113,6 +113,6 @@ bool isOpwiseShiftValid(AffineForOp forOp, ArrayRef<uint64_t> shifts);
/// reductions not covered by this generic matching.
Value matchReduction(ArrayRef<BlockArgument> iterCarriedArgs, unsigned redPos,
SmallVectorImpl<Operation *> &combinerOps);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_LOOP_ANALYSIS_H
diff --git a/mlir/include/mlir/Analysis/NestedMatcher.h b/mlir/include/mlir/Analysis/NestedMatcher.h
index 1587a4ea1313..f0a7088bd8fc 100644
--- a/mlir/include/mlir/Analysis/NestedMatcher.h
+++ b/mlir/include/mlir/Analysis/NestedMatcher.h
@@ -195,7 +195,7 @@ bool isParallelLoop(Operation &op);
bool isReductionLoop(Operation &op);
bool isLoadOrStore(Operation &op);
-} // end namespace matcher
-} // end namespace mlir
+} // namespace matcher
+} // namespace mlir
#endif // MLIR_ANALYSIS_MLFUNCTIONMATCHER_H_
diff --git a/mlir/include/mlir/Analysis/NumberOfExecutions.h b/mlir/include/mlir/Analysis/NumberOfExecutions.h
index aa3080431cf6..a9508057815c 100644
--- a/mlir/include/mlir/Analysis/NumberOfExecutions.h
+++ b/mlir/include/mlir/Analysis/NumberOfExecutions.h
@@ -102,6 +102,6 @@ class BlockNumberOfExecutionsInfo {
Optional<int64_t> numberOfBlockExecutions;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_NUMBER_OF_EXECUTIONS_H
diff --git a/mlir/include/mlir/Analysis/SliceAnalysis.h b/mlir/include/mlir/Analysis/SliceAnalysis.h
index 26646858a3b9..fa5409260c42 100644
--- a/mlir/include/mlir/Analysis/SliceAnalysis.h
+++ b/mlir/include/mlir/Analysis/SliceAnalysis.h
@@ -205,6 +205,6 @@ getSlice(Operation *op,
/// Returns a topologically sorted SetVector.
SetVector<Operation *> topologicalSort(const SetVector<Operation *> &toSort);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_SLICEANALYSIS_H_
diff --git a/mlir/include/mlir/Analysis/Utils.h b/mlir/include/mlir/Analysis/Utils.h
index d1d2218b8c01..7c5b5b1d2aa0 100644
--- a/mlir/include/mlir/Analysis/Utils.h
+++ b/mlir/include/mlir/Analysis/Utils.h
@@ -380,6 +380,6 @@ unsigned getInnermostCommonLoopDepth(
ArrayRef<Operation *> ops,
SmallVectorImpl<AffineForOp> *surroundingLoops = nullptr);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_ANALYSIS_UTILS_H
diff --git a/mlir/include/mlir/CAPI/Utils.h b/mlir/include/mlir/CAPI/Utils.h
index c2e43850c2b6..000516e7a85f 100644
--- a/mlir/include/mlir/CAPI/Utils.h
+++ b/mlir/include/mlir/CAPI/Utils.h
@@ -45,7 +45,7 @@ class CallbackOstream : public llvm::raw_ostream {
void *opaqueData;
uint64_t pos;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_CAPI_UTILS_H
diff --git a/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h b/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h
index 886efb811c9c..aa18558cf344 100644
--- a/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h
+++ b/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h
@@ -22,7 +22,7 @@ void populateArithmeticToLLVMConversionPatterns(LLVMTypeConverter &converter,
RewritePatternSet &patterns);
std::unique_ptr<Pass> createConvertArithmeticToLLVMPass();
-} // end namespace arith
-} // end namespace mlir
+} // namespace arith
+} // namespace mlir
#endif // MLIR_CONVERSION_ARITHMETICTOLLVM_ARITHMETICTOLLVM_H
diff --git a/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h b/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h
index 02a45fc4cd92..0e426082e57c 100644
--- a/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h
+++ b/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h
@@ -22,7 +22,7 @@ void populateArithmeticToSPIRVPatterns(SPIRVTypeConverter &typeConverter,
RewritePatternSet &patterns);
std::unique_ptr<Pass> createConvertArithmeticToSPIRVPass();
-} // end namespace arith
-} // end namespace mlir
+} // namespace arith
+} // namespace mlir
#endif // MLIR_CONVERSION_ARITHMETICTOSPIRV_ARITHMETICTOSPIRV_H
diff --git a/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
index 483867933b7d..d1221d17d768 100644
--- a/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
+++ b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
@@ -22,7 +22,7 @@ using OwningRewritePatternList = RewritePatternSet;
namespace scf {
class ForOp;
-} // end namespace scf
+} // namespace scf
/// Convert a perfect affine loop nest with the outermost loop identified by
/// `forOp` into a gpu::Launch operation. Map `numBlockDims` outer loops to
diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
index 06e89113dd33..da4f0f9477de 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
+++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
@@ -455,6 +455,6 @@ class AffineBound {
friend class AffineForOp;
};
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/Dialect/Affine/Passes.h b/mlir/include/mlir/Dialect/Affine/Passes.h
index 639452fdcc06..c8194d3b660c 100644
--- a/mlir/include/mlir/Dialect/Affine/Passes.h
+++ b/mlir/include/mlir/Dialect/Affine/Passes.h
@@ -91,6 +91,6 @@ std::unique_ptr<OperationPass<FuncOp>> createSuperVectorizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Affine/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_AFFINE_RANSFORMS_PASSES_H
diff --git a/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h b/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h
index 87392a8f20a7..4fa592d003a0 100644
--- a/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h
+++ b/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h
@@ -89,8 +89,8 @@ class ConstantIndexOp : public arith::ConstantOp {
static bool classof(Operation *op);
};
-} // end namespace arith
-} // end namespace mlir
+} // namespace arith
+} // namespace mlir
//===----------------------------------------------------------------------===//
// Utility Functions
@@ -109,7 +109,7 @@ bool applyCmpPredicate(arith::CmpIPredicate predicate, const APInt &lhs,
bool applyCmpPredicate(arith::CmpFPredicate predicate, const APFloat &lhs,
const APFloat &rhs);
-} // end namespace arith
-} // end namespace mlir
+} // namespace arith
+} // namespace mlir
#endif // MLIR_DIALECT_ARITHMETIC_IR_ARITHMETIC_H_
diff --git a/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.h b/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.h
index 096b2d354f0d..09b6942ecd28 100644
--- a/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.h
@@ -14,7 +14,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
-} // end namespace bufferization
+} // namespace bufferization
namespace arith {
@@ -40,7 +40,7 @@ std::unique_ptr<Pass> createArithmeticExpandOpsPass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Arithmetic/Transforms/Passes.h.inc"
-} // end namespace arith
-} // end namespace mlir
+} // namespace arith
+} // namespace mlir
#endif // MLIR_DIALECT_ARITHMETIC_TRANSFORMS_PASSES_H_
diff --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h b/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
index 37e1a0e33a88..0d3215555c62 100644
--- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
+++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
@@ -52,7 +52,7 @@ void populateBufferizeMaterializationLegality(ConversionTarget &target);
void populateEliminateBufferizeMaterializationsPatterns(
BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns);
-} // end namespace bufferization
-} // end namespace mlir
+} // namespace bufferization
+} // namespace mlir
#endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_BUFFERIZE_H
diff --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h b/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
index 9accb9c626c4..78873cf58fcb 100644
--- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
@@ -26,7 +26,7 @@ std::unique_ptr<FunctionPass> createFinalizingBufferizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
-} // end namespace bufferization
-} // end namespace mlir
+} // namespace bufferization
+} // namespace mlir
#endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_PASSES_H
diff --git a/mlir/include/mlir/Dialect/GPU/GPUDialect.h b/mlir/include/mlir/Dialect/GPU/GPUDialect.h
index 12430226173b..3b0a6cc285d7 100644
--- a/mlir/include/mlir/Dialect/GPU/GPUDialect.h
+++ b/mlir/include/mlir/Dialect/GPU/GPUDialect.h
@@ -164,8 +164,8 @@ class MMAMatrixType
// Adds a `gpu.async.token` to the front of the argument list.
void addAsyncDependency(Operation *op, Value token);
-} // end namespace gpu
-} // end namespace mlir
+} // namespace gpu
+} // namespace mlir
#include "mlir/Dialect/GPU/GPUOpsEnums.h.inc"
diff --git a/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h b/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h
index a4447be533c2..c3542b5da77a 100644
--- a/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h
+++ b/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h
@@ -24,6 +24,6 @@ class GPUFuncOp;
/// copies will be inserted in the beginning and in the end of the function.
void promoteToWorkgroupMemory(gpu::GPUFuncOp op, unsigned arg);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_GPU_MEMORYPROMOTION_H
diff --git a/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h b/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
index ad8982546cab..3e5f288336f2 100644
--- a/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
+++ b/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
@@ -59,7 +59,7 @@ ParallelLoopDimMapping getParallelLoopDimMappingAttr(Processor processor,
/// - the mapping does not map multiple loops to the same processor.
LogicalResult setMappingAttr(scf::ParallelOp ploopOp,
ArrayRef<ParallelLoopDimMapping> mapping);
-} // end namespace gpu
+} // namespace gpu
/// Maps the parallel loops found in the given function to workgroups. The first
/// loop encountered will be mapped to the global workgroup and the second loop
@@ -68,5 +68,5 @@ LogicalResult setMappingAttr(scf::ParallelOp ploopOp,
/// mapped to sequential loops.
void greedilyMapParallelSCFToGPU(Region ®ion);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_GPU_PARALLELLOOPMAPPER_H
diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h b/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
index 9cd1318e1297..f3a38567ca31 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
@@ -50,8 +50,8 @@ class LLVMContext;
namespace sys {
template <bool mt_only>
class SmartMutex;
-} // end namespace sys
-} // end namespace llvm
+} // namespace sys
+} // namespace llvm
namespace mlir {
namespace LLVM {
@@ -131,7 +131,7 @@ class LoopOptionsAttrBuilder {
SmallVector<LoopOptionsAttr::OptionValuePair> options;
};
-} // end namespace LLVM
-} // end namespace mlir
+} // namespace LLVM
+} // namespace mlir
#endif // MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
diff --git a/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h b/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
index 279ea4b1d898..54b519bcb347 100644
--- a/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
+++ b/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h
@@ -24,6 +24,6 @@ namespace mlir {
/// are > 1 deallocates for `allocValue`, returns None, else returns the single
/// deallocate if it exists or nullptr.
llvm::Optional<Operation *> findDealloc(Value allocValue);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_MEMREF_UTILS_MEMREFUTILS_H
diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
index 9080b277625d..44f64cc8573f 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h
@@ -36,7 +36,7 @@ namespace acc {
/// combined and the final mapping value would be 5 (4 | 1).
enum OpenACCExecMapping { NONE = 0, VECTOR = 1, WORKER = 2, GANG = 4 };
-} // end namespace acc
-} // end namespace mlir
+} // namespace acc
+} // namespace mlir
#endif // MLIR_DIALECT_OPENACC_OPENACC_H_
diff --git a/mlir/include/mlir/Dialect/SCF/SCF.h b/mlir/include/mlir/Dialect/SCF/SCF.h
index 49f5be00c978..485efaab28a3 100644
--- a/mlir/include/mlir/Dialect/SCF/SCF.h
+++ b/mlir/include/mlir/Dialect/SCF/SCF.h
@@ -96,6 +96,6 @@ LoopNest buildLoopNest(OpBuilder &builder, Location loc, ValueRange lbs,
function_ref<void(OpBuilder &, Location, ValueRange)>
bodyBuilder = nullptr);
-} // end namespace scf
-} // end namespace mlir
+} // namespace scf
+} // namespace mlir
#endif // MLIR_DIALECT_SCF_H_
diff --git a/mlir/include/mlir/Dialect/SCF/Utils.h b/mlir/include/mlir/Dialect/SCF/Utils.h
index b4f11356b121..7ed3e8c03f16 100644
--- a/mlir/include/mlir/Dialect/SCF/Utils.h
+++ b/mlir/include/mlir/Dialect/SCF/Utils.h
@@ -29,7 +29,7 @@ namespace scf {
class IfOp;
class ForOp;
class ParallelOp;
-} // end namespace scf
+} // namespace scf
/// Create a clone of `loop` with `newIterOperands` added as new initialization
/// values and `newYieldedValues` added as new yielded values. The returned
@@ -77,5 +77,5 @@ getSCFMinMaxExpr(Value value, SmallVectorImpl<Value> &dims,
SmallVectorImpl<Value> &symbols,
llvm::function_ref<bool(Operation *)> loopFilter = nullptr);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_SCF_UTILS_H_
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h
index f08e9db4dc4e..b3503fc732bb 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h
@@ -20,8 +20,8 @@ namespace spirv {
enum class Decoration : uint32_t;
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#include "mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc"
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
index ac128ac928ea..c5d18c52e52b 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
@@ -52,7 +52,7 @@ ArrayRef<Capability> getDirectImpliedCapabilities(Capability cap);
/// third one will also be returned.
SmallVector<Capability, 0> getRecursiveImpliedCapabilities(Capability cap);
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_IR_SPIRVENUMS_H_
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
index 4ec6cc52db7a..0d4471ee51c6 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
@@ -456,7 +456,7 @@ class MatrixType : public Type::TypeBase<MatrixType, CompositeType,
Optional<StorageClass> storage = llvm::None);
};
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_IR_SPIRVTYPES_H_
diff --git a/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h b/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
index 1cf83e6b0bef..4ed7e0a9b54e 100644
--- a/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
@@ -69,6 +69,6 @@ std::unique_ptr<FunctionPass> createShapeBufferizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Shape/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_SHAPE_TRANSFORMS_PASSES_H_
diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
index 856a7048018e..fe9c3c6e26f1 100644
--- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
+++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
@@ -67,6 +67,6 @@ Value getIdentityValue(AtomicRMWKind op, Type resultType, OpBuilder &builder,
Value getReductionOp(AtomicRMWKind op, OpBuilder &builder, Location loc,
Value lhs, Value rhs);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_IR_STANDARDOPS_IR_OPS_H
diff --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h b/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
index c453e80ee71d..d96e17604d12 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
+++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
@@ -86,6 +86,6 @@ void populateDecomposeCallGraphTypesPatterns(MLIRContext *context,
ValueDecomposer &decomposer,
RewritePatternSet &patterns);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
diff --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h b/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
index 4a27d3caf5d7..6187d59e547e 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
+++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
@@ -69,6 +69,6 @@ bool isLegalForReturnOpTypeConversionPattern(Operation *op,
/// `isLegalForBranchOpInterfaceTypeConversionPattern` and
/// `isLegalForReturnOpTypeConversionPattern`.
bool isNotBranchOpInterfaceOrReturnLikeOp(Operation *op);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_FUNCCONVERSIONS_H_
diff --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h b/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
index cbf52d1bec19..201dc970e515 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
@@ -19,7 +19,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
-} // end namespace bufferization
+} // namespace bufferization
class GlobalCreator;
class RewritePatternSet;
@@ -63,6 +63,6 @@ void populateStdExpandOpsPatterns(RewritePatternSet &patterns);
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/StandardOps/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_STANDARD_TRANSFORMS_PASSES_H_
diff --git a/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h b/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h
index 4c3799cb9428..61853d0630fc 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h
+++ b/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h
@@ -103,6 +103,6 @@ struct ArithBuilder {
OpBuilder &b;
Location loc;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_UTILS_UTILS_H
diff --git a/mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h b/mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
index 9445dee26602..b62399ce21ae 100644
--- a/mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
@@ -14,7 +14,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
-} // end namespace bufferization
+} // namespace bufferization
class RewritePatternSet;
using OwningRewritePatternList = RewritePatternSet;
@@ -36,6 +36,6 @@ namespace tensor {
#include "mlir/Dialect/Tensor/Transforms/Passes.h.inc"
} // namespace tensor
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES_H_
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
index a31c822828e9..a11dedb274a2 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
@@ -31,8 +31,8 @@ namespace tosa {
#include "mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc"
-} // end namespace tosa
-} // end namespace mlir
+} // namespace tosa
+} // namespace mlir
#define GET_OP_CLASSES
#include "mlir/Dialect/Tosa/IR/TosaOps.h.inc"
diff --git a/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h b/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
index d7084452bd0e..b0508c067d90 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
@@ -19,6 +19,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Tosa/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_DIALECT_TOSA_TRANSFORMS_PASSDETAIL_H
diff --git a/mlir/include/mlir/Dialect/Traits.h b/mlir/include/mlir/Dialect/Traits.h
index c51cadf048ae..c23f713752f8 100644
--- a/mlir/include/mlir/Dialect/Traits.h
+++ b/mlir/include/mlir/Dialect/Traits.h
@@ -93,7 +93,7 @@ class ResultsBroadcastableShape
}
};
-} // end namespace OpTrait
-} // end namespace mlir
+} // namespace OpTrait
+} // namespace mlir
#endif // MLIR_DIALECT_TRAITS
diff --git a/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h b/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
index bdd5909faebd..b59452572bf2 100644
--- a/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
+++ b/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
@@ -189,6 +189,6 @@ class StructuredGenerator {
Operation *op;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_UTILS_STRUCTUREDOPSUTILS_H
diff --git a/mlir/include/mlir/Dialect/Vector/VectorOps.h b/mlir/include/mlir/Dialect/Vector/VectorOps.h
index 0ed4b8370cb1..6dd4b9aaf555 100644
--- a/mlir/include/mlir/Dialect/Vector/VectorOps.h
+++ b/mlir/include/mlir/Dialect/Vector/VectorOps.h
@@ -144,8 +144,8 @@ namespace impl {
AffineMap getTransferMinorIdentityMap(ShapedType shapedType,
VectorType vectorType);
} // namespace impl
-} // end namespace vector
-} // end namespace mlir
+} // namespace vector
+} // namespace mlir
#define GET_OP_CLASSES
#include "mlir/Dialect/Vector/VectorOps.h.inc"
diff --git a/mlir/include/mlir/Dialect/Vector/VectorUtils.h b/mlir/include/mlir/Dialect/Vector/VectorUtils.h
index 788e0c8316e2..a9f4f241410f 100644
--- a/mlir/include/mlir/Dialect/Vector/VectorUtils.h
+++ b/mlir/include/mlir/Dialect/Vector/VectorUtils.h
@@ -202,7 +202,7 @@ namespace matcher {
/// adding even 1 extra bit in the IR for now.
bool operatesOnSuperVectorsOf(Operation &op, VectorType subVectorType);
-} // end namespace matcher
-} // end namespace mlir
+} // namespace matcher
+} // namespace mlir
#endif // MLIR_DIALECT_VECTOR_VECTORUTILS_H_
diff --git a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
index 3baff4c9149a..46647b678192 100644
--- a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
@@ -81,8 +81,8 @@ struct Vector1D<T, Dim, /*IsPowerOf2=*/false> {
T vector[Dim];
char padding[nextPowerOf2(sizeof(T[Dim])) - sizeof(T[Dim])];
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
// N-D vectors recurse down to 1-D.
template <typename T, int Dim, int... Dims>
diff --git a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
index a1cb088e5177..0b74c115b0bd 100644
--- a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
+++ b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
@@ -197,6 +197,6 @@ class ExecutionEngine {
llvm::JITEventListener *perfListener;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_EXECUTIONENGINE_EXECUTIONENGINE_H_
diff --git a/mlir/include/mlir/ExecutionEngine/OptUtils.h b/mlir/include/mlir/ExecutionEngine/OptUtils.h
index b33959ef468a..793183cd5157 100644
--- a/mlir/include/mlir/ExecutionEngine/OptUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/OptUtils.h
@@ -52,6 +52,6 @@ makeLLVMPassesTransformer(llvm::ArrayRef<const llvm::PassInfo *> llvmPasses,
llvm::TargetMachine *targetMachine,
unsigned optPassesInsertPos = 0);
-} // end namespace mlir
+} // namespace mlir
#endif // LIR_EXECUTIONENGINE_OPTUTILS_H_
diff --git a/mlir/include/mlir/IR/AffineExprVisitor.h b/mlir/include/mlir/IR/AffineExprVisitor.h
index 259cc5e3f871..a2aa1fdb86d7 100644
--- a/mlir/include/mlir/IR/AffineExprVisitor.h
+++ b/mlir/include/mlir/IR/AffineExprVisitor.h
@@ -340,6 +340,6 @@ class SimpleAffineExprFlattener
inline unsigned getDimStartIndex() const { return 0; }
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_AFFINE_EXPR_VISITOR_H
diff --git a/mlir/include/mlir/IR/AffineMap.h b/mlir/include/mlir/IR/AffineMap.h
index 320891ee5a19..14bddf5794b5 100644
--- a/mlir/include/mlir/IR/AffineMap.h
+++ b/mlir/include/mlir/IR/AffineMap.h
@@ -24,7 +24,7 @@ namespace mlir {
namespace detail {
struct AffineMapStorage;
-} // end namespace detail
+} // namespace detail
class Attribute;
struct LogicalResult;
@@ -567,7 +567,7 @@ inline raw_ostream &operator<<(raw_ostream &os, AffineMap map) {
map.print(os);
return os;
}
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
diff --git a/mlir/include/mlir/IR/AsmState.h b/mlir/include/mlir/IR/AsmState.h
index 691e6c71e620..eeb12adff088 100644
--- a/mlir/include/mlir/IR/AsmState.h
+++ b/mlir/include/mlir/IR/AsmState.h
@@ -23,7 +23,7 @@ class Operation;
namespace detail {
class AsmStateImpl;
-} // end namespace detail
+} // namespace detail
/// This class provides management for the lifetime of the state used when
/// printing the IR. It allows for alleviating the cost of recomputing the
@@ -66,6 +66,6 @@ class AsmState {
/// various flags within the AsmPrinter.
void registerAsmPrinterCLOptions();
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_ASMSTATE_H_
diff --git a/mlir/include/mlir/IR/AttributeSupport.h b/mlir/include/mlir/IR/AttributeSupport.h
index dec3e69beeb4..97e120208d39 100644
--- a/mlir/include/mlir/IR/AttributeSupport.h
+++ b/mlir/include/mlir/IR/AttributeSupport.h
@@ -109,7 +109,7 @@ class AbstractAttribute {
namespace detail {
class AttributeUniquer;
-} // end namespace detail
+} // namespace detail
/// Base storage class appearing in an attribute. Derived storage classes should
/// only be constructed within the context of the AttributeUniquer.
@@ -251,6 +251,6 @@ class AttributeUniquer {
};
} // namespace detail
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index 3a2e8b16eb9c..9fe9f53b1b0c 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -227,7 +227,7 @@ class AttributeInterface
friend InterfaceBase;
};
-} // end namespace mlir.
+} // namespace mlir.
namespace llvm {
diff --git a/mlir/include/mlir/IR/Block.h b/mlir/include/mlir/IR/Block.h
index cafcf585bf2d..b270f2aa5634 100644
--- a/mlir/include/mlir/IR/Block.h
+++ b/mlir/include/mlir/IR/Block.h
@@ -18,7 +18,7 @@
namespace llvm {
class BitVector;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class TypeRange;
@@ -364,6 +364,6 @@ class Block : public IRObjectWithUseList<BlockOperand>,
friend struct llvm::ilist_traits<Block>;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_BLOCK_H
diff --git a/mlir/include/mlir/IR/BlockAndValueMapping.h b/mlir/include/mlir/IR/BlockAndValueMapping.h
index 0988012da8ea..e6aea7968314 100644
--- a/mlir/include/mlir/IR/BlockAndValueMapping.h
+++ b/mlir/include/mlir/IR/BlockAndValueMapping.h
@@ -94,6 +94,6 @@ class BlockAndValueMapping {
DenseMap<Block *, Block *> blockMap;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_BLOCKANDVALUEMAPPING_H
diff --git a/mlir/include/mlir/IR/BlockSupport.h b/mlir/include/mlir/IR/BlockSupport.h
index 5a2bece9c0b6..c6371f53c662 100644
--- a/mlir/include/mlir/IR/BlockSupport.h
+++ b/mlir/include/mlir/IR/BlockSupport.h
@@ -171,8 +171,8 @@ class op_iterator
/// Allow implicit conversion to the underlying block iterator.
operator const IteratorT &() const { return this->wrapped(); }
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
namespace llvm {
@@ -223,7 +223,7 @@ struct SpecificNodeAccess<
static pointer getValuePtr(node_type *N);
static const_pointer getValuePtr(const node_type *N);
};
-} // end namespace ilist_detail
+} // namespace ilist_detail
template <> struct ilist_traits<::mlir::Operation> {
using Operation = ::mlir::Operation;
@@ -257,6 +257,6 @@ struct ilist_traits<::mlir::Block> : public ilist_alloc_traits<::mlir::Block> {
mlir::Region *getParentRegion();
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_IR_BLOCK_SUPPORT_H
diff --git a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h b/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h
index 2ed1c84ee537..834a70e54cba 100644
--- a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h
+++ b/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h
@@ -312,6 +312,6 @@ auto ElementsAttr::try_value_begin() const
return llvm::None;
return iterator<T>(std::move(*indexer), 0);
}
-} // end namespace mlir.
+} // namespace mlir.
#endif // MLIR_IR_BUILTINATTRIBUTEINTERFACES_H
diff --git a/mlir/include/mlir/IR/BuiltinAttributes.h b/mlir/include/mlir/IR/BuiltinAttributes.h
index 969bb9574834..085267888824 100644
--- a/mlir/include/mlir/IR/BuiltinAttributes.h
+++ b/mlir/include/mlir/IR/BuiltinAttributes.h
@@ -940,7 +940,7 @@ inline bool operator!=(StringRef lhs, StringAttr rhs) { return !(lhs == rhs); }
inline Type StringAttr::getType() const { return Attribute::getType(); }
-} // end namespace mlir
+} // namespace mlir
//===----------------------------------------------------------------------===//
// Attribute Utilities
diff --git a/mlir/include/mlir/IR/BuiltinOps.h b/mlir/include/mlir/IR/BuiltinOps.h
index 01c4f3fd6d39..36bc4379b1bd 100644
--- a/mlir/include/mlir/IR/BuiltinOps.h
+++ b/mlir/include/mlir/IR/BuiltinOps.h
@@ -46,7 +46,7 @@ class OwningModuleRef : public OwningOpRef<ModuleOp> {
OwningModuleRef(OwningOpRef<ModuleOp> &&other)
: OwningOpRef<ModuleOp>(std::move(other)) {}
};
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
/// Allow stealing the low bits of FuncOp.
@@ -73,6 +73,6 @@ struct PointerLikeTypeTraits<mlir::ModuleOp> {
}
static constexpr int NumLowBitsAvailable = 3;
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_IR_BUILTINOPS_H_
diff --git a/mlir/include/mlir/IR/BuiltinTypes.h b/mlir/include/mlir/IR/BuiltinTypes.h
index 10d8a5847ebd..296b12c42792 100644
--- a/mlir/include/mlir/IR/BuiltinTypes.h
+++ b/mlir/include/mlir/IR/BuiltinTypes.h
@@ -183,7 +183,7 @@ class BaseMemRefType : public ShapedType {
unsigned getMemorySpaceAsInt() const;
};
-} // end namespace mlir
+} // namespace mlir
//===----------------------------------------------------------------------===//
// Tablegen Type Declarations
@@ -531,6 +531,6 @@ bool isStrided(MemRefType t);
/// Return null if the layout is not compatible with a strided layout.
AffineMap getStridedLinearLayoutMap(MemRefType t);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_BUILTINTYPES_H
diff --git a/mlir/include/mlir/IR/Diagnostics.h b/mlir/include/mlir/IR/Diagnostics.h
index ad1d22764165..0f7912d02ffc 100644
--- a/mlir/include/mlir/IR/Diagnostics.h
+++ b/mlir/include/mlir/IR/Diagnostics.h
@@ -20,7 +20,7 @@ namespace llvm {
class MemoryBuffer;
class SMLoc;
class SourceMgr;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class DiagnosticEngine;
@@ -34,7 +34,7 @@ class Value;
namespace detail {
struct DiagnosticEngineImpl;
-} // end namespace detail
+} // namespace detail
/// Defines the
diff erent supported severity of a diagnostic.
enum class DiagnosticSeverity {
@@ -516,7 +516,7 @@ class ScopedDiagnosticHandler {
namespace detail {
struct SourceMgrDiagnosticHandlerImpl;
-} // end namespace detail
+} // namespace detail
/// This class is a utility diagnostic handler for use with llvm::SourceMgr.
class SourceMgrDiagnosticHandler : public ScopedDiagnosticHandler {
@@ -580,7 +580,7 @@ class SourceMgrDiagnosticHandler : public ScopedDiagnosticHandler {
namespace detail {
struct SourceMgrDiagnosticVerifierHandlerImpl;
-} // end namespace detail
+} // namespace detail
/// This class is a utility diagnostic handler for use with llvm::SourceMgr that
/// verifies that emitted diagnostics match 'expected-*' lines on the
@@ -613,7 +613,7 @@ class SourceMgrDiagnosticVerifierHandler : public SourceMgrDiagnosticHandler {
namespace detail {
struct ParallelDiagnosticHandlerImpl;
-} // end namespace detail
+} // namespace detail
/// This class is a utility diagnostic handler for use when multi-threading some
/// part of the compiler where diagnostics may be emitted. This handler ensures
diff --git a/mlir/include/mlir/IR/Dialect.h b/mlir/include/mlir/IR/Dialect.h
index c668df03c474..d7dc51189d6a 100644
--- a/mlir/include/mlir/IR/Dialect.h
+++ b/mlir/include/mlir/IR/Dialect.h
@@ -50,7 +50,7 @@ class Dialect {
virtual ~Dialect();
/// Utility function that returns if the given string is a valid dialect
- /// namespace.
+ /// namespace
static bool isValidNamespace(StringRef str);
MLIRContext *getContext() const { return context; }
diff --git a/mlir/include/mlir/IR/DialectImplementation.h b/mlir/include/mlir/IR/DialectImplementation.h
index 70afd029c94f..bbe4da6edd8b 100644
--- a/mlir/include/mlir/IR/DialectImplementation.h
+++ b/mlir/include/mlir/IR/DialectImplementation.h
@@ -127,6 +127,6 @@ struct FieldParser<
}
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_DIALECTIMPLEMENTATION_H
diff --git a/mlir/include/mlir/IR/DialectInterface.h b/mlir/include/mlir/IR/DialectInterface.h
index 3ffed3d932d9..8649e48dedfc 100644
--- a/mlir/include/mlir/IR/DialectInterface.h
+++ b/mlir/include/mlir/IR/DialectInterface.h
@@ -35,7 +35,7 @@ class DialectInterfaceBase : public BaseT {
protected:
DialectInterfaceBase(Dialect *dialect) : BaseT(dialect, getInterfaceID()) {}
};
-} // end namespace detail
+} // namespace detail
/// This class represents an interface overridden for a single dialect.
class DialectInterface {
diff --git a/mlir/include/mlir/IR/Dominance.h b/mlir/include/mlir/IR/Dominance.h
index 83b2b819a5ce..d94d5be3c53e 100644
--- a/mlir/include/mlir/IR/Dominance.h
+++ b/mlir/include/mlir/IR/Dominance.h
@@ -109,7 +109,7 @@ class DominanceInfoBase {
mutable DenseMap<Region *, llvm::PointerIntPair<DomTree *, 1, bool>>
dominanceInfos;
};
-} // end namespace detail
+} // namespace detail
/// A class for computing basic dominance information. Note that this
/// class is aware of
diff erent types of regions and returns a
@@ -196,7 +196,7 @@ class PostDominanceInfo : public detail::DominanceInfoBase</*IsPostDom=*/true> {
}
};
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
@@ -222,5 +222,5 @@ struct GraphTraits<const mlir::DominanceInfoNode *> {
static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
-} // end namespace llvm
+} // namespace llvm
#endif
diff --git a/mlir/include/mlir/IR/FunctionSupport.h b/mlir/include/mlir/IR/FunctionSupport.h
index cc086abd1b86..0964d9b3dd71 100644
--- a/mlir/include/mlir/IR/FunctionSupport.h
+++ b/mlir/include/mlir/IR/FunctionSupport.h
@@ -796,8 +796,8 @@ Attribute FunctionLike<ConcreteType>::removeResultAttr(unsigned index,
return removedAttr;
}
-} // end namespace OpTrait
+} // namespace OpTrait
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_FUNCTIONSUPPORT_H
diff --git a/mlir/include/mlir/IR/Identifier.h b/mlir/include/mlir/IR/Identifier.h
index f72e1a2e0671..0e2574768b14 100644
--- a/mlir/include/mlir/IR/Identifier.h
+++ b/mlir/include/mlir/IR/Identifier.h
@@ -15,6 +15,6 @@ namespace mlir {
/// NOTICE: Identifier is deprecated and usages of it should be replaced with
/// StringAttr.
using Identifier = StringAttr;
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/IR/IntegerSet.h b/mlir/include/mlir/IR/IntegerSet.h
index 77e1a0cd620c..47ffbf156d90 100644
--- a/mlir/include/mlir/IR/IntegerSet.h
+++ b/mlir/include/mlir/IR/IntegerSet.h
@@ -31,7 +31,7 @@ namespace mlir {
namespace detail {
struct IntegerSetStorage;
-} // end namespace detail
+} // namespace detail
class MLIRContext;
@@ -124,7 +124,7 @@ inline ::llvm::hash_code hash_value(IntegerSet arg) {
return ::llvm::hash_value(arg.set);
}
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
// IntegerSet hash just like pointers.
diff --git a/mlir/include/mlir/IR/Location.h b/mlir/include/mlir/IR/Location.h
index 1077c9f49b89..76ae7a48a3cb 100644
--- a/mlir/include/mlir/IR/Location.h
+++ b/mlir/include/mlir/IR/Location.h
@@ -97,7 +97,7 @@ inline ::llvm::hash_code hash_value(Location arg) {
return hash_value(arg.impl);
}
-} // end namespace mlir
+} // namespace mlir
//===----------------------------------------------------------------------===//
// Tablegen Attribute Declarations
diff --git a/mlir/include/mlir/IR/MLIRContext.h b/mlir/include/mlir/IR/MLIRContext.h
index bc9a8a95e4a0..e2014954e9fb 100644
--- a/mlir/include/mlir/IR/MLIRContext.h
+++ b/mlir/include/mlir/IR/MLIRContext.h
@@ -17,7 +17,7 @@
namespace llvm {
class ThreadPool;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class DebugActionManager;
@@ -236,6 +236,6 @@ class MLIRContext {
/// an MLIR context for initialization.
void registerMLIRContextCLOptions();
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_MLIRCONTEXT_H
diff --git a/mlir/include/mlir/IR/Matchers.h b/mlir/include/mlir/IR/Matchers.h
index 3f6720d0e794..07a6ece3c01b 100644
--- a/mlir/include/mlir/IR/Matchers.h
+++ b/mlir/include/mlir/IR/Matchers.h
@@ -225,7 +225,7 @@ struct RecursivePatternMatcher {
std::tuple<OperandMatchers...> operandMatchers;
};
-} // end namespace detail
+} // namespace detail
/// Matches a constant foldable operation.
inline detail::constant_op_matcher m_Constant() {
@@ -294,6 +294,6 @@ inline auto m_Any(Value *val) { return detail::AnyCapturedValueMatcher(val); }
inline auto m_Val(Value v) { return detail::PatternMatcherValue(v); }
} // namespace matchers
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_MATCHERS_H
diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h
index 2fc3cfbf0809..ad461e8aef07 100644
--- a/mlir/include/mlir/IR/OpDefinition.h
+++ b/mlir/include/mlir/IR/OpDefinition.h
@@ -339,7 +339,7 @@ struct MultiOperandTraitBase : public TraitBase<ConcreteType, TraitType> {
return this->getOperation()->getOperandTypes();
}
};
-} // end namespace detail
+} // namespace detail
/// This class provides the API for ops that are known to have no
/// SSA operand.
@@ -448,7 +448,7 @@ struct MultiRegionTraitBase : public TraitBase<ConcreteType, TraitType> {
region_iterator region_end() { return this->getOperation()->region_end(); }
region_range getRegions() { return this->getOperation()->getRegions(); }
};
-} // end namespace detail
+} // namespace detail
/// This class provides APIs for ops that are known to have a single region.
template <typename ConcreteType>
@@ -563,7 +563,7 @@ struct MultiResultTraitBase : public TraitBase<ConcreteType, TraitType> {
return this->getOperation()->getResultTypes();
}
};
-} // end namespace detail
+} // namespace detail
/// This class provides return value APIs for ops that are known to have a
/// single result. ResultType is the concrete type returned by getType().
@@ -712,7 +712,7 @@ struct MultiSuccessorTraitBase : public TraitBase<ConcreteType, TraitType> {
succ_iterator succ_end() { return this->getOperation()->succ_end(); }
succ_range getSuccessors() { return this->getOperation()->getSuccessors(); }
};
-} // end namespace detail
+} // namespace detail
/// This class provides APIs for ops that are known to have a single successor.
template <typename ConcreteType>
@@ -1418,7 +1418,7 @@ struct Tensorizable : public TraitBase<ConcreteType, Tensorizable> {
/// behavior to vectors/tensors, and systematize conversion between these forms.
bool hasElementwiseMappableTraits(Operation *op);
-} // end namespace OpTrait
+} // namespace OpTrait
//===----------------------------------------------------------------------===//
// Internal Trait Utilities
@@ -1906,7 +1906,7 @@ Value foldCastOp(Operation *op);
LogicalResult verifyCastOp(Operation *op,
function_ref<bool(Type, Type)> areCastCompatible);
} // namespace impl
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
@@ -1927,6 +1927,6 @@ struct DenseMapInfo<
static bool isEqual(T lhs, T rhs) { return lhs == rhs; }
};
-} // end namespace llvm
+} // namespace llvm
#endif
diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h
index 609f6be55a2c..4b763f9efe36 100644
--- a/mlir/include/mlir/IR/OpImplementation.h
+++ b/mlir/include/mlir/IR/OpImplementation.h
@@ -1354,7 +1354,7 @@ class OpAsmDialectInterface
virtual void getAsmBlockArgumentNames(Block *block,
OpAsmSetValueNameFn setNameFn) const {}
};
-} // end namespace mlir
+} // namespace mlir
//===--------------------------------------------------------------------===//
// Operation OpAsm interface.
diff --git a/mlir/include/mlir/IR/Operation.h b/mlir/include/mlir/IR/Operation.h
index e03986b68853..0f0f16603ce4 100644
--- a/mlir/include/mlir/IR/Operation.h
+++ b/mlir/include/mlir/IR/Operation.h
@@ -717,7 +717,7 @@ inline raw_ostream &operator<<(raw_ostream &os, const Operation &op) {
return os;
}
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
/// Provide isa functionality for operation casts.
@@ -743,6 +743,6 @@ template <class T>
struct cast_convert_val<T, ::mlir::Operation *, ::mlir::Operation *> {
static T doit(::mlir::Operation *val) { return T(val); }
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_IR_OPERATION_H
diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h
index d16b19bf309b..d6347b70b554 100644
--- a/mlir/include/mlir/IR/OperationSupport.h
+++ b/mlir/include/mlir/IR/OperationSupport.h
@@ -29,7 +29,7 @@
namespace llvm {
class BitVector;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class Dialect;
@@ -424,7 +424,7 @@ std::pair<IteratorT, bool> findAttrSorted(IteratorT first, IteratorT last,
return findAttrUnsorted(first, last, name);
}
-} // end namespace impl
+} // namespace impl
//===----------------------------------------------------------------------===//
// NamedAttrList
@@ -688,7 +688,7 @@ class alignas(8) OperandStorage {
/// A pointer to the operand storage.
OpOperand *operandStorage;
};
-} // end namespace detail
+} // namespace detail
//===----------------------------------------------------------------------===//
// OpPrintingFlags
@@ -1171,7 +1171,7 @@ struct OperationEquivalence {
/// Enable Bitmask enums for OperationEquivalence::Flags.
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
template <>
@@ -1223,6 +1223,6 @@ struct PointerLikeTypeTraits<mlir::RegisteredOperationName>
}
};
-} // end namespace llvm
+} // namespace llvm
#endif
diff --git a/mlir/include/mlir/IR/OwningOpRef.h b/mlir/include/mlir/IR/OwningOpRef.h
index c7ea1c615e60..e509800c83aa 100644
--- a/mlir/include/mlir/IR/OwningOpRef.h
+++ b/mlir/include/mlir/IR/OwningOpRef.h
@@ -62,6 +62,6 @@ class OwningOpRef {
OpTy op;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_OWNINGOPREF_H
diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index d02bda793b08..7aedec1b15f0 100644
--- a/mlir/include/mlir/IR/PatternMatch.h
+++ b/mlir/include/mlir/IR/PatternMatch.h
@@ -1087,6 +1087,6 @@ class RewritePatternSet {
PDLPatternModule pdlPatterns;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PATTERN_MATCH_H
diff --git a/mlir/include/mlir/IR/Region.h b/mlir/include/mlir/IR/Region.h
index 4558ce436a9d..44ede7b55b6b 100644
--- a/mlir/include/mlir/IR/Region.h
+++ b/mlir/include/mlir/IR/Region.h
@@ -344,6 +344,6 @@ class RegionRange
friend RangeBaseT;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_REGION_H
diff --git a/mlir/include/mlir/IR/SymbolTable.h b/mlir/include/mlir/IR/SymbolTable.h
index 15433cd0b69c..c02bcc2ad048 100644
--- a/mlir/include/mlir/IR/SymbolTable.h
+++ b/mlir/include/mlir/IR/SymbolTable.h
@@ -368,7 +368,7 @@ class SymbolTable : public TraitBase<ConcreteType, SymbolTable> {
}
};
-} // end namespace OpTrait
+} // namespace OpTrait
//===----------------------------------------------------------------------===//
// Visibility parsing implementation.
@@ -379,9 +379,9 @@ namespace impl {
/// nested) without quotes in a string attribute named 'attrName'.
ParseResult parseOptionalVisibilityKeyword(OpAsmParser &parser,
NamedAttrList &attrs);
-} // end namespace impl
+} // namespace impl
-} // end namespace mlir
+} // namespace mlir
/// Include the generated symbol interfaces.
#include "mlir/IR/SymbolInterfaces.h.inc"
diff --git a/mlir/include/mlir/IR/Threading.h b/mlir/include/mlir/IR/Threading.h
index 384223161014..0d60e95b54c1 100644
--- a/mlir/include/mlir/IR/Threading.h
+++ b/mlir/include/mlir/IR/Threading.h
@@ -148,6 +148,6 @@ void parallelForEachN(MLIRContext *context, size_t begin, size_t end,
parallelForEach(context, llvm::seq(begin, end), std::forward<FuncT>(func));
}
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_IR_THREADING_H
diff --git a/mlir/include/mlir/IR/TypeSupport.h b/mlir/include/mlir/IR/TypeSupport.h
index 45f8fcbc0468..6681e18c6e48 100644
--- a/mlir/include/mlir/IR/TypeSupport.h
+++ b/mlir/include/mlir/IR/TypeSupport.h
@@ -115,7 +115,7 @@ class AbstractType {
namespace detail {
struct TypeUniquer;
-} // end namespace detail
+} // namespace detail
/// Base storage class appearing in a Type.
class TypeStorage : public StorageUniquer::BaseStorage {
@@ -229,6 +229,6 @@ struct TypeUniquer {
};
} // namespace detail
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/IR/TypeUtilities.h b/mlir/include/mlir/IR/TypeUtilities.h
index 04bf36e95feb..d19d319a42c0 100644
--- a/mlir/include/mlir/IR/TypeUtilities.h
+++ b/mlir/include/mlir/IR/TypeUtilities.h
@@ -97,6 +97,6 @@ class ResultElementTypeIterator final
using ResultElementTypeRange = iterator_range<ResultElementTypeIterator>;
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_SUPPORT_TYPEUTILITIES_H
diff --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index 0c415c701f3a..8c828413038c 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -252,7 +252,7 @@ template <typename U> U Type::cast() const {
return U(impl);
}
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h
index 8b8390547551..ed1f8ea96d01 100644
--- a/mlir/include/mlir/IR/Value.h
+++ b/mlir/include/mlir/IR/Value.h
@@ -294,7 +294,7 @@ class BlockArgumentImpl : public ValueImpl {
/// Allow access to owner and constructor.
friend BlockArgument;
};
-} // end namespace detail
+} // namespace detail
/// This class represents an argument of a Block.
class BlockArgument : public Value {
@@ -419,7 +419,7 @@ inline unsigned OpResultImpl::getResultNumber() const {
return cast<InlineOpResult>(this)->getResultNumber();
}
-} // end namespace detail
+} // namespace detail
/// This is a value defined by a result of an operation.
class OpResult : public Value {
@@ -533,6 +533,6 @@ struct PointerLikeTypeTraits<mlir::OpResult>
}
};
-} // end namespace llvm
+} // namespace llvm
#endif
diff --git a/mlir/include/mlir/IR/Verifier.h b/mlir/include/mlir/IR/Verifier.h
index d9d99dd09df0..3e1a0f858f14 100644
--- a/mlir/include/mlir/IR/Verifier.h
+++ b/mlir/include/mlir/IR/Verifier.h
@@ -17,6 +17,6 @@ class Operation;
/// compiler bugs, on this operation and any nested operations. On error, this
/// reports the error through the MLIRContext and returns failure.
LogicalResult verify(Operation *op);
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/IR/Visitors.h b/mlir/include/mlir/IR/Visitors.h
index af2d05379662..7827a9518cfb 100644
--- a/mlir/include/mlir/IR/Visitors.h
+++ b/mlir/include/mlir/IR/Visitors.h
@@ -200,7 +200,7 @@ walk(Operation *op, FuncTy &&callback) {
/// Utility to provide the return type of a templated walk method.
template <typename FnT>
using walkResultType = decltype(walk(nullptr, std::declval<FnT>()));
-} // end namespace detail
+} // namespace detail
} // namespace mlir
diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.h b/mlir/include/mlir/Interfaces/CallInterfaces.h
index cc8e26eceba3..1b842e841255 100644
--- a/mlir/include/mlir/Interfaces/CallInterfaces.h
+++ b/mlir/include/mlir/Interfaces/CallInterfaces.h
@@ -23,7 +23,7 @@ namespace mlir {
struct CallInterfaceCallable : public PointerUnion<SymbolRefAttr, Value> {
using PointerUnion<SymbolRefAttr, Value>::PointerUnion;
};
-} // end namespace mlir
+} // namespace mlir
/// Include the generated interface declarations.
#include "mlir/Interfaces/CallInterfaces.h.inc"
diff --git a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h b/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
index da3549ff3d77..9d65d104aa1e 100644
--- a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+++ b/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
@@ -140,7 +140,7 @@ struct ReturnLike : public TraitBase<ConcreteType, ReturnLike> {
};
} // namespace OpTrait
-} // end namespace mlir
+} // namespace mlir
//===----------------------------------------------------------------------===//
// ControlFlow Interfaces
diff --git a/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h b/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
index 5a224d93cfdf..e27fcc0ada45 100644
--- a/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
+++ b/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
@@ -32,6 +32,6 @@ class DialectDecodeAttributesInterface
}
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_INTERFACES_DECODEATTRIBUTESINTERFACES_H_
diff --git a/mlir/include/mlir/Interfaces/FoldInterfaces.h b/mlir/include/mlir/Interfaces/FoldInterfaces.h
index 133819d95569..6278e31b4917 100644
--- a/mlir/include/mlir/Interfaces/FoldInterfaces.h
+++ b/mlir/include/mlir/Interfaces/FoldInterfaces.h
@@ -44,6 +44,6 @@ class DialectFoldInterface
virtual bool shouldMaterializeInto(Region *region) const { return false; }
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_INTERFACES_FOLDINTERFACES_H_
diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h b/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
index 33a6ba69050e..bc2f856aedf6 100644
--- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
+++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.h
@@ -257,7 +257,7 @@ bool isOpTriviallyDead(Operation *op);
/// `isOpTriviallyDead` if `op` was unused.
bool wouldOpBeTriviallyDead(Operation *op);
-} // end namespace mlir
+} // namespace mlir
//===----------------------------------------------------------------------===//
// SideEffect Interfaces
diff --git a/mlir/include/mlir/Parser.h b/mlir/include/mlir/Parser.h
index 5f5d528f37b2..443fbb76d7c0 100644
--- a/mlir/include/mlir/Parser.h
+++ b/mlir/include/mlir/Parser.h
@@ -21,7 +21,7 @@ namespace llvm {
class SourceMgr;
class SMDiagnostic;
class StringRef;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class AsmParserState;
@@ -71,7 +71,7 @@ inline OwningOpRef<ContainerOpT> constructContainerOpForParserIfNecessary(
return OwningOpRef<ContainerOpT>();
return opRef;
}
-} // end namespace detail
+} // namespace detail
/// This parses the file specified by the indicated SourceMgr and appends parsed
/// operations to the given block. If the block is non-empty, the operations are
@@ -266,6 +266,6 @@ Type parseType(llvm::StringRef typeStr, MLIRContext *context, size_t &numRead);
IntegerSet parseIntegerSet(llvm::StringRef str, MLIRContext *context,
bool printDiagnosticInfo = true);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PARSER_H
diff --git a/mlir/include/mlir/Parser/AsmParserState.h b/mlir/include/mlir/Parser/AsmParserState.h
index cf955bb56422..f5b27fa742fe 100644
--- a/mlir/include/mlir/Parser/AsmParserState.h
+++ b/mlir/include/mlir/Parser/AsmParserState.h
@@ -177,6 +177,6 @@ class AsmParserState {
std::unique_ptr<Impl> impl;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PARSER_ASMPARSERSTATE_H
diff --git a/mlir/include/mlir/Pass/AnalysisManager.h b/mlir/include/mlir/Pass/AnalysisManager.h
index d5840818dffc..9dab7b7b5950 100644
--- a/mlir/include/mlir/Pass/AnalysisManager.h
+++ b/mlir/include/mlir/Pass/AnalysisManager.h
@@ -94,7 +94,7 @@ std::enable_if_t<!llvm::is_detected<has_is_invalidated, AnalysisT>::value, bool>
isInvalidated(AnalysisT &analysis, const PreservedAnalyses &pa) {
return !pa.isPreserved<AnalysisT>();
}
-} // end namespace analysis_impl
+} // namespace analysis_impl
/// The abstract polymorphic base class representing an analysis.
struct AnalysisConcept {
@@ -401,6 +401,6 @@ class ModuleAnalysisManager {
detail::NestedAnalysisMap analyses;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PASS_ANALYSISMANAGER_H
diff --git a/mlir/include/mlir/Pass/Pass.h b/mlir/include/mlir/Pass/Pass.h
index 3a9865d669dd..308df1c7ced9 100644
--- a/mlir/include/mlir/Pass/Pass.h
+++ b/mlir/include/mlir/Pass/Pass.h
@@ -422,6 +422,6 @@ template <typename PassT, typename BaseT> class PassWrapper : public BaseT {
}
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PASS_PASS_H
diff --git a/mlir/include/mlir/Pass/PassInstrumentation.h b/mlir/include/mlir/Pass/PassInstrumentation.h
index 88c8516343d0..c87be0407745 100644
--- a/mlir/include/mlir/Pass/PassInstrumentation.h
+++ b/mlir/include/mlir/Pass/PassInstrumentation.h
@@ -19,7 +19,7 @@ class Pass;
namespace detail {
struct PassInstrumentorImpl;
-} // end namespace detail
+} // namespace detail
/// PassInstrumentation provides several entry points into the pass manager
/// infrastructure. Instrumentations should be added directly to a PassManager
@@ -120,7 +120,7 @@ class PassInstrumentor {
std::unique_ptr<detail::PassInstrumentorImpl> impl;
};
-} // end namespace mlir
+} // namespace mlir
namespace llvm {
template <> struct DenseMapInfo<mlir::PassInstrumentation::PipelineParentInfo> {
@@ -143,6 +143,6 @@ template <> struct DenseMapInfo<mlir::PassInstrumentation::PipelineParentInfo> {
lhs.parentPass == rhs.parentPass;
}
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_PASS_PASSINSTRUMENTATION_H_
diff --git a/mlir/include/mlir/Pass/PassManager.h b/mlir/include/mlir/Pass/PassManager.h
index 08468882d857..1389276c2a19 100644
--- a/mlir/include/mlir/Pass/PassManager.h
+++ b/mlir/include/mlir/Pass/PassManager.h
@@ -23,7 +23,7 @@
namespace llvm {
class Any;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class AnalysisManager;
@@ -39,7 +39,7 @@ struct OpPassManagerImpl;
class OpToOpPassAdaptor;
class PassCrashReproducerGenerator;
struct PassExecutionState;
-} // end namespace detail
+} // namespace detail
//===----------------------------------------------------------------------===//
// OpPassManager
@@ -421,6 +421,6 @@ void applyPassManagerCLOptions(PassManager &pm);
/// to the pass manager.
void applyDefaultTimingPassManagerCLOptions(PassManager &pm);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PASS_PASSMANAGER_H
diff --git a/mlir/include/mlir/Pass/PassOptions.h b/mlir/include/mlir/Pass/PassOptions.h
index 01fcde2eb7fb..13c44345bf23 100644
--- a/mlir/include/mlir/Pass/PassOptions.h
+++ b/mlir/include/mlir/Pass/PassOptions.h
@@ -242,7 +242,7 @@ class PassOptions : protected llvm::cl::SubCommand {
/// A list of all of the opaque options.
std::vector<OptionBase *> options;
};
-} // end namespace detail
+} // namespace detail
//===----------------------------------------------------------------------===//
// PassPipelineOptions
@@ -276,7 +276,7 @@ template <typename T> class PassPipelineOptions : public detail::PassOptions {
struct EmptyPipelineOptions : public PassPipelineOptions<EmptyPipelineOptions> {
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PASS_PASSOPTIONS_H_
diff --git a/mlir/include/mlir/Pass/PassRegistry.h b/mlir/include/mlir/Pass/PassRegistry.h
index 8e07fc3f1920..7a7da3802050 100644
--- a/mlir/include/mlir/Pass/PassRegistry.h
+++ b/mlir/include/mlir/Pass/PassRegistry.h
@@ -24,7 +24,7 @@ class Pass;
namespace detail {
class PassOptions;
-} // end namespace detail
+} // namespace detail
/// A registry function that adds passes to the given pass manager. This should
/// also parse options and return success() if parsing succeeded.
@@ -210,7 +210,7 @@ LogicalResult parsePassPipeline(StringRef pipeline, OpPassManager &pm,
namespace detail {
struct PassPipelineCLParserImpl;
-} // end namespace detail
+} // namespace detail
/// This class implements a command-line parser for MLIR passes. It registers a
/// cl option with a given argument and description. This parser will register
@@ -262,6 +262,6 @@ class PassNameCLParser {
std::unique_ptr<detail::PassPipelineCLParserImpl> impl;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_PASS_PASSREGISTRY_H_
diff --git a/mlir/include/mlir/Reducer/PassDetail.h b/mlir/include/mlir/Reducer/PassDetail.h
index 3b6fa57a491a..ed47fa664544 100644
--- a/mlir/include/mlir/Reducer/PassDetail.h
+++ b/mlir/include/mlir/Reducer/PassDetail.h
@@ -16,6 +16,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Reducer/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REDUCER_PASSDETAIL_H
diff --git a/mlir/include/mlir/Reducer/Passes.h b/mlir/include/mlir/Reducer/Passes.h
index 438f47b329d0..c0d46bfccf54 100644
--- a/mlir/include/mlir/Reducer/Passes.h
+++ b/mlir/include/mlir/Reducer/Passes.h
@@ -20,6 +20,6 @@ std::unique_ptr<Pass> createOptReductionPass();
#define GEN_PASS_REGISTRATION
#include "mlir/Reducer/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REDUCER_PASSES_H
diff --git a/mlir/include/mlir/Reducer/ReductionNode.h b/mlir/include/mlir/Reducer/ReductionNode.h
index 6cdbd2354810..c938a1b5453d 100644
--- a/mlir/include/mlir/Reducer/ReductionNode.h
+++ b/mlir/include/mlir/Reducer/ReductionNode.h
@@ -192,6 +192,6 @@ class ReductionNode::iterator<SinglePath>
ArrayRef<ReductionNode *> getNeighbors(ReductionNode *node);
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REDUCER_REDUCTIONNODE_H
diff --git a/mlir/include/mlir/Reducer/ReductionPatternInterface.h b/mlir/include/mlir/Reducer/ReductionPatternInterface.h
index 887d120e4c35..a85562fda4d9 100644
--- a/mlir/include/mlir/Reducer/ReductionPatternInterface.h
+++ b/mlir/include/mlir/Reducer/ReductionPatternInterface.h
@@ -51,6 +51,6 @@ class DialectReductionPatternInterface
DialectReductionPatternInterface(Dialect *dialect) : Base(dialect) {}
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REDUCER_REDUCTIONPATTERNINTERFACE_H
diff --git a/mlir/include/mlir/Reducer/Tester.h b/mlir/include/mlir/Reducer/Tester.h
index 5969d63eaee2..9fe95adaed76 100644
--- a/mlir/include/mlir/Reducer/Tester.h
+++ b/mlir/include/mlir/Reducer/Tester.h
@@ -53,6 +53,6 @@ class Tester {
ArrayRef<std::string> testScriptArgs;
};
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h b/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
index 00c62163c23b..74ddba34ada9 100644
--- a/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
+++ b/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
@@ -14,7 +14,7 @@
namespace mlir {
namespace detail {
class PDLByteCode;
-} // end namespace detail
+} // namespace detail
/// This class represents a frozen set of patterns that can be processed by a
/// pattern applicator. This class is designed to enable caching pattern lists
@@ -92,6 +92,6 @@ class FrozenRewritePatternSet {
std::shared_ptr<Impl> impl;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REWRITE_FROZENREWRITEPATTERNSET_H
diff --git a/mlir/include/mlir/Rewrite/PatternApplicator.h b/mlir/include/mlir/Rewrite/PatternApplicator.h
index 9314496ecda1..a2e2286ebda3 100644
--- a/mlir/include/mlir/Rewrite/PatternApplicator.h
+++ b/mlir/include/mlir/Rewrite/PatternApplicator.h
@@ -21,7 +21,7 @@ class PatternRewriter;
namespace detail {
class PDLByteCodeMutableState;
-} // end namespace detail
+} // namespace detail
/// This class manages the application of a group of rewrite patterns, with a
/// user-provided cost model.
@@ -75,6 +75,6 @@ class PatternApplicator {
std::unique_ptr<detail::PDLByteCodeMutableState> mutableByteCodeState;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_REWRITE_PATTERNAPPLICATOR_H
diff --git a/mlir/include/mlir/Support/DebugAction.h b/mlir/include/mlir/Support/DebugAction.h
index 74f0f4c47b22..227d213b0dda 100644
--- a/mlir/include/mlir/Support/DebugAction.h
+++ b/mlir/include/mlir/Support/DebugAction.h
@@ -223,6 +223,6 @@ template <typename... ParameterTs> class DebugAction {
friend class DebugActionManager;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_SUPPORT_DEBUGACTION_H
diff --git a/mlir/include/mlir/Support/InterfaceSupport.h b/mlir/include/mlir/Support/InterfaceSupport.h
index 1a8c33e20013..92103fd2f171 100644
--- a/mlir/include/mlir/Support/InterfaceSupport.h
+++ b/mlir/include/mlir/Support/InterfaceSupport.h
@@ -270,7 +270,7 @@ class InterfaceMap {
SmallVector<std::pair<TypeID, void *>> interfaces;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/Support/LLVM.h b/mlir/include/mlir/Support/LLVM.h
index b8f6bbeba94d..3418f9ea7606 100644
--- a/mlir/include/mlir/Support/LLVM.h
+++ b/mlir/include/mlir/Support/LLVM.h
@@ -70,7 +70,7 @@ class APFloat;
template <typename Fn> class function_ref;
template <typename IteratorT> class iterator_range;
class raw_ostream;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
// Casting operators.
diff --git a/mlir/include/mlir/Support/MathExtras.h b/mlir/include/mlir/Support/MathExtras.h
index 65429e5f0265..622a7d33480c 100644
--- a/mlir/include/mlir/Support/MathExtras.h
+++ b/mlir/include/mlir/Support/MathExtras.h
@@ -53,6 +53,6 @@ inline int64_t lcm(int64_t a, int64_t b) {
assert((lcm >= a && lcm >= b) && "LCM overflow");
return lcm;
}
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_SUPPORT_MATHEXTRAS_H_
diff --git a/mlir/include/mlir/Support/MlirOptMain.h b/mlir/include/mlir/Support/MlirOptMain.h
index 51a26d08341a..666d83a614a5 100644
--- a/mlir/include/mlir/Support/MlirOptMain.h
+++ b/mlir/include/mlir/Support/MlirOptMain.h
@@ -22,7 +22,7 @@
namespace llvm {
class raw_ostream;
class MemoryBuffer;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
class DialectRegistry;
@@ -93,6 +93,6 @@ inline int asMainReturnCode(LogicalResult r) {
return r.succeeded() ? EXIT_SUCCESS : EXIT_FAILURE;
}
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_SUPPORT_MLIROPTMAIN_H
diff --git a/mlir/include/mlir/Support/StorageUniquer.h b/mlir/include/mlir/Support/StorageUniquer.h
index 170c77d43a29..d03d30ee5bbc 100644
--- a/mlir/include/mlir/Support/StorageUniquer.h
+++ b/mlir/include/mlir/Support/StorageUniquer.h
@@ -326,6 +326,6 @@ class StorageUniquer {
return DenseMapInfo<DerivedKey>::getHashValue(derivedKey);
}
};
-} // end namespace mlir
+} // namespace mlir
#endif
diff --git a/mlir/include/mlir/Support/ThreadLocalCache.h b/mlir/include/mlir/Support/ThreadLocalCache.h
index 3b5d6f0f424f..083956b71742 100644
--- a/mlir/include/mlir/Support/ThreadLocalCache.h
+++ b/mlir/include/mlir/Support/ThreadLocalCache.h
@@ -112,6 +112,6 @@ class ThreadLocalCache {
/// this object.
llvm::sys::SmartMutex<true> instanceMutex;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_SUPPORT_THREADLOCALCACHE_H
diff --git a/mlir/include/mlir/Support/TypeID.h b/mlir/include/mlir/Support/TypeID.h
index c966ba4ecd57..badab11b8e04 100644
--- a/mlir/include/mlir/Support/TypeID.h
+++ b/mlir/include/mlir/Support/TypeID.h
@@ -138,7 +138,7 @@ TypeID TypeID::get() {
return detail::TypeIDExported::get<Trait>();
}
-} // end namespace mlir
+} // namespace mlir
// Declare/define an explicit specialization for TypeID: this forces the
// compiler to emit a strong definition for a class and controls which
@@ -193,6 +193,6 @@ template <> struct PointerLikeTypeTraits<mlir::TypeID> {
static constexpr int NumLowBitsAvailable = 3;
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_SUPPORT_TYPEID_H
diff --git a/mlir/include/mlir/TableGen/Argument.h b/mlir/include/mlir/TableGen/Argument.h
index 1d89a76c2924..5a8f7882c00d 100644
--- a/mlir/include/mlir/TableGen/Argument.h
+++ b/mlir/include/mlir/TableGen/Argument.h
@@ -28,7 +28,7 @@
namespace llvm {
class StringRef;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -61,7 +61,7 @@ struct NamedTypeConstraint {
// Operation argument: either attribute or operand
using Argument = llvm::PointerUnion<NamedAttribute *, NamedTypeConstraint *>;
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_ARGUMENT_H_
diff --git a/mlir/include/mlir/TableGen/AttrOrTypeDef.h b/mlir/include/mlir/TableGen/AttrOrTypeDef.h
index 303edfdf143d..9f2375bc3020 100644
--- a/mlir/include/mlir/TableGen/AttrOrTypeDef.h
+++ b/mlir/include/mlir/TableGen/AttrOrTypeDef.h
@@ -260,7 +260,7 @@ class TypeDef : public AttrOrTypeDef {
using AttrOrTypeDef::AttrOrTypeDef;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_ATTRORTYPEDEF_H
diff --git a/mlir/include/mlir/TableGen/Attribute.h b/mlir/include/mlir/TableGen/Attribute.h
index f8397128f03a..043a3556d1cd 100644
--- a/mlir/include/mlir/TableGen/Attribute.h
+++ b/mlir/include/mlir/TableGen/Attribute.h
@@ -21,7 +21,7 @@
namespace llvm {
class DefInit;
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -241,7 +241,7 @@ class StructAttr : public Attribute {
// Name of infer type op interface.
extern const char *inferTypeOpInterface;
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_ATTRIBUTE_H_
diff --git a/mlir/include/mlir/TableGen/Builder.h b/mlir/include/mlir/TableGen/Builder.h
index b901c8414e81..a5e6d01c9957 100644
--- a/mlir/include/mlir/TableGen/Builder.h
+++ b/mlir/include/mlir/TableGen/Builder.h
@@ -23,7 +23,7 @@ namespace llvm {
class Init;
class Record;
class SMLoc;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -79,7 +79,7 @@ class Builder {
SmallVector<Parameter> parameters;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_BUILDER_H_
diff --git a/mlir/include/mlir/TableGen/Class.h b/mlir/include/mlir/TableGen/Class.h
index 11fa261faccf..1f310fe1d082 100644
--- a/mlir/include/mlir/TableGen/Class.h
+++ b/mlir/include/mlir/TableGen/Class.h
@@ -424,8 +424,8 @@ class Constructor : public Method {
SmallVector<MemberInitializer> initializers;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
/// The OR of two method properties should return method properties. Ensure that
/// this function is visible to `Class`.
diff --git a/mlir/include/mlir/TableGen/CodeGenHelpers.h b/mlir/include/mlir/TableGen/CodeGenHelpers.h
index b82f6460ae15..573a4fa42460 100644
--- a/mlir/include/mlir/TableGen/CodeGenHelpers.h
+++ b/mlir/include/mlir/TableGen/CodeGenHelpers.h
@@ -64,7 +64,7 @@ class NamespaceEmitter {
~NamespaceEmitter() {
for (StringRef ns : llvm::reverse(namespaces))
- os << "} // end namespace " << ns << "\n";
+ os << "} // namespace " << ns << "\n";
}
private:
@@ -243,7 +243,7 @@ struct stringifier<Optional<OptionalT>> {
: std::string();
}
};
-} // end namespace detail
+} // namespace detail
/// Generically convert a value to a std::string.
template <typename T> std::string stringify(T &&t) {
diff --git a/mlir/include/mlir/TableGen/Constraint.h b/mlir/include/mlir/TableGen/Constraint.h
index ebb3d2955ddf..4e099aa33416 100644
--- a/mlir/include/mlir/TableGen/Constraint.h
+++ b/mlir/include/mlir/TableGen/Constraint.h
@@ -20,7 +20,7 @@
namespace llvm {
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -77,7 +77,7 @@ struct AppliedConstraint {
std::vector<std::string> entities;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_CONSTRAINT_H_
diff --git a/mlir/include/mlir/TableGen/Dialect.h b/mlir/include/mlir/TableGen/Dialect.h
index d56b2288e2ef..3a378898bf50 100644
--- a/mlir/include/mlir/TableGen/Dialect.h
+++ b/mlir/include/mlir/TableGen/Dialect.h
@@ -19,7 +19,7 @@
namespace llvm {
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -102,7 +102,7 @@ class Dialect {
const llvm::Record *def;
std::vector<StringRef> dependentDialects;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_DIALECT_H_
diff --git a/mlir/include/mlir/TableGen/Format.h b/mlir/include/mlir/TableGen/Format.h
index 6879dbf98fe7..1772a90926ee 100644
--- a/mlir/include/mlir/TableGen/Format.h
+++ b/mlir/include/mlir/TableGen/Format.h
@@ -271,7 +271,7 @@ inline FmtStrVecObject tgfmt(StringRef fmt, const FmtContext *ctx,
return FmtStrVecObject(fmt, ctx, params);
}
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_FORMAT_H_
diff --git a/mlir/include/mlir/TableGen/GenInfo.h b/mlir/include/mlir/TableGen/GenInfo.h
index 16ed55954f3a..6a9364d3f7f5 100644
--- a/mlir/include/mlir/TableGen/GenInfo.h
+++ b/mlir/include/mlir/TableGen/GenInfo.h
@@ -15,7 +15,7 @@
namespace llvm {
class RecordKeeper;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
@@ -67,6 +67,6 @@ struct GenRegistration {
GenRegistration(StringRef arg, StringRef description, GenFunction function);
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TABLEGEN_GENINFO_H_
diff --git a/mlir/include/mlir/TableGen/GenNameParser.h b/mlir/include/mlir/TableGen/GenNameParser.h
index b02995100deb..437306735ab5 100644
--- a/mlir/include/mlir/TableGen/GenNameParser.h
+++ b/mlir/include/mlir/TableGen/GenNameParser.h
@@ -26,6 +26,6 @@ struct GenNameParser : public llvm::cl::parser<const GenInfo *> {
void printOptionInfo(const llvm::cl::Option &O,
size_t GlobalWidth) const override;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TABLEGEN_GENNAMEPARSER_H_
diff --git a/mlir/include/mlir/TableGen/Interfaces.h b/mlir/include/mlir/TableGen/Interfaces.h
index a3462097e480..0ddfdf29a8e2 100644
--- a/mlir/include/mlir/TableGen/Interfaces.h
+++ b/mlir/include/mlir/TableGen/Interfaces.h
@@ -16,7 +16,7 @@
namespace llvm {
class Init;
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -123,7 +123,7 @@ struct TypeInterface : public Interface {
static bool classof(const Interface *interface);
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_INTERFACES_H_
diff --git a/mlir/include/mlir/TableGen/Operator.h b/mlir/include/mlir/TableGen/Operator.h
index e8cc3d7f1578..44f10440c1e3 100644
--- a/mlir/include/mlir/TableGen/Operator.h
+++ b/mlir/include/mlir/TableGen/Operator.h
@@ -32,7 +32,7 @@ namespace llvm {
class DefInit;
class Record;
class StringInit;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -370,7 +370,7 @@ class Operator {
bool allResultsHaveKnownTypes;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_OPERATOR_H_
diff --git a/mlir/include/mlir/TableGen/Pass.h b/mlir/include/mlir/TableGen/Pass.h
index 968c85416965..715420e2d997 100644
--- a/mlir/include/mlir/TableGen/Pass.h
+++ b/mlir/include/mlir/TableGen/Pass.h
@@ -14,7 +14,7 @@
namespace llvm {
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -112,7 +112,7 @@ class Pass {
std::vector<PassStatistic> statistics;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_PASS_H_
diff --git a/mlir/include/mlir/TableGen/Pattern.h b/mlir/include/mlir/TableGen/Pattern.h
index ac8c98e5a490..3c7fe6dad707 100644
--- a/mlir/include/mlir/TableGen/Pattern.h
+++ b/mlir/include/mlir/TableGen/Pattern.h
@@ -28,7 +28,7 @@ namespace llvm {
class DagInit;
class Init;
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -508,8 +508,8 @@ class Pattern {
RecordOperatorMap *recordOpMap;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
namespace llvm {
template <>
@@ -547,6 +547,6 @@ struct DenseMapInfo<mlir::tblgen::DagLeaf> {
return lhs.def == rhs.def;
}
};
-} // end namespace llvm
+} // namespace llvm
#endif // MLIR_TABLEGEN_PATTERN_H_
diff --git a/mlir/include/mlir/TableGen/Predicate.h b/mlir/include/mlir/TableGen/Predicate.h
index eb3fe5385695..6c1b762025a0 100644
--- a/mlir/include/mlir/TableGen/Predicate.h
+++ b/mlir/include/mlir/TableGen/Predicate.h
@@ -24,7 +24,7 @@ class Init;
class ListInit;
class Record;
class SMLoc;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -122,7 +122,7 @@ class ConcatPred : public CombinedPred {
StringRef getSuffix() const;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_PREDICATE_H_
diff --git a/mlir/include/mlir/TableGen/Region.h b/mlir/include/mlir/TableGen/Region.h
index 423ef7208263..4b8dc92714ef 100644
--- a/mlir/include/mlir/TableGen/Region.h
+++ b/mlir/include/mlir/TableGen/Region.h
@@ -36,7 +36,7 @@ struct NamedRegion {
Region constraint;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_REGION_H_
diff --git a/mlir/include/mlir/TableGen/SideEffects.h b/mlir/include/mlir/TableGen/SideEffects.h
index c5ced6682c16..4dcc6c90fbee 100644
--- a/mlir/include/mlir/TableGen/SideEffects.h
+++ b/mlir/include/mlir/TableGen/SideEffects.h
@@ -52,7 +52,7 @@ class SideEffectTrait : public InterfaceTrait {
static bool classof(const Trait *t);
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_SIDEEFFECTS_H_
diff --git a/mlir/include/mlir/TableGen/Successor.h b/mlir/include/mlir/TableGen/Successor.h
index 0659a983f0d5..64f038675189 100644
--- a/mlir/include/mlir/TableGen/Successor.h
+++ b/mlir/include/mlir/TableGen/Successor.h
@@ -38,7 +38,7 @@ struct NamedSuccessor {
Successor constraint;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_SUCCESSOR_H_
diff --git a/mlir/include/mlir/TableGen/Trait.h b/mlir/include/mlir/TableGen/Trait.h
index 52d056d0581e..c3d0d2af7ed4 100644
--- a/mlir/include/mlir/TableGen/Trait.h
+++ b/mlir/include/mlir/TableGen/Trait.h
@@ -20,7 +20,7 @@
namespace llvm {
class Init;
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -110,7 +110,7 @@ class InterfaceTrait : public Trait {
std::vector<StringRef> getAlwaysDeclaredMethods() const;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_TRAIT_H_
diff --git a/mlir/include/mlir/TableGen/Type.h b/mlir/include/mlir/TableGen/Type.h
index 7fc892690a25..1828e88461b3 100644
--- a/mlir/include/mlir/TableGen/Type.h
+++ b/mlir/include/mlir/TableGen/Type.h
@@ -20,7 +20,7 @@
namespace llvm {
class DefInit;
class Record;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -72,7 +72,7 @@ class Type : public TypeConstraint {
Dialect getDialect() const;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TABLEGEN_TYPE_H_
diff --git a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
index cdba5a809493..983a5fd23d09 100644
--- a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
+++ b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
@@ -39,7 +39,7 @@ namespace LLVM {
namespace detail {
class DebugTranslation;
-} // end namespace detail
+} // namespace detail
class LLVMFuncOp;
diff --git a/mlir/include/mlir/Target/SPIRV/Deserialization.h b/mlir/include/mlir/Target/SPIRV/Deserialization.h
index ab7cce673d6d..e39258beeaac 100644
--- a/mlir/include/mlir/Target/SPIRV/Deserialization.h
+++ b/mlir/include/mlir/Target/SPIRV/Deserialization.h
@@ -29,7 +29,7 @@ class ModuleOp;
OwningOpRef<spirv::ModuleOp> deserialize(ArrayRef<uint32_t> binary,
MLIRContext *context);
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_TARGET_SPIRV_DESERIALIZATION_H
diff --git a/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h b/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
index f12ca452236d..dc2b8c7edec4 100644
--- a/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
+++ b/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
@@ -41,7 +41,7 @@ uint32_t getPrefixedOpcode(uint32_t wordCount, spirv::Opcode opcode);
/// Encodes an SPIR-V `literal` string into the given `binary` vector.
LogicalResult encodeStringLiteralInto(SmallVectorImpl<uint32_t> &binary,
StringRef literal);
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_TARGET_SPIRV_BINARY_UTILS_H_
diff --git a/mlir/include/mlir/Target/SPIRV/Serialization.h b/mlir/include/mlir/Target/SPIRV/Serialization.h
index d8431dc7dc2a..25033e2c4f16 100644
--- a/mlir/include/mlir/Target/SPIRV/Serialization.h
+++ b/mlir/include/mlir/Target/SPIRV/Serialization.h
@@ -28,7 +28,7 @@ class ModuleOp;
LogicalResult serialize(ModuleOp module, SmallVectorImpl<uint32_t> &binary,
bool emitDebugInfo = false);
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_TARGET_SPIRV_SERIALIZATION_H
diff --git a/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h b/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h
index dcfece9bb191..14912f1c308c 100644
--- a/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h
+++ b/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h
@@ -23,6 +23,6 @@ struct LogicalResult;
LogicalResult MlirLspServerMain(int argc, char **argv,
DialectRegistry ®istry);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRLSPSERVER_MLIRLSPSERVERMAIN_H
diff --git a/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h b/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h
index 03ac6b84beaa..0e6b589934b6 100644
--- a/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h
+++ b/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h
@@ -17,6 +17,6 @@ class MLIRContext;
LogicalResult mlirReduceMain(int argc, char **argv, MLIRContext &context);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRREDUCE_MLIRREDUCEMAIN_H
diff --git a/mlir/include/mlir/Transforms/BufferUtils.h b/mlir/include/mlir/Transforms/BufferUtils.h
index 8929124ce1b3..d9d06963fb28 100644
--- a/mlir/include/mlir/Transforms/BufferUtils.h
+++ b/mlir/include/mlir/Transforms/BufferUtils.h
@@ -137,6 +137,6 @@ class GlobalCreator {
// dependence to the memref dialect for this.
DenseMap<Attribute, Operation *> globals;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_BUFFERUTILS_H
diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h
index d5fb29387b2b..d840c996f69b 100644
--- a/mlir/include/mlir/Transforms/DialectConversion.h
+++ b/mlir/include/mlir/Transforms/DialectConversion.h
@@ -518,7 +518,7 @@ void populateFuncOpTypeConversionPattern(RewritePatternSet &patterns,
namespace detail {
struct ConversionPatternRewriterImpl;
-} // end namespace detail
+} // namespace detail
/// This class implements a pattern rewriter for use with ConversionPatterns. It
/// extends the base PatternRewriter and provides special conversion specific
@@ -946,6 +946,6 @@ LogicalResult applyAnalysisConversion(
const FrozenRewritePatternSet &patterns,
DenseSet<Operation *> &convertedOps,
function_ref<void(Diagnostic &)> notifyCallback = nullptr);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_DIALECTCONVERSION_H_
diff --git a/mlir/include/mlir/Transforms/FoldUtils.h b/mlir/include/mlir/Transforms/FoldUtils.h
index 7f4166c12ded..49af0f45e1a2 100644
--- a/mlir/include/mlir/Transforms/FoldUtils.h
+++ b/mlir/include/mlir/Transforms/FoldUtils.h
@@ -138,6 +138,6 @@ class OperationFolder {
DialectInterfaceCollection<DialectFoldInterface> interfaces;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_FOLDUTILS_H
diff --git a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
index bb0af5bded9b..d9d272110b31 100644
--- a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+++ b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
@@ -94,6 +94,6 @@ bool applyOpPatternsAndFold(ArrayRef<Operation *> ops,
const FrozenRewritePatternSet &patterns,
bool strict);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_GREEDYPATTERNREWRITEDRIVER_H_
diff --git a/mlir/include/mlir/Transforms/InliningUtils.h b/mlir/include/mlir/Transforms/InliningUtils.h
index 1bf318cf0ece..a664ae4d8f3f 100644
--- a/mlir/include/mlir/Transforms/InliningUtils.h
+++ b/mlir/include/mlir/Transforms/InliningUtils.h
@@ -244,6 +244,6 @@ LogicalResult inlineCall(InlinerInterface &interface, CallOpInterface call,
CallableOpInterface callable, Region *src,
bool shouldCloneInlinedRegion = true);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_INLINING_UTILS_H
diff --git a/mlir/include/mlir/Transforms/LocationSnapshot.h b/mlir/include/mlir/Transforms/LocationSnapshot.h
index 9012494cd46f..1da114574c9a 100644
--- a/mlir/include/mlir/Transforms/LocationSnapshot.h
+++ b/mlir/include/mlir/Transforms/LocationSnapshot.h
@@ -61,6 +61,6 @@ std::unique_ptr<Pass> createLocationSnapshotPass(OpPrintingFlags flags,
/// Overload utilizing pass options for initialization.
std::unique_ptr<Pass> createLocationSnapshotPass();
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_LOCATIONSNAPSHOT_H
diff --git a/mlir/include/mlir/Transforms/LoopFusionUtils.h b/mlir/include/mlir/Transforms/LoopFusionUtils.h
index 87a71b6041db..02eeb3e981eb 100644
--- a/mlir/include/mlir/Transforms/LoopFusionUtils.h
+++ b/mlir/include/mlir/Transforms/LoopFusionUtils.h
@@ -165,6 +165,6 @@ bool getFusionComputeCost(AffineForOp srcForOp, LoopNestStats &srcStats,
void gatherProducerConsumerMemrefs(ArrayRef<Operation *> srcOps,
ArrayRef<Operation *> dstOps,
DenseSet<Value> &producerConsumerMemrefs);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_LOOP_FUSION_UTILS_H
diff --git a/mlir/include/mlir/Transforms/LoopUtils.h b/mlir/include/mlir/Transforms/LoopUtils.h
index f2651be24b15..70e7395237ec 100644
--- a/mlir/include/mlir/Transforms/LoopUtils.h
+++ b/mlir/include/mlir/Transforms/LoopUtils.h
@@ -32,7 +32,7 @@ class ValueRange;
namespace scf {
class ForOp;
class ParallelOp;
-} // end namespace scf
+} // namespace scf
/// Unrolls this for operation completely if the trip count is known to be
/// constant. Returns failure otherwise.
@@ -323,6 +323,6 @@ separateFullTiles(MutableArrayRef<AffineForOp> nest,
/// Move loop invariant code out of `looplike`.
LogicalResult moveLoopInvariantCode(LoopLikeOpInterface looplike);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_LOOP_UTILS_H
diff --git a/mlir/include/mlir/Transforms/Passes.h b/mlir/include/mlir/Transforms/Passes.h
index 8ec611048a4d..e6cfda886363 100644
--- a/mlir/include/mlir/Transforms/Passes.h
+++ b/mlir/include/mlir/Transforms/Passes.h
@@ -137,6 +137,6 @@ std::unique_ptr<OperationPass<ModuleOp>> createNormalizeMemRefsPass();
#define GEN_PASS_REGISTRATION
#include "mlir/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_PASSES_H
diff --git a/mlir/include/mlir/Transforms/Utils.h b/mlir/include/mlir/Transforms/Utils.h
index bac651909a16..5280c2648bfa 100644
--- a/mlir/include/mlir/Transforms/Utils.h
+++ b/mlir/include/mlir/Transforms/Utils.h
@@ -30,7 +30,7 @@ class OpBuilder;
namespace memref {
class AllocOp;
-} // end namespace memref
+} // namespace memref
/// Replaces all "dereferencing" uses of `oldMemRef` with `newMemRef` while
/// optionally remapping the old memref's indices using the supplied affine map,
@@ -147,6 +147,6 @@ Operation *createComposedAffineApplyOp(OpBuilder &builder, Location loc,
void createAffineComputationSlice(Operation *opInst,
SmallVectorImpl<AffineApplyOp> *sliceOps);
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_UTILS_H
diff --git a/mlir/include/mlir/Transforms/ViewOpGraph.h b/mlir/include/mlir/Transforms/ViewOpGraph.h
index ec1b6c281e87..9fd2fe2fbefe 100644
--- a/mlir/include/mlir/Transforms/ViewOpGraph.h
+++ b/mlir/include/mlir/Transforms/ViewOpGraph.h
@@ -23,6 +23,6 @@ class Pass;
std::unique_ptr<Pass>
createPrintOpGraphPass(raw_ostream &os = llvm::errs());
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_TRANSFORMS_VIEWOPGRAPH_H_
diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp
index ea600eed4d80..34bd07ecc9e5 100644
--- a/mlir/lib/Analysis/AffineStructures.cpp
+++ b/mlir/lib/Analysis/AffineStructures.cpp
@@ -66,7 +66,7 @@ struct AffineExprFlattener : public SimpleAffineExprFlattener {
}
};
-} // end anonymous namespace
+} // namespace
// Flattens the expressions in map. Returns failure if 'expr' was unable to be
// flattened (i.e., semi-affine expressions not handled yet).
diff --git a/mlir/lib/Analysis/DataFlowAnalysis.cpp b/mlir/lib/Analysis/DataFlowAnalysis.cpp
index b91d2de602fe..c6642112e8cb 100644
--- a/mlir/lib/Analysis/DataFlowAnalysis.cpp
+++ b/mlir/lib/Analysis/DataFlowAnalysis.cpp
@@ -211,7 +211,7 @@ class ForwardDataFlowSolver {
/// A symbol table used for O(1) symbol lookups during simplification.
SymbolTableCollection symbolTable;
};
-} // end anonymous namespace
+} // namespace
ForwardDataFlowSolver::ForwardDataFlowSolver(
ForwardDataFlowAnalysisBase &analysis, Operation *op)
diff --git a/mlir/lib/Analysis/NestedMatcher.cpp b/mlir/lib/Analysis/NestedMatcher.cpp
index bd5ac0b39ec4..a72b3cbb356a 100644
--- a/mlir/lib/Analysis/NestedMatcher.cpp
+++ b/mlir/lib/Analysis/NestedMatcher.cpp
@@ -171,5 +171,5 @@ bool isLoadOrStore(Operation &op) {
return isa<AffineLoadOp, AffineStoreOp>(op);
}
-} // end namespace matcher
-} // end namespace mlir
+} // namespace matcher
+} // namespace mlir
diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp
index dbfc1186db4e..0e7ab343a2e1 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -141,7 +141,7 @@ bool signMatchesDirection(int64_t elem, Direction direction) {
Direction flippedDirection(Direction direction) {
return direction == Direction::Up ? Direction::Down : Simplex::Direction::Up;
}
-} // anonymous namespace
+} // namespace
/// Find a pivot to change the sample value of the row in the specified
/// direction. The returned pivot row will involve `row` if and only if the
diff --git a/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp b/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp
index b5a0f84d4aba..814209197505 100644
--- a/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp
+++ b/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp
@@ -62,7 +62,7 @@ class PyExecutionEngine {
std::vector<py::object> referencedObjects;
};
-} // anonymous namespace
+} // namespace
/// Create the `mlir.execution_engine` module here.
PYBIND11_MODULE(_mlirExecutionEngine, m) {
diff --git a/mlir/lib/Bindings/Python/IRAffine.cpp b/mlir/lib/Bindings/Python/IRAffine.cpp
index 272de0d7aaaf..faf01e5c5f11 100644
--- a/mlir/lib/Bindings/Python/IRAffine.cpp
+++ b/mlir/lib/Bindings/Python/IRAffine.cpp
@@ -397,7 +397,7 @@ class PyAffineMapExprList
private:
PyAffineMap affineMap;
};
-} // end namespace
+} // namespace
bool PyAffineMap::operator==(const PyAffineMap &other) {
return mlirAffineMapEqual(affineMap, other.affineMap);
diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 0d349143306c..cd5755248ea2 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -2012,7 +2012,7 @@ class PyOpAttributeMap {
PyOperationRef operation;
};
-} // end namespace
+} // namespace
//------------------------------------------------------------------------------
// Populates the core exports of the 'ir' submodule.
diff --git a/mlir/lib/Bindings/Python/Pass.cpp b/mlir/lib/Bindings/Python/Pass.cpp
index 2c38a3a25c6c..dba2231a153e 100644
--- a/mlir/lib/Bindings/Python/Pass.cpp
+++ b/mlir/lib/Bindings/Python/Pass.cpp
@@ -48,7 +48,7 @@ class PyPassManager {
MlirPassManager passManager;
};
-} // anonymous namespace
+} // namespace
/// Create the `mlir.passmanager` here.
void mlir::python::populatePassManagerSubmodule(py::module &m) {
diff --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
index d5802e28f563..0467dd9c2bfe 100644
--- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -722,7 +722,7 @@ class AffineVectorStoreLowering : public OpRewritePattern<AffineVectorStoreOp> {
}
};
-} // end namespace
+} // namespace
void mlir::populateAffineToStdConversionPatterns(RewritePatternSet &patterns) {
// clang-format off
diff --git a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp
index 07078c77626e..f8d59e08f983 100644
--- a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp
+++ b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp
@@ -108,7 +108,7 @@ struct CmpFOpLowering : public ConvertOpToLLVMPattern<arith::CmpFOp> {
ConversionPatternRewriter &rewriter) const override;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ConstantOpLowering
@@ -252,7 +252,7 @@ struct ConvertArithmeticToLLVMPass
signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Pattern Population
diff --git a/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp b/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
index 9f1e0a41a77a..da62168576ae 100644
--- a/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
+++ b/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
@@ -190,7 +190,7 @@ class CmpFOpNanNonePattern final : public OpConversionPattern<arith::CmpFOp> {
ConversionPatternRewriter &rewriter) const override;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Conversion Helpers
@@ -845,7 +845,7 @@ struct ConvertArithmeticToSPIRVPass
signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::arith::createConvertArithmeticToSPIRVPass() {
return std::make_unique<ConvertArithmeticToSPIRVPass>();
diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
index ac43d1a98791..9768211d3142 100644
--- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
+++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
@@ -173,7 +173,7 @@ struct LowerGpuOpsToNVVMOpsPass
}
};
-} // anonymous namespace
+} // namespace
void mlir::configureGpuToNVVMConversionLegality(ConversionTarget &target) {
target.addIllegalOp<FuncOp>();
diff --git a/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp b/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
index 55935e7f971f..f52e589ad9df 100644
--- a/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
+++ b/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
@@ -356,7 +356,7 @@ struct WmmaElementwiseOpToNVVMLowering
}
};
-} // anonymous namespace
+} // namespace
namespace mlir {
diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
index b074e4156331..1a570dc5985b 100644
--- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
+++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
@@ -87,7 +87,7 @@ struct LowerGpuOpsToROCDLOpsPass
}
};
-} // anonymous namespace
+} // namespace
void mlir::configureGpuToROCDLConversionLegality(ConversionTarget &target) {
target.addIllegalOp<FuncOp>();
diff --git a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
index 45222e5a9e39..e106ebf3c44c 100644
--- a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
+++ b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
@@ -74,7 +74,7 @@ class ConvertGpuLaunchFuncToVulkanLaunchFunc
static constexpr unsigned kVulkanLaunchNumConfigOperands = 3;
};
-} // anonymous namespace
+} // namespace
void ConvertGpuLaunchFuncToVulkanLaunchFunc::runOnOperation() {
bool done = false;
diff --git a/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
index 200fc3e21149..b8d1a8556395 100644
--- a/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
+++ b/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
@@ -166,7 +166,7 @@ class VulkanLaunchFuncToVulkanCallsPass
static constexpr unsigned kVulkanLaunchNumConfigOperands = 3;
};
-} // anonymous namespace
+} // namespace
void VulkanLaunchFuncToVulkanCallsPass::runOnOperation() {
initializeCachedTypes();
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
index d69c24e6a33a..87dcd2723686 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
@@ -135,7 +135,7 @@ struct PatternLowering {
/// generated operations.
SetVector<Value> locOps;
};
-} // end anonymous namespace
+} // namespace
PatternLowering::PatternLowering(FuncOp matcherFunc, ModuleOp rewriterModule)
: builder(matcherFunc.getContext()), matcherFunc(matcherFunc),
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h
index 1b7a3bb98bc5..4a7dcdc696f4 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h
+++ b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h
@@ -71,7 +71,7 @@ enum Kind : unsigned {
TypeAnswer,
UnsignedAnswer,
};
-} // end namespace Predicates
+} // namespace Predicates
/// Base class for all predicates, used to allow efficient pointer comparison.
template <typename ConcreteT, typename BaseT, typename Key,
@@ -639,7 +639,7 @@ class PredicateBuilder {
MLIRContext *ctx;
};
-} // end namespace pdl_to_pdl_interp
-} // end namespace mlir
+} // namespace pdl_to_pdl_interp
+} // namespace mlir
#endif // MLIR_CONVERSION_PDLTOPDLINTERP_PREDICATE_H_
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
index 2466a80d0b64..7e2219ca1416 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
@@ -690,7 +690,7 @@ struct OrderedPredicateList {
Value root;
DenseSet<OrderedPredicate *> predicates;
};
-} // end anonymous namespace
+} // namespace
/// Returns true if the given matcher refers to the same predicate as the given
/// ordered predicate. This means that the position and questions of the two
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.h b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.h
index 796eb762c97d..9ce88d4b37be 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.h
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.h
@@ -208,7 +208,7 @@ struct SwitchNode : public MatcherNode {
ChildMapT children;
};
-} // end namespace pdl_to_pdl_interp
-} // end namespace mlir
+} // namespace pdl_to_pdl_interp
+} // namespace mlir
#endif // MLIR_CONVERSION_PDLTOPDLINTERP_PREDICATETREE_H_
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h b/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h
index 8fcd320a7aa5..642b6a076f5c 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h
+++ b/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h
@@ -131,7 +131,7 @@ class OptimalBranching {
DenseMap<Value, Value> parents;
};
-} // end namespace pdl_to_pdl_interp
-} // end namespace mlir
+} // namespace pdl_to_pdl_interp
+} // namespace mlir
#endif // MLIR_CONVERSION_PDLTOPDLINTERP_ROOTORDERING_H_
diff --git a/mlir/lib/Conversion/PassDetail.h b/mlir/lib/Conversion/PassDetail.h
index 5b4bc9231646..d9f47138aae5 100644
--- a/mlir/lib/Conversion/PassDetail.h
+++ b/mlir/lib/Conversion/PassDetail.h
@@ -21,76 +21,76 @@ void registerDialect(DialectRegistry ®istry);
namespace acc {
class OpenACCDialect;
-} // end namespace acc
+} // namespace acc
namespace arith {
class ArithmeticDialect;
-} // end namespace arith
+} // namespace arith
namespace complex {
class ComplexDialect;
-} // end namespace complex
+} // namespace complex
namespace gpu {
class GPUDialect;
class GPUModuleOp;
-} // end namespace gpu
+} // namespace gpu
namespace LLVM {
class LLVMDialect;
-} // end namespace LLVM
+} // namespace LLVM
namespace NVVM {
class NVVMDialect;
-} // end namespace NVVM
+} // namespace NVVM
namespace math {
class MathDialect;
-} // end namespace math
+} // namespace math
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace omp {
class OpenMPDialect;
-} // end namespace omp
+} // namespace omp
namespace pdl_interp {
class PDLInterpDialect;
-} // end namespace pdl_interp
+} // namespace pdl_interp
namespace ROCDL {
class ROCDLDialect;
-} // end namespace ROCDL
+} // namespace ROCDL
namespace scf {
class SCFDialect;
-} // end namespace scf
+} // namespace scf
namespace spirv {
class SPIRVDialect;
-} // end namespace spirv
+} // namespace spirv
namespace tensor {
class TensorDialect;
-} // end namespace tensor
+} // namespace tensor
namespace tosa {
class TosaDialect;
-} // end namespace tosa
+} // namespace tosa
namespace vector {
class VectorDialect;
-} // end namespace vector
+} // namespace vector
namespace arm_neon {
class ArmNeonDialect;
-} // end namespace arm_neon
+} // namespace arm_neon
#define GEN_PASS_CLASSES
#include "mlir/Conversion/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // CONVERSION_PASSDETAIL_H_
diff --git a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
index 90d870fe82a2..657f04111f02 100644
--- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
+++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
@@ -451,7 +451,7 @@ struct SCFToOpenMPPass : public ConvertSCFToOpenMPBase<SCFToOpenMPPass> {
}
};
-} // end namespace
+} // namespace
std::unique_ptr<OperationPass<ModuleOp>> mlir::createConvertSCFToOpenMPPass() {
return std::make_unique<SCFToOpenMPPass>();
diff --git a/mlir/lib/Conversion/SPIRVCommon/Pattern.h b/mlir/lib/Conversion/SPIRVCommon/Pattern.h
index 26ffeec57396..39338995c297 100644
--- a/mlir/lib/Conversion/SPIRVCommon/Pattern.h
+++ b/mlir/lib/Conversion/SPIRVCommon/Pattern.h
@@ -39,7 +39,7 @@ class UnaryAndBinaryOpPattern final : public OpConversionPattern<Op> {
}
};
-} // end namespace spirv
-} // end namespace mlir
+} // namespace spirv
+} // namespace mlir
#endif // MLIR_CONVERSION_SPIRVCOMMON_PATTERN_H
diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
index fcaba6e87483..200834a2d1bc 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -1052,7 +1052,7 @@ struct LLVMLoweringPass : public ConvertStandardToLLVMBase<LLVMLoweringPass> {
StringAttr::get(m.getContext(), this->dataLayout));
}
};
-} // end namespace
+} // namespace
std::unique_ptr<OperationPass<ModuleOp>> mlir::createLowerToLLVMPass() {
return std::make_unique<LLVMLoweringPass>();
diff --git a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
index 50b4c3a8dd2e..a9a3f53ee36e 100644
--- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
+++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
@@ -145,7 +145,7 @@ class VectorTransferConversion : public ConvertOpToLLVMPattern<ConcreteOp> {
vecTy, dwordConfig, int32Zero, int32Zero, int1False, int1False);
}
};
-} // end anonymous namespace
+} // namespace
void mlir::populateVectorToROCDLConversionPatterns(
LLVMTypeConverter &converter, RewritePatternSet &patterns) {
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 48affcd2c1ee..edbcba763f0c 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -204,7 +204,7 @@ struct AffineInlinerInterface : public DialectInlinerInterface {
/// Affine regions should be analyzed recursively.
bool shouldAnalyzeRecursively(Operation *op) const final { return true; }
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// AffineDialect
@@ -944,7 +944,7 @@ void SimplifyAffineOp<AffineOpTy>::replaceAffineOp(
ArrayRef<Value> mapOperands) const {
rewriter.replaceOpWithNewOp<AffineOpTy>(op, map, mapOperands);
}
-} // end anonymous namespace.
+} // namespace
void AffineApplyOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
@@ -1651,7 +1651,7 @@ struct AffineForEmptyLoopFolder : public OpRewritePattern<AffineForOp> {
return success();
}
};
-} // end anonymous namespace
+} // namespace
void AffineForOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
@@ -2033,7 +2033,7 @@ struct AlwaysTrueOrFalseIf : public OpRewritePattern<AffineIfOp> {
return success();
}
};
-} // end anonymous namespace.
+} // namespace
static LogicalResult verify(AffineIfOp op) {
// Verify that we have a condition attribute.
diff --git a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
index dad2cab64552..218764dbec26 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
@@ -72,7 +72,7 @@ struct AffineDataCopyGeneration
Value zeroIndex = nullptr;
};
-} // end anonymous namespace
+} // namespace
/// Generates copies for memref's living in 'slowMemorySpace' into newly created
/// buffers in 'fastMemorySpace', and replaces memory operations to the former
diff --git a/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
index a6d5f43819b2..b6f9e4c70631 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
@@ -47,7 +47,7 @@ struct LoopInvariantCodeMotion
void runOnFunction() override;
void runOnAffineForOp(AffineForOp forOp);
};
-} // end anonymous namespace
+} // namespace
static bool
checkInvarianceOfNestedIfOps(Operation *op, Value indVar, ValueRange iterArgs,
diff --git a/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
index e1b635a110a2..d3df2138f007 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
@@ -75,7 +75,7 @@ struct AffineScalarReplacement
PostDominanceInfo &postDominanceInfo);
};
-} // end anonymous namespace
+} // namespace
/// Creates a pass to perform optimizations relying on memref dataflow such as
/// store to load forwarding, elimination of dead stores, and dead allocs.
diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
index 5a42c569dbef..69d21c66e1a4 100644
--- a/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
@@ -49,7 +49,7 @@ struct LoopTiling : public AffineLoopTilingBase<LoopTiling> {
bool avoidMaxMinBounds = true;
};
-} // end anonymous namespace
+} // namespace
/// Creates a pass to perform loop tiling on all suitable loop nests of a
/// Function.
diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
index 9682104b356e..f876153834bb 100644
--- a/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
@@ -59,7 +59,7 @@ struct LoopUnroll : public AffineLoopUnrollBase<LoopUnroll> {
/// Unroll this for op. Returns failure if nothing was done.
LogicalResult runOnAffineForOp(AffineForOp forOp);
};
-} // end anonymous namespace
+} // namespace
/// Returns true if no other affine.for ops are nested within.
static bool isInnermostAffineForOp(AffineForOp forOp) {
diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
index 76da2b07ef19..cf8e15104f8b 100644
--- a/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
@@ -61,7 +61,7 @@ struct LoopUnrollAndJam : public AffineLoopUnrollAndJamBase<LoopUnrollAndJam> {
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<OperationPass<FuncOp>>
mlir::createLoopUnrollAndJamPass(int unrollJamFactor) {
diff --git a/mlir/lib/Dialect/Affine/Transforms/PassDetail.h b/mlir/lib/Dialect/Affine/Transforms/PassDetail.h
index 3ba6fa182686..c3d55a60e563 100644
--- a/mlir/lib/Dialect/Affine/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Affine/Transforms/PassDetail.h
@@ -18,19 +18,19 @@ void registerDialect(DialectRegistry ®istry);
namespace linalg {
class LinalgDialect;
-} // end namespace linalg
+} // namespace linalg
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace vector {
class VectorDialect;
-} // end namespace vector
+} // namespace vector
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Affine/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_AFFINE_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp b/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
index 275338918fb0..04417b92b8e1 100644
--- a/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
@@ -69,7 +69,7 @@ struct SimplifyAffineStructures
DenseMap<Attribute, Attribute> simplifiedAttributes;
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<OperationPass<FuncOp>>
mlir::createSimplifyAffineStructuresPass() {
diff --git a/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp b/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
index 827556dca293..0e41d02d3c27 100644
--- a/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
@@ -611,7 +611,7 @@ struct Vectorize : public AffineVectorizeBase<Vectorize> {
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
Vectorize::Vectorize(ArrayRef<int64_t> virtualVectorSize) {
vectorSizes = virtualVectorSize;
@@ -764,7 +764,7 @@ struct VectorizationState {
void registerValueScalarReplacementImpl(Value replaced, Value replacement);
};
-} // end namespace
+} // namespace
/// Registers the vector replacement of a scalar operation and its result
/// values. Both operations must have the same number of results.
diff --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp
index f65f8664a42a..ea4acbc0c9a2 100644
--- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp
+++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp
@@ -27,7 +27,7 @@ struct ArithmeticInlinerInterface : public DialectInlinerInterface {
return true;
}
};
-} // end anonymous namespace
+} // namespace
void arith::ArithmeticDialect::initialize() {
addOperations<
diff --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
index b65b152124df..dc4809ac7bc2 100644
--- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
+++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
@@ -73,7 +73,7 @@ static arith::CmpIPredicateAttr invertPredicate(arith::CmpIPredicateAttr pred) {
namespace {
#include "ArithmeticCanonicalization.inc"
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ConstantOp
diff --git a/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp
index 9a0e8c7ba7b6..a7691e53ce6f 100644
--- a/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp
@@ -55,7 +55,7 @@ struct ArithmeticBufferizePass
}
};
-} // end anonymous namespace
+} // namespace
void mlir::arith::populateArithmeticBufferizePatterns(
bufferization::BufferizeTypeConverter &typeConverter,
diff --git a/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
index e97afac9ca2d..d9ab92751238 100644
--- a/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
+++ b/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
@@ -223,7 +223,7 @@ struct ArithmeticExpandOpsPass
}
};
-} // end anonymous namespace
+} // namespace
void mlir::arith::populateArithmeticExpandOpsPatterns(
RewritePatternSet &patterns) {
diff --git a/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h b/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
index 1f3f27466bf0..0947804f125f 100644
--- a/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
@@ -17,15 +17,15 @@ class StandardOpsDialect;
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Arithmetic/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_ARITHMETIC_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Async/Transforms/PassDetail.h b/mlir/lib/Dialect/Async/Transforms/PassDetail.h
index 6d2321486d37..9eb93bb4caae 100644
--- a/mlir/lib/Dialect/Async/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Async/Transforms/PassDetail.h
@@ -16,7 +16,7 @@ namespace mlir {
namespace arith {
class ArithmeticDialect;
-} // end namespace arith
+} // namespace arith
namespace async {
class AsyncDialect;
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
index 84980bf54886..601ba9597bec 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
@@ -28,7 +28,7 @@ struct BufferizationInlinerInterface : public DialectInlinerInterface {
return true;
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Bufferization Dialect
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
index 5f93007b8e4a..f81d726108d1 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
@@ -100,7 +100,7 @@ struct SimplifyClones : public OpRewritePattern<CloneOp> {
}
};
-} // namespace.
+} // namespace
void CloneOp::getCanonicalizationPatterns(OwningRewritePatternList &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
index d82170be9b77..49a39b621f37 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
@@ -665,7 +665,7 @@ struct BufferDeallocationPass : BufferDeallocationBase<BufferDeallocationPass> {
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// BufferDeallocationPass construction
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
index 4565707e1fa0..37f88113c59b 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
@@ -17,15 +17,15 @@ class StandardOpsDialect;
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_BUFFERIZATION_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
index dc1949f012bc..579c385d653c 100644
--- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
@@ -1177,7 +1177,7 @@ struct SimplifyDimOfAllocOp : public OpRewritePattern<memref::DimOp> {
}
};
-} // end anonymous namespace.
+} // namespace
void AllocOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/GPU/Transforms/PassDetail.h b/mlir/lib/Dialect/GPU/Transforms/PassDetail.h
index c83ac3035a40..ab352a003495 100644
--- a/mlir/lib/Dialect/GPU/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/GPU/Transforms/PassDetail.h
@@ -17,6 +17,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Dialect/GPU/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_GPU_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp b/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
index e8ad4ecd2593..6f488b0362a6 100644
--- a/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
@@ -104,7 +104,7 @@ class SerializeToHsacoPass
std::string getRocmPath();
};
-} // end namespace
+} // namespace
SerializeToHsacoPass::SerializeToHsacoPass(const SerializeToHsacoPass &other)
: PassWrapper<SerializeToHsacoPass, gpu::SerializeToBlobPass>(other) {}
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index 2c320a380d9c..1688fa467e21 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -1502,7 +1502,7 @@ struct EnumTraits {};
REGISTER_ENUM_TYPE(Linkage);
REGISTER_ENUM_TYPE(UnnamedAddr);
-} // end namespace
+} // namespace
/// Parse an enum from the keyword, or default to the provided default value.
/// The return type is the enum type by default, unless overriden with the
diff --git a/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h b/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
index cf8e46842662..0481d1555893 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
+++ b/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
@@ -426,8 +426,8 @@ struct LLVMTypeAndSizeStorage : public TypeStorage {
unsigned numElements;
};
-} // end namespace detail
-} // end namespace LLVM
-} // end namespace mlir
+} // namespace detail
+} // namespace LLVM
+} // namespace mlir
#endif // DIALECT_LLVMIR_IR_TYPEDETAIL_H
diff --git a/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp b/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
index 93b400f95a13..3bf306dba493 100644
--- a/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
+++ b/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
@@ -63,7 +63,7 @@ struct LegalizeForExportPass
LLVM::ensureDistinctSuccessors(getOperation());
}
};
-} // end namespace
+} // namespace
std::unique_ptr<Pass> LLVM::createLegalizeForExportPass() {
return std::make_unique<LegalizeForExportPass>();
diff --git a/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h b/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h
index 2a46e1208bc4..8449f77d4457 100644
--- a/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h
@@ -16,6 +16,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_LLVMIR_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
index 4ea37ce25c64..4d004352c683 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
@@ -53,7 +53,7 @@ struct LinalgInlinerInterface : public DialectInlinerInterface {
ArrayRef<Value> valuesToRepl) const final {}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// LinalgDialect
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
index ede2f965036e..bd6e8cd87d99 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
@@ -339,7 +339,7 @@ struct LinalgBufferizePass : public LinalgBufferizeBase<LinalgBufferizePass> {
signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<OperationPass<FuncOp>> mlir::createLinalgBufferizePass() {
return std::make_unique<LinalgBufferizePass>();
diff --git a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
index f90b5e5e20ec..58f5845f0bf4 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
@@ -56,7 +56,7 @@ struct LinalgComprehensiveModuleBufferize
vector_ext::registerBufferizableOpInterfaceExternalModels(registry);
}
};
-} // end namespace
+} // namespace
static void applyEnablingTransformations(ModuleOp moduleOp) {
RewritePatternSet patterns(moduleOp.getContext());
diff --git a/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h b/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h
index 01a8d14111cc..b499dbbf0322 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h
@@ -20,31 +20,31 @@ void registerDialect(DialectRegistry ®istry);
namespace arith {
class ArithmeticDialect;
-} // end namespace arith
+} // namespace arith
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace linalg {
class LinalgDialect;
-} // end namespace linalg
+} // namespace linalg
namespace scf {
class SCFDialect;
-} // end namespace scf
+} // namespace scf
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace vector {
class VectorDialect;
-} // end namespace vector
+} // namespace vector
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Linalg/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_LINALG_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Math/IR/MathDialect.cpp b/mlir/lib/Dialect/Math/IR/MathDialect.cpp
index eb2140049174..0f7307cd68b5 100644
--- a/mlir/lib/Dialect/Math/IR/MathDialect.cpp
+++ b/mlir/lib/Dialect/Math/IR/MathDialect.cpp
@@ -26,7 +26,7 @@ struct MathInlinerInterface : public DialectInlinerInterface {
return true;
}
};
-} // end anonymous namespace
+} // namespace
void mlir::math::MathDialect::initialize() {
addOperations<
diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
index 057cb4600adf..f27355835dfb 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
@@ -30,7 +30,7 @@ struct MemRefInlinerInterface : public DialectInlinerInterface {
return true;
}
};
-} // end anonymous namespace
+} // namespace
void mlir::memref::MemRefDialect::initialize() {
addOperations<
diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 938197df59c2..b9a78120a9e1 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -191,7 +191,7 @@ struct SimplifyDeadAlloc : public OpRewritePattern<T> {
return success();
}
};
-} // end anonymous namespace.
+} // namespace
void AllocOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
@@ -676,7 +676,7 @@ struct DimOfMemRefReshape : public OpRewritePattern<DimOp> {
}
};
-} // end anonymous namespace.
+} // namespace
void DimOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
@@ -1473,8 +1473,8 @@ Wrapper operator*(Wrapper a, int64_t b) {
return Wrapper(ShapedType::kDynamicStrideOrOffset);
return Wrapper(a.v * b);
}
-} // end namespace saturated_arith
-} // end namespace
+} // namespace saturated_arith
+} // namespace
/// A subview result type can be fully inferred from the source type and the
/// static representation of offsets, sizes and strides. Special sentinels
@@ -2190,7 +2190,7 @@ struct ViewOpMemrefCastFolder : public OpRewritePattern<ViewOp> {
}
};
-} // end anonymous namespace
+} // namespace
void ViewOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index 31475ec7b4f1..96f6ea57f697 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -40,7 +40,7 @@ struct PointerLikeModel
return pointer.cast<T>().getElementType();
}
};
-} // end namespace
+} // namespace
void OpenMPDialect::initialize() {
addOperations<
diff --git a/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp b/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
index 2c6299f9c71c..64844ef3ca65 100644
--- a/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
+++ b/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
@@ -32,7 +32,7 @@ struct QuantizedConstRewrite : public OpRewritePattern<QuantizeCastOp> {
PatternRewriter &rewriter) const override;
};
-} // end anonymous namespace
+} // namespace
/// Matches a [constant] -> [qbarrier] where the qbarrier results type is
/// quantized and the operand type is quantizable.
diff --git a/mlir/lib/Dialect/Quant/Transforms/PassDetail.h b/mlir/lib/Dialect/Quant/Transforms/PassDetail.h
index 8727bfc8b2aa..4d6fb3e1f371 100644
--- a/mlir/lib/Dialect/Quant/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Quant/Transforms/PassDetail.h
@@ -16,6 +16,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Quant/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_QUANT_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index e28accc93fd9..c7f1436f9fbb 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -54,7 +54,7 @@ struct SCFInlinerInterface : public DialectInlinerInterface {
}
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// SCFDialect
diff --git a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
index 399a5b18dafb..a3f9b5b8ca84 100644
--- a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
@@ -36,7 +36,7 @@ struct SCFBufferizePass : public SCFBufferizeBase<SCFBufferizePass> {
return signalPassFailure();
};
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::createSCFBufferizePass() {
return std::make_unique<SCFBufferizePass>();
diff --git a/mlir/lib/Dialect/SCF/Transforms/PassDetail.h b/mlir/lib/Dialect/SCF/Transforms/PassDetail.h
index 7dfdb203ea91..49f67c27873d 100644
--- a/mlir/lib/Dialect/SCF/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/SCF/Transforms/PassDetail.h
@@ -20,23 +20,23 @@ class AffineDialect;
namespace arith {
class ArithmeticDialect;
-} // end namespace arith
+} // namespace arith
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace tensor {
class TensorDialect;
-} // end namespace tensor
+} // namespace tensor
#define GEN_PASS_CLASSES
#include "mlir/Dialect/SCF/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_LOOPOPS_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
index c5125860d437..058854921001 100644
--- a/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
+++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
@@ -108,7 +108,7 @@ struct CombineChainedAccessChain
return success();
}
};
-} // end anonymous namespace
+} // namespace
void spirv::AccessChainOp::getCanonicalizationPatterns(
RewritePatternSet &results, MLIRContext *context) {
@@ -414,7 +414,7 @@ LogicalResult ConvertSelectionOpToSelect::canCanonicalizeSelection(
return success();
}
-} // end anonymous namespace
+} // namespace
void spirv::SelectionOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp
index 9c72dbb6f7aa..ccd4c1d92064 100644
--- a/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp
+++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp
@@ -18,7 +18,7 @@ using namespace mlir;
namespace {
#include "SPIRVCanonicalization.inc"
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace spirv {
diff --git a/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h b/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h
index cb4f01f1e908..da4f3c5c6be7 100644
--- a/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h
@@ -15,11 +15,11 @@ namespace mlir {
namespace spirv {
class ModuleOp;
-} // end namespace spirv
+} // namespace spirv
#define GEN_PASS_CLASSES
#include "mlir/Dialect/SPIRV/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_SPIRV_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp b/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp
index b89312fb8ae7..c381ee545121 100644
--- a/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp
+++ b/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp
@@ -38,7 +38,7 @@ class RewriteInsertsPass
SmallVectorImpl<spirv::CompositeInsertOp> &insertions);
};
-} // anonymous namespace
+} // namespace
void RewriteInsertsPass::runOnOperation() {
SmallVector<SmallVector<spirv::CompositeInsertOp, 4>, 4> workList;
diff --git a/mlir/lib/Dialect/Shape/Transforms/PassDetail.h b/mlir/lib/Dialect/Shape/Transforms/PassDetail.h
index 6f130c808b0e..d1d54b929d81 100644
--- a/mlir/lib/Dialect/Shape/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Shape/Transforms/PassDetail.h
@@ -15,15 +15,15 @@ namespace mlir {
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Shape/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_SHAPE_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
index 5e5d056419b2..8404aa621338 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
@@ -134,7 +134,7 @@ struct SparseTensorConversionPass
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::createSparsificationPass() {
return std::make_unique<SparsificationPass>();
diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index a974a4fe9262..1a43c0937d03 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -94,7 +94,7 @@ struct StdInlinerInterface : public DialectInlinerInterface {
valuesToRepl[it.index()].replaceAllUsesWith(it.value());
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// StandardOpsDialect
@@ -749,7 +749,7 @@ struct CondBranchTruthPropagation : public OpRewritePattern<CondBranchOp> {
return success(replaced);
}
};
-} // end anonymous namespace
+} // namespace
void CondBranchOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp b/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
index 58dda4860cca..2cd22ef9aa2f 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
+++ b/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
@@ -35,7 +35,7 @@ struct CallOpSignatureConversion : public OpConversionPattern<CallOp> {
return success();
}
};
-} // end anonymous namespace
+} // namespace
void mlir::populateCallOpTypeConversionPattern(RewritePatternSet &patterns,
TypeConverter &converter) {
@@ -85,7 +85,7 @@ class BranchOpInterfaceTypeConversion
private:
function_ref<bool(BranchOpInterface, int)> shouldConvertBranchOperand;
};
-} // end anonymous namespace
+} // namespace
namespace {
/// Only needed to support partial conversion of functions where this pattern
@@ -105,7 +105,7 @@ class ReturnOpTypeConversion : public OpConversionPattern<ReturnOp> {
return success();
}
};
-} // end anonymous namespace
+} // namespace
void mlir::populateBranchOpInterfaceTypeConversionPattern(
RewritePatternSet &patterns, TypeConverter &typeConverter,
diff --git a/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h b/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
index 38bf42c567d4..eadd026ead3c 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
@@ -18,15 +18,15 @@ class AtomicRMWOp;
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
#define GEN_PASS_CLASSES
#include "mlir/Dialect/StandardOps/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_STANDARD_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp b/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
index 860e0b84cfe6..0c180892cdaf 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
@@ -30,7 +30,7 @@ struct TensorInlinerInterface : public DialectInlinerInterface {
return true;
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// TensorDialect Methods
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index 7f1bd74cd37a..6edfe47fa957 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -313,7 +313,7 @@ struct DimOfCastOp : public OpRewritePattern<DimOp> {
return success();
}
};
-} // end anonymous namespace.
+} // namespace
void DimOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h b/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h
index 5c95f2434795..858a0ebf0b8f 100644
--- a/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h
@@ -15,19 +15,19 @@ namespace mlir {
namespace bufferization {
class BufferizationDialect;
-} // end namespace bufferization
+} // namespace bufferization
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace scf {
class SCFDialect;
-} // end namespace scf
+} // namespace scf
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Tensor/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // DIALECT_TENSOR_TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index 601e66006d6f..898bc258469f 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -60,7 +60,7 @@ struct TosaInlinerInterface : public DialectInlinerInterface {
isa<tosa::WhileOp>(dest->getParentOp()));
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// TOSA control flow support.
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
index c1fcca2d27e5..e623089f50f0 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
@@ -383,7 +383,7 @@ struct TosaDecomposeTransposeConv
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::tosa::createTosaDecomposeTransposeConvPass() {
return std::make_unique<TosaDecomposeTransposeConv>();
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
index cd94be1abf7e..33a1e34d2415 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
@@ -320,7 +320,7 @@ struct TosaInferShapes : public TosaInferShapesBase<TosaInferShapes> {
});
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::tosa::createTosaInferShapesPass() {
return std::make_unique<TosaInferShapes>();
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
index 36b228739433..d3b2297059b1 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
@@ -227,7 +227,7 @@ struct ConvertTosaOp<tosa::ArithmeticRightShiftOp>
return success();
}
};
-} // end anonymous namespace
+} // namespace
namespace {
/// Pass that enables broadcast by making all input arrays have the same
@@ -262,7 +262,7 @@ struct TosaMakeBroadcastable
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::tosa::createTosaMakeBroadcastablePass() {
return std::make_unique<TosaMakeBroadcastable>();
diff --git a/mlir/lib/Dialect/Vector/VectorOps.cpp b/mlir/lib/Dialect/Vector/VectorOps.cpp
index bbe7b7413f2c..9768483231c9 100644
--- a/mlir/lib/Dialect/Vector/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/VectorOps.cpp
@@ -2302,7 +2302,7 @@ class StridedSliceSplat final : public OpRewritePattern<ExtractStridedSliceOp> {
}
};
-} // end anonymous namespace
+} // namespace
void ExtractStridedSliceOp::getCanonicalizationPatterns(
RewritePatternSet &results, MLIRContext *context) {
@@ -3910,7 +3910,7 @@ class TransposeFolder final : public OpRewritePattern<vector::TransposeOp> {
}
};
-} // end anonymous namespace
+} // namespace
void vector::TransposeOp::getCanonicalizationPatterns(
RewritePatternSet &results, MLIRContext *context) {
@@ -4005,7 +4005,7 @@ class CreateMaskFolder final : public OpRewritePattern<CreateMaskOp> {
}
};
-} // end anonymous namespace
+} // namespace
void CreateMaskOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
diff --git a/mlir/lib/ExecutionEngine/JitRunner.cpp b/mlir/lib/ExecutionEngine/JitRunner.cpp
index 5ecce561a2f5..e45e5c9391a6 100644
--- a/mlir/lib/ExecutionEngine/JitRunner.cpp
+++ b/mlir/lib/ExecutionEngine/JitRunner.cpp
@@ -108,7 +108,7 @@ struct CompileAndExecuteConfig {
runtimeSymbolMap;
};
-} // end anonymous namespace
+} // namespace
static OwningModuleRef parseMLIRInput(StringRef inputFilename,
MLIRContext *context) {
diff --git a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
index 193e305e7b4d..9a5c8e41495c 100644
--- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
@@ -681,7 +681,7 @@ static SparseTensorCOO<V> *openSparseTensorCOO(char *filename, uint64_t rank,
return tensor;
}
-} // anonymous namespace
+} // namespace
extern "C" {
diff --git a/mlir/lib/IR/AffineExprDetail.h b/mlir/lib/IR/AffineExprDetail.h
index 1c38e54bc3e6..dfc10542b058 100644
--- a/mlir/lib/IR/AffineExprDetail.h
+++ b/mlir/lib/IR/AffineExprDetail.h
@@ -92,6 +92,6 @@ struct AffineConstantExprStorage : public AffineExprStorage {
int64_t constant;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_IR_AFFINEEXPRDETAIL_H_
diff --git a/mlir/lib/IR/AffineMap.cpp b/mlir/lib/IR/AffineMap.cpp
index 153742fd698b..686dbe8dcc08 100644
--- a/mlir/lib/IR/AffineMap.cpp
+++ b/mlir/lib/IR/AffineMap.cpp
@@ -89,7 +89,7 @@ class AffineExprConstantFolder {
ArrayRef<Attribute> operandConsts;
};
-} // end anonymous namespace
+} // namespace
/// Returns a single constant result affine map.
AffineMap AffineMap::getConstantMap(int64_t val, MLIRContext *context) {
diff --git a/mlir/lib/IR/AffineMapDetail.h b/mlir/lib/IR/AffineMapDetail.h
index d3090e3a5917..c0a906b8365c 100644
--- a/mlir/lib/IR/AffineMapDetail.h
+++ b/mlir/lib/IR/AffineMapDetail.h
@@ -51,7 +51,7 @@ struct AffineMapStorage : public StorageUniquer::BaseStorage {
}
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // AFFINEMAPDETAIL_H_
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index d3c239d9489f..5d5f896b7fad 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -146,7 +146,7 @@ struct AsmPrinterOptions {
llvm::cl::desc("Print assuming in local scope by default"),
llvm::cl::Hidden};
};
-} // end anonymous namespace
+} // namespace
static llvm::ManagedStatic<AsmPrinterOptions> clOptions;
@@ -267,7 +267,7 @@ static raw_ostream &operator<<(raw_ostream &os, NewLineCounter &newLine) {
++newLine.curLine;
return os << '\n';
}
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// AliasInitializer
@@ -538,7 +538,7 @@ class DummyAliasOperationPrinter : private OpAsmPrinter {
/// A dummy output stream.
mutable llvm::raw_null_ostream os;
};
-} // end anonymous namespace
+} // namespace
/// Sanitize the given name such that it can be used as a valid identifier. If
/// the string needs to be modified in any way, the provided buffer is used to
@@ -745,7 +745,7 @@ class AliasState {
/// An allocator used for alias names.
llvm::BumpPtrAllocator aliasAllocator;
};
-} // end anonymous namespace
+} // namespace
void AliasState::initialize(
Operation *op, const OpPrintingFlags &printerFlags,
@@ -869,7 +869,7 @@ class SSANameState {
DialectInterfaceCollection<OpAsmDialectInterface> &interfaces;
};
-} // end anonymous namespace
+} // namespace
SSANameState::SSANameState(
Operation *op, const OpPrintingFlags &printerFlags,
@@ -1215,8 +1215,8 @@ class AsmStateImpl {
/// An optional location map to be populated.
AsmState::LocationMap *locationMap;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
AsmState::AsmState(Operation *op, const OpPrintingFlags &printerFlags,
LocationMap *locationMap)
@@ -2479,7 +2479,7 @@ class OperationPrinter : public AsmPrinter::Impl, private OpAsmPrinter {
// This is the current indentation level for nested structures.
unsigned currentIndent = 0;
};
-} // end anonymous namespace
+} // namespace
void OperationPrinter::printTopLevelOperation(Operation *op) {
// Output the aliases at the top level that can't be deferred.
diff --git a/mlir/lib/IR/BuiltinDialect.cpp b/mlir/lib/IR/BuiltinDialect.cpp
index 53d560827db1..2fa4baabc4b6 100644
--- a/mlir/lib/IR/BuiltinDialect.cpp
+++ b/mlir/lib/IR/BuiltinDialect.cpp
@@ -59,7 +59,7 @@ struct BuiltinOpAsmDialectInterface : public OpAsmDialectInterface {
return AliasResult::NoAlias;
}
};
-} // end anonymous namespace.
+} // namespace
void BuiltinDialect::initialize() {
registerTypes();
diff --git a/mlir/lib/IR/Diagnostics.cpp b/mlir/lib/IR/Diagnostics.cpp
index 8400870b9135..fc252585dd21 100644
--- a/mlir/lib/IR/Diagnostics.cpp
+++ b/mlir/lib/IR/Diagnostics.cpp
@@ -372,8 +372,8 @@ struct SourceMgrDiagnosticHandlerImpl {
/// Mapping between file name and buffer ID's.
llvm::StringMap<unsigned> filenameToBufId;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
/// Return a processable FileLineColLoc from the given location.
static Optional<FileLineColLoc> getFileLineColLoc(Location loc) {
@@ -610,8 +610,8 @@ struct SourceMgrDiagnosticVerifierHandlerImpl {
llvm::Regex expected = llvm::Regex("expected-(error|note|remark|warning) "
"*(@([+-][0-9]+|above|below))? *{{(.*)}}");
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
/// Given a diagnostic kind, return a human readable string for it.
static StringRef getDiagKindStr(DiagnosticSeverity kind) {
@@ -947,8 +947,8 @@ struct ParallelDiagnosticHandlerImpl : public llvm::PrettyStackTraceEntry {
/// The context to emit the diagnostics to.
MLIRContext *context;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
ParallelDiagnosticHandler::ParallelDiagnosticHandler(MLIRContext *ctx)
: impl(new ParallelDiagnosticHandlerImpl(ctx)) {}
diff --git a/mlir/lib/IR/Dialect.cpp b/mlir/lib/IR/Dialect.cpp
index 56bd66967f14..631dc410632a 100644
--- a/mlir/lib/IR/Dialect.cpp
+++ b/mlir/lib/IR/Dialect.cpp
@@ -178,7 +178,7 @@ Dialect::getOperationPrinter(Operation *op) const {
}
/// Utility function that returns if the given string is a valid dialect
-/// namespace.
+/// namespace
bool Dialect::isValidNamespace(StringRef str) {
llvm::Regex dialectNameRegex("^[a-zA-Z_][a-zA-Z_0-9\\$]*$");
return dialectNameRegex.match(str);
diff --git a/mlir/lib/IR/IntegerSetDetail.h b/mlir/lib/IR/IntegerSetDetail.h
index 451c1594ca12..262617dad167 100644
--- a/mlir/lib/IR/IntegerSetDetail.h
+++ b/mlir/lib/IR/IntegerSetDetail.h
@@ -52,6 +52,6 @@ struct IntegerSetStorage : public StorageUniquer::BaseStorage {
}
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // INTEGERSETDETAIL_H_
diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp
index 670faf1aa930..1e10d60f5948 100644
--- a/mlir/lib/IR/MLIRContext.cpp
+++ b/mlir/lib/IR/MLIRContext.cpp
@@ -71,7 +71,7 @@ struct MLIRContextOptions {
llvm::cl::desc("When a diagnostic is emitted, also print the stack trace "
"as an attached note")};
};
-} // end anonymous namespace
+} // namespace
static llvm::ManagedStatic<MLIRContextOptions> clOptions;
@@ -110,7 +110,7 @@ struct ScopedWriterLock {
}
llvm::sys::SmartRWMutex<true> *mutex;
};
-} // end anonymous namespace.
+} // namespace
//===----------------------------------------------------------------------===//
// MLIRContextImpl
@@ -250,7 +250,7 @@ class MLIRContextImpl {
attrMapping.second->~AbstractAttribute();
}
};
-} // end namespace mlir
+} // namespace mlir
MLIRContext::MLIRContext(Threading setting)
: MLIRContext(DialectRegistry(), setting) {}
diff --git a/mlir/lib/IR/SymbolTable.cpp b/mlir/lib/IR/SymbolTable.cpp
index 1dbb1168e1f5..961f6c159705 100644
--- a/mlir/lib/IR/SymbolTable.cpp
+++ b/mlir/lib/IR/SymbolTable.cpp
@@ -619,7 +619,7 @@ struct SymbolScope {
/// The IR unit representing this scope.
llvm::PointerUnion<Operation *, Region *> limit;
};
-} // end anonymous namespace
+} // namespace
/// Collect all of the symbol scopes from 'symbol' to (inclusive) 'limit'.
static SmallVector<SymbolScope, 2> collectSymbolScopes(Operation *symbol,
diff --git a/mlir/lib/IR/Verifier.cpp b/mlir/lib/IR/Verifier.cpp
index f041f9e35a81..840a3156f283 100644
--- a/mlir/lib/IR/Verifier.cpp
+++ b/mlir/lib/IR/Verifier.cpp
@@ -62,7 +62,7 @@ class OperationVerifier {
LogicalResult verifyDominanceOfContainedRegions(Operation &op,
DominanceInfo &domInfo);
};
-} // end anonymous namespace
+} // namespace
LogicalResult OperationVerifier::verifyOpAndDominance(Operation &op) {
SmallVector<Operation *> opsWithIsolatedRegions;
diff --git a/mlir/lib/Parser/AffineParser.cpp b/mlir/lib/Parser/AffineParser.cpp
index 80cf470f1d32..e8c4a02c21ce 100644
--- a/mlir/lib/Parser/AffineParser.cpp
+++ b/mlir/lib/Parser/AffineParser.cpp
@@ -99,7 +99,7 @@ class AffineParser : public Parser {
unsigned numSymbolOperands;
SmallVector<std::pair<StringRef, AffineExpr>, 4> dimsAndSymbols;
};
-} // end anonymous namespace
+} // namespace
/// Create an affine binary high precedence op expression (mul's, div's, mod).
/// opLoc is the location of the op token to be used to report errors
diff --git a/mlir/lib/Parser/AsmParserImpl.h b/mlir/lib/Parser/AsmParserImpl.h
index e8c70b7df965..7bbbbc7a5832 100644
--- a/mlir/lib/Parser/AsmParserImpl.h
+++ b/mlir/lib/Parser/AsmParserImpl.h
@@ -516,6 +516,6 @@ class AsmParserImpl : public BaseT {
bool emittedError = false;
};
} // namespace detail
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_LIB_PARSER_ASMPARSERIMPL_H
diff --git a/mlir/lib/Parser/AttributeParser.cpp b/mlir/lib/Parser/AttributeParser.cpp
index 63b85427e253..13da92c05ff7 100644
--- a/mlir/lib/Parser/AttributeParser.cpp
+++ b/mlir/lib/Parser/AttributeParser.cpp
@@ -485,7 +485,7 @@ class TensorLiteralParser {
/// Storage used when parsing elements that were stored as hex values.
Optional<Token> hexStorage;
};
-} // end anonymous namespace
+} // namespace
/// Parse the elements of a tensor literal. If 'allowHex' is true, the parser
/// may also parse a tensor literal that is store as a hex string.
diff --git a/mlir/lib/Parser/Lexer.h b/mlir/lib/Parser/Lexer.h
index 8ba8133d1482..8f24d08dfbe7 100644
--- a/mlir/lib/Parser/Lexer.h
+++ b/mlir/lib/Parser/Lexer.h
@@ -68,6 +68,6 @@ class Lexer {
void operator=(const Lexer &) = delete;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_LIB_PARSER_LEXER_H
diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index 1818e420edd0..87d8f4bcf4de 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -487,7 +487,7 @@ class OperationParser : public Parser {
/// The top level operation that holds all of the parsed operations.
Operation *topLevelOp;
};
-} // end anonymous namespace
+} // namespace
OperationParser::OperationParser(ParserState &state, ModuleOp topLevelOp)
: Parser(state), opBuilder(topLevelOp.getRegion()), topLevelOp(topLevelOp) {
@@ -1588,7 +1588,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
/// The backing operation parser.
OperationParser &parser;
};
-} // end anonymous namespace.
+} // namespace
FailureOr<OperationName> OperationParser::parseCustomOperationName() {
std::string opName = getTokenSpelling().str();
@@ -2025,7 +2025,7 @@ class TopLevelOperationParser : public Parser {
/// Parse an attribute alias declaration.
ParseResult parseTypeAliasDef();
};
-} // end anonymous namespace
+} // namespace
/// Parses an attribute alias declaration.
///
diff --git a/mlir/lib/Parser/Parser.h b/mlir/lib/Parser/Parser.h
index 9a1894deee7b..da0c81c0060a 100644
--- a/mlir/lib/Parser/Parser.h
+++ b/mlir/lib/Parser/Parser.h
@@ -301,7 +301,7 @@ class Parser {
/// non-trivial state here, add it to the ParserState class.
ParserState &state;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_LIB_PARSER_PARSER_H
diff --git a/mlir/lib/Parser/ParserState.h b/mlir/lib/Parser/ParserState.h
index f5faffff3197..5ab67548aaec 100644
--- a/mlir/lib/Parser/ParserState.h
+++ b/mlir/lib/Parser/ParserState.h
@@ -91,7 +91,7 @@ struct ParserState {
SmallVector<StringRef> defaultDialectStack{"builtin"};
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_LIB_PARSER_PARSERSTATE_H
diff --git a/mlir/lib/Parser/Token.h b/mlir/lib/Parser/Token.h
index d4d09f96ab13..4f5e948e6aab 100644
--- a/mlir/lib/Parser/Token.h
+++ b/mlir/lib/Parser/Token.h
@@ -119,6 +119,6 @@ class Token {
StringRef spelling;
};
-} // end namespace mlir
+} // namespace mlir
#endif // MLIR_LIB_PARSER_TOKEN_H
diff --git a/mlir/lib/Pass/IRPrinting.cpp b/mlir/lib/Pass/IRPrinting.cpp
index 2094770b39c0..403d88d2d293 100644
--- a/mlir/lib/Pass/IRPrinting.cpp
+++ b/mlir/lib/Pass/IRPrinting.cpp
@@ -92,7 +92,7 @@ class IRPrinterInstrumentation : public PassInstrumentation {
/// configuration asked for change detection.
DenseMap<Pass *, OperationFingerPrint> beforePassFingerPrints;
};
-} // end anonymous namespace
+} // namespace
static void printIR(Operation *op, bool printModuleScope, raw_ostream &out,
OpPrintingFlags flags) {
@@ -248,7 +248,7 @@ struct BasicIRPrinterConfig : public PassManager::IRPrinterConfig {
/// The stream to output to.
raw_ostream &out;
};
-} // end anonymous namespace
+} // namespace
/// Add an instrumentation to print the IR before and after pass execution,
/// using the provided configuration.
diff --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp
index 57ede84c5a43..c7bbf4a9b2a7 100644
--- a/mlir/lib/Pass/Pass.cpp
+++ b/mlir/lib/Pass/Pass.cpp
@@ -131,8 +131,8 @@ struct OpPassManagerImpl {
/// OpPassManager.
OpPassManager::Nesting nesting;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
void OpPassManagerImpl::mergeInto(OpPassManagerImpl &rhs) {
assert(name == rhs.name && "merging unrelated pass managers");
@@ -786,8 +786,8 @@ struct PassInstrumentorImpl {
/// Set of registered instrumentations.
std::vector<std::unique_ptr<PassInstrumentation>> instrumentations;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
PassInstrumentor::PassInstrumentor() : impl(new PassInstrumentorImpl()) {}
PassInstrumentor::~PassInstrumentor() {}
diff --git a/mlir/lib/Pass/PassCrashRecovery.cpp b/mlir/lib/Pass/PassCrashRecovery.cpp
index fdc995c335cc..46fec825d3d9 100644
--- a/mlir/lib/Pass/PassCrashRecovery.cpp
+++ b/mlir/lib/Pass/PassCrashRecovery.cpp
@@ -362,7 +362,7 @@ struct CrashReproducerInstrumentation : public PassInstrumentation {
/// The generator used to create crash reproducers.
PassCrashReproducerGenerator &generator;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// FileReproducerStream
@@ -386,7 +386,7 @@ struct FileReproducerStream : public PassManager::ReproducerStream {
/// ToolOutputFile corresponding to opened `filename`.
std::unique_ptr<llvm::ToolOutputFile> outputFile = nullptr;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// PassManager
diff --git a/mlir/lib/Pass/PassDetail.h b/mlir/lib/Pass/PassDetail.h
index 24782fc80f1b..230551cc14b3 100644
--- a/mlir/lib/Pass/PassDetail.h
+++ b/mlir/lib/Pass/PassDetail.h
@@ -119,6 +119,6 @@ class PassCrashReproducerGenerator {
std::unique_ptr<Impl> impl;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_PASS_PASSDETAIL_H_
diff --git a/mlir/lib/Pass/PassManagerOptions.cpp b/mlir/lib/Pass/PassManagerOptions.cpp
index f5780ab27b5b..c9ba4e4524f2 100644
--- a/mlir/lib/Pass/PassManagerOptions.cpp
+++ b/mlir/lib/Pass/PassManagerOptions.cpp
@@ -78,7 +78,7 @@ struct PassManagerOptions {
clEnumValN(PassDisplayMode::Pipeline, "pipeline",
"display the results with a nested pipeline view"))};
};
-} // end anonymous namespace
+} // namespace
static llvm::ManagedStatic<PassManagerOptions> options;
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index a7fb9ec4ee0b..eae50918dbea 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -302,7 +302,7 @@ class TextualPipeline {
std::vector<PipelineElement> pipeline;
};
-} // end anonymous namespace
+} // namespace
/// Try to initialize this pipeline with the given pipeline text. An option is
/// given to enable accurate error reporting.
@@ -521,7 +521,7 @@ struct PassArgData {
/// pipeline.
TextualPipeline pipeline;
};
-} // end anonymous namespace
+} // namespace
namespace llvm {
namespace cl {
@@ -539,8 +539,8 @@ struct OptionValue<PassArgData> final
PassArgData value;
};
-} // end namespace cl
-} // end namespace llvm
+} // namespace cl
+} // namespace llvm
namespace {
@@ -687,8 +687,8 @@ struct PassPipelineCLParserImpl {
/// The set of passes and pass pipelines to run.
llvm::cl::list<PassArgData, bool, PassNameParser> passList;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
/// Construct a pass pipeline parser with the given command line description.
PassPipelineCLParser::PassPipelineCLParser(StringRef arg, StringRef description)
diff --git a/mlir/lib/Pass/PassStatistics.cpp b/mlir/lib/Pass/PassStatistics.cpp
index 425aeae35e05..8b1b020746c0 100644
--- a/mlir/lib/Pass/PassStatistics.cpp
+++ b/mlir/lib/Pass/PassStatistics.cpp
@@ -23,7 +23,7 @@ struct Statistic {
const char *name, *desc;
unsigned value;
};
-} // end anonymous namespace
+} // namespace
/// Utility to print a pass entry in the statistics output.
static void printPassEntry(raw_ostream &os, unsigned indent, StringRef pass,
diff --git a/mlir/lib/Reducer/OptReductionPass.cpp b/mlir/lib/Reducer/OptReductionPass.cpp
index e0c29443104f..806ce67e529a 100644
--- a/mlir/lib/Reducer/OptReductionPass.cpp
+++ b/mlir/lib/Reducer/OptReductionPass.cpp
@@ -31,7 +31,7 @@ class OptReductionPass : public OptReductionBase<OptReductionPass> {
void runOnOperation() override;
};
-} // end anonymous namespace
+} // namespace
/// Runs the pass instance in the pass pipeline.
void OptReductionPass::runOnOperation() {
diff --git a/mlir/lib/Reducer/ReductionTreePass.cpp b/mlir/lib/Reducer/ReductionTreePass.cpp
index 4ff31b4be55b..859f64a01e28 100644
--- a/mlir/lib/Reducer/ReductionTreePass.cpp
+++ b/mlir/lib/Reducer/ReductionTreePass.cpp
@@ -199,7 +199,7 @@ class ReductionTreePass : public ReductionTreeBase<ReductionTreePass> {
FrozenRewritePatternSet reducerPatterns;
};
-} // end anonymous namespace
+} // namespace
LogicalResult ReductionTreePass::initialize(MLIRContext *context) {
RewritePatternSet patterns(context);
diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp
index bd1cd7b4acc7..bd98ce0c1e09 100644
--- a/mlir/lib/Rewrite/ByteCode.cpp
+++ b/mlir/lib/Rewrite/ByteCode.cpp
@@ -160,7 +160,7 @@ enum OpCode : ByteCodeField {
/// Compare a range of types with a set of constants.
SwitchTypes,
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ByteCode Generation
@@ -479,7 +479,7 @@ struct ByteCodeLiveRange {
/// The value range storage index for this range.
Optional<unsigned> valueRangeIndex;
};
-} // end anonymous namespace
+} // namespace
void Generator::generate(ModuleOp module) {
FuncOp matcherFunc = module.lookupSymbol<FuncOp>(
@@ -1313,7 +1313,7 @@ class ByteCodeRewriteResultList : public PDLResultList {
return allocatedValueRanges;
}
};
-} // end anonymous namespace
+} // namespace
void ByteCodeExecutor::executeApplyConstraint(PatternRewriter &rewriter) {
LLVM_DEBUG(llvm::dbgs() << "Executing ApplyConstraint:\n");
diff --git a/mlir/lib/Rewrite/ByteCode.h b/mlir/lib/Rewrite/ByteCode.h
index a26c3b295de9..e423ff2a0235 100644
--- a/mlir/lib/Rewrite/ByteCode.h
+++ b/mlir/lib/Rewrite/ByteCode.h
@@ -19,7 +19,7 @@
namespace mlir {
namespace pdl_interp {
class RecordMatchOp;
-} // end namespace pdl_interp
+} // namespace pdl_interp
namespace detail {
class PDLByteCode;
@@ -208,7 +208,7 @@ class PDLByteCode {
ByteCodeField maxLoopLevel = 0;
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
#endif // MLIR_REWRITE_BYTECODE_H_
diff --git a/mlir/lib/Support/DebugCounter.cpp b/mlir/lib/Support/DebugCounter.cpp
index 30864b2fc3d2..930d5d393f77 100644
--- a/mlir/lib/Support/DebugCounter.cpp
+++ b/mlir/lib/Support/DebugCounter.cpp
@@ -34,7 +34,7 @@ struct DebugCounterOptions {
llvm::cl::desc("Print out debug counter information after all counters "
"have been accumulated")};
};
-} // end anonymous namespace
+} // namespace
static llvm::ManagedStatic<DebugCounterOptions> clOptions;
diff --git a/mlir/lib/Support/StorageUniquer.cpp b/mlir/lib/Support/StorageUniquer.cpp
index 06978ce22221..9291199fdce1 100644
--- a/mlir/lib/Support/StorageUniquer.cpp
+++ b/mlir/lib/Support/StorageUniquer.cpp
@@ -257,7 +257,7 @@ class ParametricStorageUniquer {
function_ref<void(BaseStorage *)> destructorFn;
#endif
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace detail {
@@ -328,7 +328,7 @@ struct StorageUniquerImpl {
/// Flag specifying if multi-threading is enabled within the uniquer.
bool threadingIsEnabled = true;
};
-} // end namespace detail
+} // namespace detail
} // namespace mlir
StorageUniquer::StorageUniquer() : impl(new StorageUniquerImpl()) {}
diff --git a/mlir/lib/Support/Timing.cpp b/mlir/lib/Support/Timing.cpp
index 11afe1e71742..63e07324c0b1 100644
--- a/mlir/lib/Support/Timing.cpp
+++ b/mlir/lib/Support/Timing.cpp
@@ -549,7 +549,7 @@ struct DefaultTimingManagerOptions {
clEnumValN(DisplayMode::Tree, "tree",
"display the results ina with a nested tree view"))};
};
-} // end anonymous namespace
+} // namespace
static llvm::ManagedStatic<DefaultTimingManagerOptions> options;
diff --git a/mlir/lib/TableGen/Class.cpp b/mlir/lib/TableGen/Class.cpp
index 0c38fa5b0067..9b7124e2e3a5 100644
--- a/mlir/lib/TableGen/Class.cpp
+++ b/mlir/lib/TableGen/Class.cpp
@@ -207,8 +207,8 @@ raw_ostream &operator<<(raw_ostream &os, Visibility visibility) {
}
return os;
}
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
//===----------------------------------------------------------------------===//
// ParentClass definitions
diff --git a/mlir/lib/TableGen/Predicate.cpp b/mlir/lib/TableGen/Predicate.cpp
index dd71540c15d4..554b6627247f 100644
--- a/mlir/lib/TableGen/Predicate.cpp
+++ b/mlir/lib/TableGen/Predicate.cpp
@@ -110,7 +110,7 @@ struct PredNode {
std::string prefix;
std::string suffix;
};
-} // end anonymous namespace
+} // namespace
// Get a predicate tree node kind based on the kind used in the predicate
// TableGen record.
@@ -131,7 +131,7 @@ static PredCombinerKind getPredCombinerKind(const Pred &pred) {
namespace {
// Substitution<pattern, replacement>.
using Subst = std::pair<StringRef, StringRef>;
-} // end anonymous namespace
+} // namespace
/// Perform the given substitutions on 'str' in-place.
static void performSubstitutions(std::string &str,
diff --git a/mlir/lib/Target/LLVMIR/DebugTranslation.h b/mlir/lib/Target/LLVMIR/DebugTranslation.h
index 062b8820c5a8..3706d06fb7c9 100644
--- a/mlir/lib/Target/LLVMIR/DebugTranslation.h
+++ b/mlir/lib/Target/LLVMIR/DebugTranslation.h
@@ -67,8 +67,8 @@ class DebugTranslation {
llvm::DICompileUnit *compileUnit;
};
-} // end namespace detail
-} // end namespace LLVM
-} // end namespace mlir
+} // namespace detail
+} // namespace LLVM
+} // namespace mlir
#endif // MLIR_LIB_TARGET_LLVMIR_DEBUGTRANSLATION_H_
diff --git a/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp
index f923367796c5..776559c31c9d 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp
@@ -40,7 +40,7 @@ class AMXDialectLLVMIRTranslationInterface
return failure();
}
};
-} // end namespace
+} // namespace
void mlir::registerAMXDialectTranslation(DialectRegistry ®istry) {
registry.insert<amx::AMXDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp
index eb49a5351500..22ea7316d2e9 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp
@@ -41,7 +41,7 @@ class ArmNeonDialectLLVMIRTranslationInterface
return failure();
}
};
-} // end namespace
+} // namespace
void mlir::registerArmNeonDialectTranslation(DialectRegistry ®istry) {
registry.insert<arm_neon::ArmNeonDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp
index 27ce8a87a0aa..364e63d40150 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp
@@ -40,7 +40,7 @@ class ArmSVEDialectLLVMIRTranslationInterface
return failure();
}
};
-} // end namespace
+} // namespace
void mlir::registerArmSVEDialectTranslation(DialectRegistry ®istry) {
registry.insert<arm_sve::ArmSVEDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
index cc8800df0095..8d19f466fe5b 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
@@ -471,7 +471,7 @@ class LLVMDialectLLVMIRTranslationInterface
return convertOperationImpl(*op, builder, moduleTranslation);
}
};
-} // end namespace
+} // namespace
void mlir::registerLLVMDialectTranslation(DialectRegistry ®istry) {
registry.insert<LLVM::LLVMDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
index a45cd7a7d430..4b5ca8fa86b3 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
@@ -108,7 +108,7 @@ class NVVMDialectLLVMIRTranslationInterface
return success();
}
};
-} // end namespace
+} // namespace
void mlir::registerNVVMDialectTranslation(DialectRegistry ®istry) {
registry.insert<NVVM::NVVMDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
index f6f7be139dd6..c8dd7fe5c756 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
@@ -492,7 +492,7 @@ class OpenACCDialectLLVMIRTranslationInterface
LLVM::ModuleTranslation &moduleTranslation) const final;
};
-} // end namespace
+} // namespace
/// Given an OpenACC MLIR operation, create the corresponding LLVM IR
/// (including OpenACC runtime calls).
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index d623dbb0c3cf..96b7644116e8 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -900,7 +900,7 @@ class OpenMPDialectLLVMIRTranslationInterface
LLVM::ModuleTranslation &moduleTranslation) const final;
};
-} // end namespace
+} // namespace
/// Given an OpenMP MLIR operation, create the corresponding LLVM IR
/// (including OpenMP runtime calls).
diff --git a/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
index 348424ab3722..a0c61b8de98c 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
@@ -80,7 +80,7 @@ class ROCDLDialectLLVMIRTranslationInterface
return success();
}
};
-} // end namespace
+} // namespace
void mlir::registerROCDLDialectTranslation(DialectRegistry ®istry) {
registry.insert<ROCDL::ROCDLDialect>();
diff --git a/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp
index ec8b5c1d7e3c..f2ddc2ab1645 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp
@@ -41,7 +41,7 @@ class X86VectorDialectLLVMIRTranslationInterface
return failure();
}
};
-} // end namespace
+} // namespace
void mlir::registerX86VectorDialectTranslation(DialectRegistry ®istry) {
registry.insert<x86vector::X86VectorDialect>();
diff --git a/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp b/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
index 681e2448fb31..c987198f0c12 100644
--- a/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
+++ b/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
@@ -150,9 +150,9 @@ class TypeFromLLVMIRTranslatorImpl {
MLIRContext &context;
};
-} // end namespace detail
-} // end namespace LLVM
-} // end namespace mlir
+} // namespace detail
+} // namespace LLVM
+} // namespace mlir
LLVM::TypeFromLLVMIRTranslator::TypeFromLLVMIRTranslator(MLIRContext &context)
: impl(new detail::TypeFromLLVMIRTranslatorImpl(context)) {}
diff --git a/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp b/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp
index cb62956eba0b..aadd72ae41a5 100644
--- a/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp
+++ b/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp
@@ -170,9 +170,9 @@ class TypeToLLVMIRTranslatorImpl {
/// type instead of creating a new type.
llvm::DenseMap<Type, llvm::Type *> knownTranslations;
};
-} // end namespace detail
-} // end namespace LLVM
-} // end namespace mlir
+} // namespace detail
+} // namespace LLVM
+} // namespace mlir
LLVM::TypeToLLVMIRTranslator::TypeToLLVMIRTranslator(llvm::LLVMContext &context)
: impl(new detail::TypeToLLVMIRTranslatorImpl(context)) {}
diff --git a/mlir/lib/Transforms/BufferOptimizations.cpp b/mlir/lib/Transforms/BufferOptimizations.cpp
index ee4f5d54d504..64a005dfb55b 100644
--- a/mlir/lib/Transforms/BufferOptimizations.cpp
+++ b/mlir/lib/Transforms/BufferOptimizations.cpp
@@ -418,7 +418,7 @@ class PromoteBuffersToStackPass
std::function<bool(Value)> isSmallAlloc;
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::createBufferHoistingPass() {
return std::make_unique<BufferHoistingPass>();
diff --git a/mlir/lib/Transforms/BufferResultsToOutParams.cpp b/mlir/lib/Transforms/BufferResultsToOutParams.cpp
index 8ae443674ee9..2abdccc6866c 100644
--- a/mlir/lib/Transforms/BufferResultsToOutParams.cpp
+++ b/mlir/lib/Transforms/BufferResultsToOutParams.cpp
@@ -136,7 +136,7 @@ struct BufferResultsToOutParamsPass
return signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::createBufferResultsToOutParamsPass() {
return std::make_unique<BufferResultsToOutParamsPass>();
diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp
index c7b09b5f1a18..bc265a4a233e 100644
--- a/mlir/lib/Transforms/CSE.cpp
+++ b/mlir/lib/Transforms/CSE.cpp
@@ -49,7 +49,7 @@ struct SimpleOperationInfo : public llvm::DenseMapInfo<Operation *> {
OperationEquivalence::IgnoreLocations);
}
};
-} // end anonymous namespace
+} // namespace
namespace {
/// Simple common sub-expression elimination.
@@ -91,7 +91,7 @@ struct CSE : public CSEBase<CSE> {
std::vector<Operation *> opsToErase;
DominanceInfo *domInfo = nullptr;
};
-} // end anonymous namespace
+} // namespace
/// Attempt to eliminate a redundant operation.
LogicalResult CSE::simplifyOperation(ScopedMapTy &knownValues, Operation *op,
diff --git a/mlir/lib/Transforms/Canonicalizer.cpp b/mlir/lib/Transforms/Canonicalizer.cpp
index 22cc32fa728a..745477d396fb 100644
--- a/mlir/lib/Transforms/Canonicalizer.cpp
+++ b/mlir/lib/Transforms/Canonicalizer.cpp
@@ -52,7 +52,7 @@ struct Canonicalizer : public CanonicalizerBase<Canonicalizer> {
GreedyRewriteConfig config;
FrozenRewritePatternSet patterns;
};
-} // end anonymous namespace
+} // namespace
/// Create a Canonicalizer pass.
std::unique_ptr<Pass> mlir::createCanonicalizerPass() {
diff --git a/mlir/lib/Transforms/Inliner.cpp b/mlir/lib/Transforms/Inliner.cpp
index 03219c4b1ed8..32b12e7a3bf4 100644
--- a/mlir/lib/Transforms/Inliner.cpp
+++ b/mlir/lib/Transforms/Inliner.cpp
@@ -123,7 +123,7 @@ struct CGUseList {
/// A symbol table to use when resolving call lookups.
SymbolTableCollection &symbolTable;
};
-} // end anonymous namespace
+} // namespace
CGUseList::CGUseList(Operation *op, CallGraph &cg,
SymbolTableCollection &symbolTable)
@@ -279,7 +279,7 @@ class CallGraphSCC {
std::vector<CallGraphNode *> nodes;
llvm::scc_iterator<const CallGraph *> &parentIterator;
};
-} // end anonymous namespace
+} // namespace
/// Run a given transformation over the SCCs of the callgraph in a bottom up
/// traversal.
@@ -311,7 +311,7 @@ struct ResolvedCall {
CallOpInterface call;
CallGraphNode *sourceNode, *targetNode;
};
-} // end anonymous namespace
+} // namespace
/// Collect all of the callable operations within the given range of blocks. If
/// `traverseNestedCGNodes` is true, this will also collect call operations
@@ -559,7 +559,7 @@ class InlinerPass : public InlinerBase<InlinerPass> {
/// during optimization.
SmallVector<llvm::StringMap<OpPassManager>, 8> opPipelines;
};
-} // end anonymous namespace
+} // namespace
InlinerPass::InlinerPass() : InlinerPass(defaultInlinerOptPipeline) {}
InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline)
diff --git a/mlir/lib/Transforms/LocationSnapshot.cpp b/mlir/lib/Transforms/LocationSnapshot.cpp
index 4e77b1d08328..f23a3eee1511 100644
--- a/mlir/lib/Transforms/LocationSnapshot.cpp
+++ b/mlir/lib/Transforms/LocationSnapshot.cpp
@@ -140,7 +140,7 @@ struct LocationSnapshotPass
/// The printing flags to use when creating the snapshot.
OpPrintingFlags flags;
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<Pass> mlir::createLocationSnapshotPass(OpPrintingFlags flags,
StringRef fileName,
diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index 24ef03ba730a..1a3de13177d7 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -59,7 +59,7 @@ struct LoopFusion : public AffineLoopFusionBase<LoopFusion> {
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<OperationPass<FuncOp>>
mlir::createLoopFusionPass(unsigned fastMemorySpace,
@@ -726,7 +726,7 @@ void gatherEscapingMemrefs(unsigned id, MemRefDependenceGraph *mdg,
}
}
-} // end anonymous namespace
+} // namespace
// Initializes the data dependence graph by walking operations in 'f'.
// Assigns each node in the graph a node id based on program order in 'f'.
@@ -1972,7 +1972,7 @@ struct GreedyFusion {
}
};
-} // end anonymous namespace
+} // namespace
void LoopFusion::runOnFunction() {
MemRefDependenceGraph g;
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 2bef6c5a92d4..71a24104c71a 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -32,7 +32,7 @@ struct LoopInvariantCodeMotion
: public LoopInvariantCodeMotionBase<LoopInvariantCodeMotion> {
void runOnOperation() override;
};
-} // end anonymous namespace
+} // namespace
// Checks whether the given op can be hoisted by checking that
// - the op and any of its contained operations do not depend on SSA values
diff --git a/mlir/lib/Transforms/NormalizeMemRefs.cpp b/mlir/lib/Transforms/NormalizeMemRefs.cpp
index c3fa7fe412be..b890bc70e702 100644
--- a/mlir/lib/Transforms/NormalizeMemRefs.cpp
+++ b/mlir/lib/Transforms/NormalizeMemRefs.cpp
@@ -41,7 +41,7 @@ struct NormalizeMemRefs : public NormalizeMemRefsBase<NormalizeMemRefs> {
Operation *createOpResultsNormalized(FuncOp funcOp, Operation *oldOp);
};
-} // end anonymous namespace
+} // namespace
std::unique_ptr<OperationPass<ModuleOp>> mlir::createNormalizeMemRefsPass() {
return std::make_unique<NormalizeMemRefs>();
diff --git a/mlir/lib/Transforms/PassDetail.h b/mlir/lib/Transforms/PassDetail.h
index 06ec234227c6..9b846198fc08 100644
--- a/mlir/lib/Transforms/PassDetail.h
+++ b/mlir/lib/Transforms/PassDetail.h
@@ -21,11 +21,11 @@ void registerDialect(DialectRegistry ®istry);
namespace arith {
class ArithmeticDialect;
-} // end namespace arith
+} // namespace arith
namespace memref {
class MemRefDialect;
-} // end namespace memref
+} // namespace memref
namespace bufferization {
class BufferizationDialect;
@@ -34,6 +34,6 @@ class BufferizationDialect;
#define GEN_PASS_CLASSES
#include "mlir/Transforms/Passes.h.inc"
-} // end namespace mlir
+} // namespace mlir
#endif // TRANSFORMS_PASSDETAIL_H_
diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp
index 500203b19a18..1613ecc2f727 100644
--- a/mlir/lib/Transforms/PipelineDataTransfer.cpp
+++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp
@@ -38,7 +38,7 @@ struct PipelineDataTransfer
std::vector<AffineForOp> forOps;
};
-} // end anonymous namespace
+} // namespace
/// Creates a pass to pipeline explicit movement of data across levels of the
/// memory hierarchy.
diff --git a/mlir/lib/Transforms/SCCP.cpp b/mlir/lib/Transforms/SCCP.cpp
index 3d725d77db8e..7a2f9949a746 100644
--- a/mlir/lib/Transforms/SCCP.cpp
+++ b/mlir/lib/Transforms/SCCP.cpp
@@ -239,7 +239,7 @@ namespace {
struct SCCP : public SCCPBase<SCCP> {
void runOnOperation() override;
};
-} // end anonymous namespace
+} // namespace
void SCCP::runOnOperation() {
Operation *op = getOperation();
diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp
index 39db964969f9..99e11517b7e0 100644
--- a/mlir/lib/Transforms/StripDebugInfo.cpp
+++ b/mlir/lib/Transforms/StripDebugInfo.cpp
@@ -18,7 +18,7 @@ namespace {
struct StripDebugInfo : public StripDebugInfoBase<StripDebugInfo> {
void runOnOperation() override;
};
-} // end anonymous namespace
+} // namespace
void StripDebugInfo::runOnOperation() {
auto unknownLoc = UnknownLoc::get(&getContext());
diff --git a/mlir/lib/Transforms/SymbolDCE.cpp b/mlir/lib/Transforms/SymbolDCE.cpp
index 2c65d635d4c4..0319cb95d77d 100644
--- a/mlir/lib/Transforms/SymbolDCE.cpp
+++ b/mlir/lib/Transforms/SymbolDCE.cpp
@@ -28,7 +28,7 @@ struct SymbolDCE : public SymbolDCEBase<SymbolDCE> {
bool symbolTableIsHidden,
DenseSet<Operation *> &liveSymbols);
};
-} // end anonymous namespace
+} // namespace
void SymbolDCE::runOnOperation() {
Operation *symbolTableOp = getOperation();
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index ad34eebff5b9..97c6a4daaf82 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -147,7 +147,7 @@ struct ConversionValueMapping {
/// Current value mappings.
BlockAndValueMapping mapping;
};
-} // end anonymous namespace
+} // namespace
Value ConversionValueMapping::lookupOrDefault(Value from,
Type desiredType) const {
@@ -408,7 +408,7 @@ class UnresolvedMaterialization {
/// The original output type. This is only used for argument conversions.
Type origOutputType;
};
-} // end anonymous namespace
+} // namespace
/// Build an unresolved materialization operation given an output type and set
/// of input operands.
@@ -593,7 +593,7 @@ struct ArgConverter {
/// An ordered set of unresolved materializations during conversion.
SmallVectorImpl<UnresolvedMaterialization> &unresolvedMaterializations;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Rewrite Application
@@ -1018,8 +1018,8 @@ struct ConversionPatternRewriterImpl {
llvm::ScopedPrinter logger{llvm::dbgs()};
#endif
};
-} // end namespace detail
-} // end namespace mlir
+} // namespace detail
+} // namespace mlir
/// Detach any operations nested in the given operation from their parent
/// blocks, and erase the given operation. This can be used when the nested
@@ -2396,7 +2396,7 @@ struct OperationConverter {
/// *not* to be legalizable to the target.
DenseSet<Operation *> *trackedOps;
};
-} // end anonymous namespace
+} // namespace
LogicalResult OperationConverter::convert(ConversionPatternRewriter &rewriter,
Operation *op) {
@@ -3086,7 +3086,7 @@ struct FunctionLikeSignatureConversion : public ConversionPattern {
return success();
}
};
-} // end anonymous namespace
+} // namespace
void mlir::populateFunctionLikeTypeConversionPattern(
StringRef functionLikeOpName, RewritePatternSet &patterns,
diff --git a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
index 5e9f6dda5a45..e9ea661cb68e 100644
--- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
@@ -101,7 +101,7 @@ class GreedyPatternRewriteDriver : public PatternRewriter {
llvm::ScopedPrinter logger{llvm::dbgs()};
#endif
};
-} // end anonymous namespace
+} // namespace
GreedyPatternRewriteDriver::GreedyPatternRewriteDriver(
MLIRContext *ctx, const FrozenRewritePatternSet &patterns,
@@ -436,7 +436,7 @@ class OpPatternRewriteDriver : public PatternRewriter {
bool opErasedViaPatternRewrites = false;
};
-} // anonymous namespace
+} // namespace
/// Performs the rewrites and folding only on `op`. The simplification
/// converges if the op is erased as a result of being folded, replaced, or
@@ -543,7 +543,7 @@ class MultiOpPatternRewriteDriver : public GreedyPatternRewriteDriver {
llvm::SmallDenseSet<Operation *, 4> strictModeFilteredOps;
};
-} // end anonymous namespace
+} // namespace
/// Performs the specified rewrites on `ops` while also trying to fold these ops
/// as well as any other ops that were in turn created due to these rewrite
diff --git a/mlir/lib/Transforms/Utils/RegionUtils.cpp b/mlir/lib/Transforms/Utils/RegionUtils.cpp
index d7d8661989b2..023b1d6ed5ea 100644
--- a/mlir/lib/Transforms/Utils/RegionUtils.cpp
+++ b/mlir/lib/Transforms/Utils/RegionUtils.cpp
@@ -417,7 +417,7 @@ struct BlockEquivalenceData {
/// produced within the block before this operation.
DenseMap<Operation *, unsigned> opOrderIndex;
};
-} // end anonymous namespace
+} // namespace
BlockEquivalenceData::BlockEquivalenceData(Block *block)
: block(block), hash(0) {
@@ -477,7 +477,7 @@ class BlockMergeCluster {
/// replaced by arguments when the cluster gets merged.
std::set<std::pair<int, int>> operandsToMerge;
};
-} // end anonymous namespace
+} // namespace
LogicalResult BlockMergeCluster::addToCluster(BlockEquivalenceData &blockData) {
if (leaderData.hash != blockData.hash)
diff --git a/mlir/test/APITest.h b/mlir/test/APITest.h
index deb58cd5f42a..b549a0bb7eca 100644
--- a/mlir/test/APITest.h
+++ b/mlir/test/APITest.h
@@ -33,7 +33,7 @@ struct TestRegistration {
test_detail::tests().push_back(func);
}
};
-} // end namespace test_detail
+} // namespace test_detail
/// Declares a test function with the given name and adds it to the list of
/// known tests. The body of the function must follow immediately. Example:
diff --git a/mlir/test/lib/Analysis/TestAliasAnalysis.cpp b/mlir/test/lib/Analysis/TestAliasAnalysis.cpp
index af550d432a56..2b4899e451bf 100644
--- a/mlir/test/lib/Analysis/TestAliasAnalysis.cpp
+++ b/mlir/test/lib/Analysis/TestAliasAnalysis.cpp
@@ -79,7 +79,7 @@ struct TestAliasAnalysisPass
llvm::errs() << ": " << result << "\n";
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Testing ModRefResult
@@ -125,7 +125,7 @@ struct TestAliasAnalysisModRefPass
llvm::errs() << ": " << result << "\n";
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Pass Registration
diff --git a/mlir/test/lib/Analysis/TestCallGraph.cpp b/mlir/test/lib/Analysis/TestCallGraph.cpp
index eff356cff30f..e945e5518c43 100644
--- a/mlir/test/lib/Analysis/TestCallGraph.cpp
+++ b/mlir/test/lib/Analysis/TestCallGraph.cpp
@@ -29,7 +29,7 @@ struct TestCallGraphPass
getAnalysis<CallGraph>().print(llvm::errs());
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Analysis/TestLiveness.cpp b/mlir/test/lib/Analysis/TestLiveness.cpp
index 94d0e96e7ef9..287f742783bb 100644
--- a/mlir/test/lib/Analysis/TestLiveness.cpp
+++ b/mlir/test/lib/Analysis/TestLiveness.cpp
@@ -30,7 +30,7 @@ struct TestLivenessPass : public PassWrapper<TestLivenessPass, FunctionPass> {
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Analysis/TestMatchReduction.cpp b/mlir/test/lib/Analysis/TestMatchReduction.cpp
index bbc15c6bd4f2..dde27f3c7bd1 100644
--- a/mlir/test/lib/Analysis/TestMatchReduction.cpp
+++ b/mlir/test/lib/Analysis/TestMatchReduction.cpp
@@ -75,7 +75,7 @@ struct TestMatchReductionPass
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp b/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp
index 974cea29161c..e49f986fca64 100644
--- a/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp
+++ b/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp
@@ -36,7 +36,7 @@ struct TestMemRefBoundCheck
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
void TestMemRefBoundCheck::runOnFunction() {
getFunction().walk([](Operation *opInst) {
diff --git a/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp b/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp
index 3be9dc14b752..d3e6788711d8 100644
--- a/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp
+++ b/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp
@@ -36,7 +36,7 @@ struct TestMemRefDependenceCheck
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
// Returns a result string which represents the direction vector (if there was
// a dependence), returns the string "false" otherwise.
diff --git a/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp b/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp
index 39e60db50771..8142024b6360 100644
--- a/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp
+++ b/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp
@@ -23,7 +23,7 @@ struct TestMemRefStrideCalculation
}
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
/// Traverse AllocOp and compute strides of each MemRefType independently.
void TestMemRefStrideCalculation::runOnFunction() {
diff --git a/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp b/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp
index 1eb73b0b3078..5684096bff22 100644
--- a/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp
+++ b/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp
@@ -52,7 +52,7 @@ struct TestNumberOfOperationExecutionsPass
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Analysis/TestSlice.cpp b/mlir/test/lib/Analysis/TestSlice.cpp
index 962df7602a29..dbdcfd950cbb 100644
--- a/mlir/test/lib/Analysis/TestSlice.cpp
+++ b/mlir/test/lib/Analysis/TestSlice.cpp
@@ -39,7 +39,7 @@ struct TestTopologicalSortPass
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp b/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp
index 332f1fe635d6..df74cf71ed53 100644
--- a/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp
@@ -53,7 +53,7 @@ struct TestAffineDataCopy
llvm::cl::init(false)};
};
-} // end anonymous namespace
+} // namespace
void TestAffineDataCopy::runOnFunction() {
// Gather all AffineForOps by loop depth.
diff --git a/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp b/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp
index bad3732c7bbe..a0e0082db481 100644
--- a/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp
@@ -28,7 +28,7 @@ struct TestAffineLoopParametricTiling
}
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
/// Checks if the function enclosing the loop nest has any arguments passed to
/// it, which can be used as tiling parameters. Assumes that atleast 'n'
diff --git a/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp b/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp
index 22df6da2564b..542e109ebbb8 100644
--- a/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp
@@ -38,7 +38,7 @@ struct TestAffineLoopUnswitching
constexpr static unsigned kMaxIterations = 5;
};
-} // end anonymous namespace
+} // namespace
void TestAffineLoopUnswitching::runOnFunction() {
// Each hoisting invalidates a lot of IR around. Just stop the walk after the
diff --git a/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp b/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp
index 5205b25f881a..8a88d15a4255 100644
--- a/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp
@@ -44,7 +44,7 @@ struct TestLoopPermutation
llvm::cl::OneOrMore, llvm::cl::CommaSeparated};
};
-} // end anonymous namespace
+} // namespace
void TestLoopPermutation::runOnFunction() {
diff --git a/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp b/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
index b2f0ef915c68..d9dfe7b1330a 100644
--- a/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
@@ -91,7 +91,7 @@ struct VectorizerTestPass
void testVecAffineLoopNest();
};
-} // end anonymous namespace
+} // namespace
void VectorizerTestPass::testVectorShapeRatio(llvm::raw_ostream &outs) {
auto f = getFunction();
diff --git a/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp b/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
index 6d9c3be2a88f..6c3e6ff5de8b 100644
--- a/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
+++ b/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
@@ -48,7 +48,7 @@ class TestGpuMemoryPromotionPass
}
}
};
-} // end namespace
+} // namespace
namespace mlir {
void registerTestGpuMemoryPromotionPass() {
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
index 9424046f8e85..15ff86ceecf3 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
@@ -206,7 +206,7 @@ void TestLinalgCodegenStrategy::runStrategy(
if (failed(runPipeline(dynamicPM, funcOp)))
return signalPassFailure();
}
-} // end anonymous namespace
+} // namespace
// For now, just assume it is the zero of type.
// In the future, it should be the zero of type + op.
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp
index 2507ae8f0e3e..0aa5cfde99f3 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp
@@ -38,7 +38,7 @@ struct TestLinalgHoisting
llvm::cl::desc("Test hoisting transfer_read/transfer_write pairs"),
llvm::cl::init(false)};
};
-} // end anonymous namespace
+} // namespace
void TestLinalgHoisting::runOnFunction() {
if (testHoistRedundantTransfers) {
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
index 20219de10748..05f644894367 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
@@ -129,7 +129,7 @@ struct TestLinalgTransforms
"tiled_loop"),
llvm::cl::init("for")};
};
-} // end anonymous namespace
+} // namespace
static void applyPatterns(FuncOp funcOp) {
MLIRContext *ctx = funcOp.getContext();
diff --git a/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp b/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp
index 2b7395697991..997706577548 100644
--- a/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp
+++ b/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp
@@ -32,7 +32,7 @@ struct TestMathAlgebraicSimplificationPass
return "Test math algebraic simplification";
}
};
-} // end anonymous namespace
+} // namespace
void TestMathAlgebraicSimplificationPass::runOnFunction() {
RewritePatternSet patterns(&getContext());
diff --git a/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp b/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp
index ef43d105d4de..bd5e09d7debe 100644
--- a/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp
+++ b/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp
@@ -23,7 +23,7 @@ struct TestExpandTanhPass
StringRef getArgument() const final { return "test-expand-tanh"; }
StringRef getDescription() const final { return "Test expanding tanh"; }
};
-} // end anonymous namespace
+} // namespace
void TestExpandTanhPass::runOnFunction() {
RewritePatternSet patterns(&getContext());
diff --git a/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp b/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp
index d1aa7796437f..6f34215ca030 100644
--- a/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp
+++ b/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp
@@ -48,7 +48,7 @@ struct TestMathPolynomialApproximationPass
"X86Vector dialect"),
llvm::cl::init(false)};
};
-} // end anonymous namespace
+} // namespace
void TestMathPolynomialApproximationPass::runOnFunction() {
RewritePatternSet patterns(&getContext());
diff --git a/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp b/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
index f68cf6389055..09c6c3f75de3 100644
--- a/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
+++ b/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
@@ -28,7 +28,7 @@ struct PrintOpAvailability
return "Test SPIR-V op availability";
}
};
-} // end anonymous namespace
+} // namespace
void PrintOpAvailability::runOnFunction() {
auto f = getFunction();
@@ -140,7 +140,7 @@ struct ConvertToSubgroupBallot : public RewritePattern {
LogicalResult matchAndRewrite(Operation *op,
PatternRewriter &rewriter) const override;
};
-} // end anonymous namespace
+} // namespace
void ConvertToTargetEnv::runOnFunction() {
MLIRContext *context = &getContext();
diff --git a/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp b/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp
index 03ab46af0a7f..5bfec82f7db9 100644
--- a/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp
+++ b/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp
@@ -25,7 +25,7 @@ struct ReportShapeFnPass
return "Test pass to report associated shape functions";
}
};
-} // end anonymous namespace
+} // namespace
void ReportShapeFnPass::runOnOperation() {
auto module = getOperation();
diff --git a/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp b/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
index 8804df42c367..c6d61d9bba77 100644
--- a/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
+++ b/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
@@ -88,7 +88,7 @@ struct TestDecomposeCallGraphTypes
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp
index cb09ea45795b..73d4243ad108 100644
--- a/mlir/test/lib/Dialect/Test/TestDialect.cpp
+++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp
@@ -224,7 +224,7 @@ struct TestReductionPatternInterface : public DialectReductionPatternInterface {
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// TestDialect
@@ -374,7 +374,7 @@ struct FoldToCallOpPattern : public OpRewritePattern<FoldToCallOp> {
return success();
}
};
-} // end anonymous namespace
+} // namespace
void FoldToCallOp::getCanonicalizationPatterns(RewritePatternSet &results,
MLIRContext *context) {
@@ -855,7 +855,7 @@ struct TestRemoveOpWithInnerOps
return success();
}
};
-} // end anonymous namespace
+} // namespace
void TestOpWithRegionPattern::getCanonicalizationPatterns(
RewritePatternSet &results, MLIRContext *context) {
@@ -972,7 +972,7 @@ namespace {
struct TestResource : public SideEffects::Resource::Base<TestResource> {
StringRef getName() final { return "<Test>"; }
};
-} // end anonymous namespace
+} // namespace
static void testSideEffectOpGetEffect(
Operation *op,
diff --git a/mlir/test/lib/Dialect/Test/TestDialect.h b/mlir/test/lib/Dialect/Test/TestDialect.h
index cd77d62c89cb..184158c8dc96 100644
--- a/mlir/test/lib/Dialect/Test/TestDialect.h
+++ b/mlir/test/lib/Dialect/Test/TestDialect.h
@@ -50,6 +50,6 @@ class RewritePatternSet;
namespace test {
void registerTestDialect(::mlir::DialectRegistry ®istry);
void populateTestReductionPatterns(::mlir::RewritePatternSet &patterns);
-} // end namespace test
+} // namespace test
#endif // MLIR_TESTDIALECT_H
diff --git a/mlir/test/lib/Dialect/Test/TestPatterns.cpp b/mlir/test/lib/Dialect/Test/TestPatterns.cpp
index ed84b8cba3f6..e2e054c1af67 100644
--- a/mlir/test/lib/Dialect/Test/TestPatterns.cpp
+++ b/mlir/test/lib/Dialect/Test/TestPatterns.cpp
@@ -63,7 +63,7 @@ static Attribute OpMTest(PatternRewriter &rewriter, Value val) {
namespace {
#include "TestPatterns.inc"
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Test Reduce Pattern Interface
@@ -139,7 +139,7 @@ struct TestPatternDriver : public PassWrapper<TestPatternDriver, FunctionPass> {
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ReturnType Driver.
@@ -225,7 +225,7 @@ struct TestReturnTypeDriver
}
}
};
-} // end anonymous namespace
+} // namespace
namespace {
struct TestDerivedAttributeDriver
@@ -236,7 +236,7 @@ struct TestDerivedAttributeDriver
}
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
void TestDerivedAttributeDriver::runOnFunction() {
getFunction().walk([](DerivedAttributeOpInterface dOp) {
@@ -743,7 +743,7 @@ struct TestLegalizePatternDriver
/// The mode of conversion to use.
ConversionMode mode;
};
-} // end anonymous namespace
+} // namespace
static llvm::cl::opt<TestLegalizePatternDriver::ConversionMode>
legalizerConversionMode(
@@ -871,7 +871,7 @@ struct TestRemappedValue
}
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Test patterns without a specific root operation kind
@@ -911,7 +911,7 @@ struct TestUnknownRootOpDriver
signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Test type conversions
@@ -1127,7 +1127,7 @@ struct TestTypeConversionDriver
signalPassFailure();
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Test Block Merging
diff --git a/mlir/test/lib/Dialect/Test/TestTraits.cpp b/mlir/test/lib/Dialect/Test/TestTraits.cpp
index bb78a4b175da..a19c3b1649ba 100644
--- a/mlir/test/lib/Dialect/Test/TestTraits.cpp
+++ b/mlir/test/lib/Dialect/Test/TestTraits.cpp
@@ -39,7 +39,7 @@ struct TestTraitFolder : public PassWrapper<TestTraitFolder, FunctionPass> {
RewritePatternSet(&getContext()));
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerTestTraitsPass() { PassRegistration<TestTraitFolder>(); }
diff --git a/mlir/test/lib/Dialect/Test/TestTypes.h b/mlir/test/lib/Dialect/Test/TestTypes.h
index 0b050034a6b4..91650afebb9b 100644
--- a/mlir/test/lib/Dialect/Test/TestTypes.h
+++ b/mlir/test/lib/Dialect/Test/TestTypes.h
@@ -69,7 +69,7 @@ inline mlir::AsmPrinter &operator<<(mlir::AsmPrinter &printer,
return printer << param.value;
}
-} // end namespace mlir
+} // namespace mlir
#include "TestTypeInterfaces.h.inc"
diff --git a/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp b/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
index 99bf14b6b59f..8a30446545d8 100644
--- a/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
+++ b/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
@@ -197,7 +197,7 @@ void TosaTestQuantUtilAPI::runOnFunction() {
(void)applyPatternsAndFoldGreedily(func, std::move(patterns));
}
-} // anonymous namespace
+} // namespace
namespace mlir {
void registerTosaTestQuantUtilAPIPass() {
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 4d67e07c12a9..f7e13bc330d4 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -583,7 +583,7 @@ struct TestVectorReduceToContractPatternsPatterns
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp b/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp
index f7371f873393..96c162de775d 100644
--- a/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp
+++ b/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp
@@ -50,7 +50,7 @@ struct TestElementsAttrInterface
});
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestDiagnostics.cpp b/mlir/test/lib/IR/TestDiagnostics.cpp
index bb7610789c1b..8bff82a22e62 100644
--- a/mlir/test/lib/IR/TestDiagnostics.cpp
+++ b/mlir/test/lib/IR/TestDiagnostics.cpp
@@ -57,7 +57,7 @@ struct TestDiagnosticFilterPass
llvm::cl::desc("Specifies the diagnostic file name filters.")};
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestDominance.cpp b/mlir/test/lib/IR/TestDominance.cpp
index ccc2ffe7cae5..b49b73c86062 100644
--- a/mlir/test/lib/IR/TestDominance.cpp
+++ b/mlir/test/lib/IR/TestDominance.cpp
@@ -120,7 +120,7 @@ struct TestDominancePass : public PassWrapper<TestDominancePass, FunctionPass> {
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestFunc.cpp b/mlir/test/lib/IR/TestFunc.cpp
index a2d0c796c66b..556ee0537384 100644
--- a/mlir/test/lib/IR/TestFunc.cpp
+++ b/mlir/test/lib/IR/TestFunc.cpp
@@ -149,7 +149,7 @@ struct TestFuncSetType
}
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerTestFunc() {
diff --git a/mlir/test/lib/IR/TestInterfaces.cpp b/mlir/test/lib/IR/TestInterfaces.cpp
index bafcdcb5d0c6..823c607435e0 100644
--- a/mlir/test/lib/IR/TestInterfaces.cpp
+++ b/mlir/test/lib/IR/TestInterfaces.cpp
@@ -40,7 +40,7 @@ struct TestTypeInterfaces
});
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestMatchers.cpp b/mlir/test/lib/IR/TestMatchers.cpp
index 98b20337632e..a4007cd99ab6 100644
--- a/mlir/test/lib/IR/TestMatchers.cpp
+++ b/mlir/test/lib/IR/TestMatchers.cpp
@@ -22,7 +22,7 @@ struct TestMatchers : public PassWrapper<TestMatchers, FunctionPass> {
return "Test C++ pattern matchers.";
}
};
-} // end anonymous namespace
+} // namespace
// This could be done better but is not worth the variadic template trouble.
template <typename Matcher>
diff --git a/mlir/test/lib/IR/TestOpaqueLoc.cpp b/mlir/test/lib/IR/TestOpaqueLoc.cpp
index 35d31a04f9d7..ea268bf91af2 100644
--- a/mlir/test/lib/IR/TestOpaqueLoc.cpp
+++ b/mlir/test/lib/IR/TestOpaqueLoc.cpp
@@ -82,7 +82,7 @@ struct TestOpaqueLoc
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/IR/TestOperationEquals.cpp b/mlir/test/lib/IR/TestOperationEquals.cpp
index 0ef6dfe9e84b..dc655ab3f706 100644
--- a/mlir/test/lib/IR/TestOperationEquals.cpp
+++ b/mlir/test/lib/IR/TestOperationEquals.cpp
@@ -46,7 +46,7 @@ struct TestOperationEqualPass
llvm::outs() << " compares NOT equals!\n";
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerTestOperationEqualPass() {
diff --git a/mlir/test/lib/IR/TestPrintDefUse.cpp b/mlir/test/lib/IR/TestPrintDefUse.cpp
index cff36197439e..6fa37b9cec73 100644
--- a/mlir/test/lib/IR/TestPrintDefUse.cpp
+++ b/mlir/test/lib/IR/TestPrintDefUse.cpp
@@ -63,7 +63,7 @@ struct TestPrintDefUsePass
});
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerTestPrintDefUsePass() { PassRegistration<TestPrintDefUsePass>(); }
diff --git a/mlir/test/lib/IR/TestPrintNesting.cpp b/mlir/test/lib/IR/TestPrintNesting.cpp
index 7149435245c1..e2841feb01fa 100644
--- a/mlir/test/lib/IR/TestPrintNesting.cpp
+++ b/mlir/test/lib/IR/TestPrintNesting.cpp
@@ -88,7 +88,7 @@ struct TestPrintNestingPass
return llvm::outs();
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerTestPrintNestingPass() {
diff --git a/mlir/test/lib/IR/TestSideEffects.cpp b/mlir/test/lib/IR/TestSideEffects.cpp
index 68b419b33db1..d56414de744d 100644
--- a/mlir/test/lib/IR/TestSideEffects.cpp
+++ b/mlir/test/lib/IR/TestSideEffects.cpp
@@ -69,7 +69,7 @@ struct SideEffectsPass
});
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerSideEffectTestPasses() { PassRegistration<SideEffectsPass>(); }
diff --git a/mlir/test/lib/IR/TestSymbolUses.cpp b/mlir/test/lib/IR/TestSymbolUses.cpp
index 22ff2adad32b..914dd25b067e 100644
--- a/mlir/test/lib/IR/TestSymbolUses.cpp
+++ b/mlir/test/lib/IR/TestSymbolUses.cpp
@@ -115,7 +115,7 @@ struct SymbolReplacementPass
});
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
void registerSymbolTestPasses() {
diff --git a/mlir/test/lib/IR/TestVisitors.cpp b/mlir/test/lib/IR/TestVisitors.cpp
index c92ccc339bc8..c662d750fa4d 100644
--- a/mlir/test/lib/IR/TestVisitors.cpp
+++ b/mlir/test/lib/IR/TestVisitors.cpp
@@ -161,7 +161,7 @@ struct TestIRVisitorsPass
testNoSkipErasureCallbacks(op);
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Pass/TestPassManager.cpp b/mlir/test/lib/Pass/TestPassManager.cpp
index 0202a5bf9d9e..243bd8b86981 100644
--- a/mlir/test/lib/Pass/TestPassManager.cpp
+++ b/mlir/test/lib/Pass/TestPassManager.cpp
@@ -98,7 +98,7 @@ struct TestStatisticPass
getOperation()->walk([&](Operation *) { ++opCount; });
}
};
-} // end anonymous namespace
+} // namespace
static void testNestedPipeline(OpPassManager &pm) {
// Nest a module pipeline that contains:
diff --git a/mlir/test/lib/Reducer/MLIRTestReducer.cpp b/mlir/test/lib/Reducer/MLIRTestReducer.cpp
index 5893020f88e0..77e8fc5b2531 100644
--- a/mlir/test/lib/Reducer/MLIRTestReducer.cpp
+++ b/mlir/test/lib/Reducer/MLIRTestReducer.cpp
@@ -29,7 +29,7 @@ struct TestReducer : public PassWrapper<TestReducer, OperationPass<>> {
void runOnOperation() override;
};
-} // end anonymous namespace
+} // namespace
void TestReducer::runOnOperation() {
getOperation()->walk([&](Operation *op) {
diff --git a/mlir/test/lib/Rewrite/TestPDLByteCode.cpp b/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
index 159c623bf4eb..1f893e6d8230 100644
--- a/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
+++ b/mlir/test/lib/Rewrite/TestPDLByteCode.cpp
@@ -109,7 +109,7 @@ struct TestPDLByteCodePass
std::move(patternList));
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Transforms/TestConstantFold.cpp b/mlir/test/lib/Transforms/TestConstantFold.cpp
index e9f78b309302..ef5c995f4b1a 100644
--- a/mlir/test/lib/Transforms/TestConstantFold.cpp
+++ b/mlir/test/lib/Transforms/TestConstantFold.cpp
@@ -26,7 +26,7 @@ struct TestConstantFold : public PassWrapper<TestConstantFold, FunctionPass> {
void foldOperation(Operation *op, OperationFolder &helper);
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
void TestConstantFold::foldOperation(Operation *op, OperationFolder &helper) {
auto processGeneratedConstants = [this](Operation *op) {
diff --git a/mlir/test/lib/Transforms/TestInlining.cpp b/mlir/test/lib/Transforms/TestInlining.cpp
index 3a761fb46e87..f4ccede65a24 100644
--- a/mlir/test/lib/Transforms/TestInlining.cpp
+++ b/mlir/test/lib/Transforms/TestInlining.cpp
@@ -64,7 +64,7 @@ struct Inliner : public PassWrapper<Inliner, FunctionPass> {
}
}
};
-} // end anonymous namespace
+} // namespace
namespace mlir {
namespace test {
diff --git a/mlir/test/lib/Transforms/TestLoopFusion.cpp b/mlir/test/lib/Transforms/TestLoopFusion.cpp
index 83b3e4fdd871..380d4e68a7ce 100644
--- a/mlir/test/lib/Transforms/TestLoopFusion.cpp
+++ b/mlir/test/lib/Transforms/TestLoopFusion.cpp
@@ -49,7 +49,7 @@ struct TestLoopFusion : public PassWrapper<TestLoopFusion, FunctionPass> {
void runOnFunction() override;
};
-} // end anonymous namespace
+} // namespace
// Run fusion dependence check on 'loops[i]' and 'loops[j]' at loop depths
// in range ['loopDepth' + 1, 'maxLoopDepth'].
diff --git a/mlir/test/mlir-tblgen/attrdefs.td b/mlir/test/mlir-tblgen/attrdefs.td
index ec2188beb8cc..34c8588225f7 100644
--- a/mlir/test/mlir-tblgen/attrdefs.td
+++ b/mlir/test/mlir-tblgen/attrdefs.td
@@ -9,7 +9,7 @@ include "mlir/IR/OpBase.td"
// DECL: namespace mlir {
// DECL: class AsmParser;
// DECL: class AsmPrinter;
-// DECL: } // end namespace mlir
+// DECL: } // namespace mlir
// DEF: #ifdef GET_ATTRDEF_LIST
// DEF: #undef GET_ATTRDEF_LIST
diff --git a/mlir/test/mlir-tblgen/default-type-attr-print-parser.td b/mlir/test/mlir-tblgen/default-type-attr-print-parser.td
index 4b6a78372500..2ec3f6518836 100644
--- a/mlir/test/mlir-tblgen/default-type-attr-print-parser.td
+++ b/mlir/test/mlir-tblgen/default-type-attr-print-parser.td
@@ -45,7 +45,7 @@ def AttrA : TestAttr<"AttrA"> {
// ATTR: return;
// ATTR: }
-// ATTR: } // end namespace test
+// ATTR: } // namespace test
def TypeA : TestType<"TypeA"> {
let mnemonic = "type_a";
@@ -73,4 +73,4 @@ def TypeA : TestType<"TypeA"> {
// TYPE: return;
// TYPE: }
-// TYPE: } // end namespace test
+// TYPE: } // namespace test
diff --git a/mlir/test/mlir-tblgen/typedefs.td b/mlir/test/mlir-tblgen/typedefs.td
index 7bbbf5a53bdc..0e4ee23a45e5 100644
--- a/mlir/test/mlir-tblgen/typedefs.td
+++ b/mlir/test/mlir-tblgen/typedefs.td
@@ -9,7 +9,7 @@ include "mlir/IR/OpBase.td"
// DECL: namespace mlir {
// DECL: class AsmParser;
// DECL: class AsmPrinter;
-// DECL: } // end namespace mlir
+// DECL: } // namespace mlir
// DEF: #ifdef GET_TYPEDEF_LIST
// DEF: #undef GET_TYPEDEF_LIST
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
index 8e245fcc8206..eac8e5638bad 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
@@ -173,7 +173,7 @@ class DefGen {
/// The prefix/suffix of the TableGen def name, either "Attr" or "Type".
StringRef defType;
};
-} // end anonymous namespace
+} // namespace
DefGen::DefGen(const AttrOrTypeDef &def)
: def(def), params(def.getParameters()), defCls(def.getCppClassName()),
@@ -651,7 +651,7 @@ struct TypeDefGenerator : public DefGenerator {
: DefGenerator(records.getAllDerivedDefinitions("TypeDef"), os, "Type",
"Type", /*isAttrGenerator=*/false) {}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// GEN: Declarations
@@ -663,7 +663,7 @@ static const char *const typeDefDeclHeader = R"(
namespace mlir {
class AsmParser;
class AsmPrinter;
-} // end namespace mlir
+} // namespace mlir
)";
bool DefGenerator::emitDecls(StringRef selectedDialect) {
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
index 94e81f1085b5..22b9b36c908d 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
@@ -152,7 +152,7 @@ class StructDirective
using Base::Base;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Format Strings
@@ -268,7 +268,7 @@ class AttrOrTypeFormat {
bool shouldEmitSpace;
bool lastWasPunctuation;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// ParserGen
@@ -559,7 +559,7 @@ class FormatParser {
/// Seen attribute or type parameters.
llvm::BitVector seenParams;
};
-} // end anonymous namespace
+} // namespace
FailureOr<AttrOrTypeFormat> FormatParser::parse() {
std::vector<std::unique_ptr<Element>> elements;
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h
index 6f24de5ea4f6..c371aee268b4 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h
@@ -25,7 +25,7 @@ void generateAttrOrTypeFormat(const AttrOrTypeDef &def, MethodBody &parser,
/// E.g. 'value' -> 'getValue'.
std::string getParameterAccessorName(llvm::StringRef name);
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRTBLGEN_ATTRORTYPEFORMATGEN_H_
diff --git a/mlir/tools/mlir-tblgen/DialectGen.cpp b/mlir/tools/mlir-tblgen/DialectGen.cpp
index 33c15fb81fbb..de596b408de3 100644
--- a/mlir/tools/mlir-tblgen/DialectGen.cpp
+++ b/mlir/tools/mlir-tblgen/DialectGen.cpp
@@ -41,7 +41,7 @@ namespace {
using DialectFilterIterator =
llvm::filter_iterator<ArrayRef<llvm::Record *>::iterator,
std::function<bool(const llvm::Record *)>>;
-} // end anonymous namespace
+} // namespace
/// Given a set of records for a T, filter the ones that correspond to
/// the given dialect.
diff --git a/mlir/tools/mlir-tblgen/FormatGen.h b/mlir/tools/mlir-tblgen/FormatGen.h
index 3a434765b29e..b5c441916a1f 100644
--- a/mlir/tools/mlir-tblgen/FormatGen.h
+++ b/mlir/tools/mlir-tblgen/FormatGen.h
@@ -21,7 +21,7 @@
namespace llvm {
class SourceMgr;
-} // end namespace llvm
+} // namespace llvm
namespace mlir {
namespace tblgen {
@@ -158,7 +158,7 @@ bool isValidLiteral(StringRef value,
/// Whether a failure in parsing the assembly format should be a fatal error.
extern llvm::cl::opt<bool> formatErrorIsFatal;
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRTBLGEN_FORMATGEN_H_
diff --git a/mlir/tools/mlir-tblgen/OpClass.h b/mlir/tools/mlir-tblgen/OpClass.h
index 5258bd19e302..b0558a0e5513 100644
--- a/mlir/tools/mlir-tblgen/OpClass.h
+++ b/mlir/tools/mlir-tblgen/OpClass.h
@@ -43,7 +43,7 @@ class OpClass : public Class {
ParentClass &parent;
};
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRTBLGEN_OPCLASS_H_
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index f845845f8cb2..f84646c136fd 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -260,7 +260,7 @@ class OpOrAdaptorHelper {
// True if code is being generate for an op. False for an adaptor.
const bool emitForOp;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Op emitter
@@ -446,7 +446,7 @@ class OpEmitter {
const StaticVerifierFunctionEmitter &staticVerifierEmitter;
};
-} // end anonymous namespace
+} // namespace
// Populate the format context `ctx` with substitutions of attributes, operands
// and results.
@@ -2539,7 +2539,7 @@ class OpOperandAdaptorEmitter {
Class adaptor;
StaticVerifierFunctionEmitter &staticVerifierEmitter;
};
-} // end anonymous namespace
+} // namespace
OpOperandAdaptorEmitter::OpOperandAdaptorEmitter(
const Operator &op, StaticVerifierFunctionEmitter &staticVerifierEmitter)
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 08785516b99f..4223c2d2ee58 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -134,7 +134,7 @@ using ResultVariable =
/// This class represents a variable that refers to a successor.
using SuccessorVariable =
VariableElement<NamedSuccessor, Element::Kind::SuccessorVariable>;
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// DirectiveElement
@@ -263,7 +263,7 @@ class LiteralElement : public Element {
/// The spelling of the literal for this element.
StringRef literal;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// WhitespaceElement
@@ -306,7 +306,7 @@ class SpaceElement : public WhitespaceElement {
private:
bool value;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// OptionalElement
@@ -354,7 +354,7 @@ class OptionalElement : public Element {
/// WhitespaceElement).
unsigned parseStart;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// OperationFormat
@@ -468,7 +468,7 @@ struct OperationFormat {
SmallVector<const NamedAttribute *, 8> usedAttributes;
llvm::StringSet<> inferredAttributes;
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// Parser Gen
@@ -795,7 +795,7 @@ enum class ArgumentLengthKind {
/// The argument is a single element, i.e. always represents 1 element.
Single
};
-} // end anonymous namespace
+} // namespace
/// Get the length kind for the given constraint.
static ArgumentLengthKind
@@ -2305,7 +2305,7 @@ class FormatParser {
llvm::DenseSet<const NamedRegion *> seenRegions;
llvm::DenseSet<const NamedSuccessor *> seenSuccessors;
};
-} // end anonymous namespace
+} // namespace
LogicalResult FormatParser::parse() {
llvm::SMLoc loc = curToken.getLoc();
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.h b/mlir/tools/mlir-tblgen/OpFormatGen.h
index ebafec0ddc68..88dbc99d9f78 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.h
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.h
@@ -22,7 +22,7 @@ class Operator;
// Generate the assembly format for the given operator.
void generateOpFormat(const Operator &constOp, OpClass &opClass);
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRTBLGEN_OPFORMATGEN_H_
diff --git a/mlir/tools/mlir-tblgen/OpGenHelpers.h b/mlir/tools/mlir-tblgen/OpGenHelpers.h
index d4b35d2b8049..166d24725ac6 100644
--- a/mlir/tools/mlir-tblgen/OpGenHelpers.h
+++ b/mlir/tools/mlir-tblgen/OpGenHelpers.h
@@ -24,7 +24,7 @@ namespace tblgen {
std::vector<llvm::Record *>
getRequestedOpDefinitions(const llvm::RecordKeeper &recordKeeper);
-} // end namespace tblgen
-} // end namespace mlir
+} // namespace tblgen
+} // namespace mlir
#endif // MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
diff --git a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
index b28cfbb22506..366a236c72c7 100644
--- a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
@@ -148,7 +148,7 @@ struct TypeInterfaceGenerator : public InterfaceGenerator {
"(*static_cast<const ConcreteType *>(this))");
}
};
-} // end anonymous namespace
+} // namespace
//===----------------------------------------------------------------------===//
// GEN: Interface definitions
@@ -443,7 +443,7 @@ void InterfaceGenerator::emitInterfaceDecl(Interface interface) {
os << "template <typename " << valueTemplate << ">\n";
os << "struct " << interface.getName() << "Trait;\n";
- os << "\n} // end namespace detail\n";
+ os << "\n} // namespace detail\n";
// Emit the main interface class declaration.
os << llvm::formatv("class {0} : public ::mlir::{3}<{1}, detail::{2}> {\n"
@@ -570,7 +570,7 @@ struct InterfaceGenRegistration {
std::string genDeclDesc, genDefDesc, genDocDesc;
mlir::GenRegistration genDecls, genDefs, genDocs;
};
-} // end anonymous namespace
+} // namespace
static InterfaceGenRegistration<AttrInterfaceGenerator> attrGen("attr",
"attribute");
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp
index 2a98497ed7b2..03892192995a 100644
--- a/mlir/tools/mlir-tblgen/RewriterGen.cpp
+++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp
@@ -50,7 +50,7 @@ struct format_provider<mlir::tblgen::Pattern::IdentifierLine> {
os << v.first << ":" << v.second;
}
};
-} // end namespace llvm
+} // namespace llvm
//===----------------------------------------------------------------------===//
// PatternEmitter
@@ -328,7 +328,7 @@ class StaticMatcherHelper {
StaticVerifierFunctionEmitter staticVerifierEmitter;
};
-} // end anonymous namespace
+} // namespace
PatternEmitter::PatternEmitter(Record *pat, RecordOperatorMap *mapper,
raw_ostream &os, StaticMatcherHelper &helper)
diff --git a/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp b/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp
index 0b58838c24da..5d9b1af7847a 100644
--- a/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp
+++ b/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp
@@ -109,4 +109,4 @@ TEST_F(RootOrderingTest, contraction) {
check(10, {{v[0], {}}, {v[2], v[0]}, {v[3], v[2]}, {v[1], v[3]}});
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp b/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
index 5125413a6c11..d30815410af9 100644
--- a/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
+++ b/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
@@ -169,4 +169,4 @@ TEST(QuantizationUtilsTest, convertRankedSparseAttrUniform) {
EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5);
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
index 1cb4d085b23b..9ec6c1b15b1a 100644
--- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
+++ b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
@@ -198,7 +198,7 @@ class MergerTest3T1L : public MergerTestBase {
}
};
-} // anonymous namespace
+} // namespace
/// Vector addition of 2 vectors, i.e.:
/// a(i) = b(i) + c(i)
diff --git a/mlir/unittests/IR/AttributeTest.cpp b/mlir/unittests/IR/AttributeTest.cpp
index f76ab456391a..b46fda38fbc6 100644
--- a/mlir/unittests/IR/AttributeTest.cpp
+++ b/mlir/unittests/IR/AttributeTest.cpp
@@ -250,4 +250,4 @@ TEST(SparseElementsAttrTest, GetZero) {
EXPECT_TRUE(zeroStringValue.getType() == stringTy);
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/IR/DialectTest.cpp b/mlir/unittests/IR/DialectTest.cpp
index ddabec514b93..ca89e824a7ed 100644
--- a/mlir/unittests/IR/DialectTest.cpp
+++ b/mlir/unittests/IR/DialectTest.cpp
@@ -142,4 +142,4 @@ TEST(Dialect, RepeatedInterfaceRegistrationDeath) {
#endif
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/IR/InterfaceAttachmentTest.cpp b/mlir/unittests/IR/InterfaceAttachmentTest.cpp
index b1c803823c43..a9b5547e4fb8 100644
--- a/mlir/unittests/IR/InterfaceAttachmentTest.cpp
+++ b/mlir/unittests/IR/InterfaceAttachmentTest.cpp
@@ -398,4 +398,4 @@ TEST(InterfaceAttachment, OperationDelayedContextAppend) {
EXPECT_FALSE(isa<TestExternalOpInterface>(opI.getOperation()));
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/IR/OperationSupportTest.cpp b/mlir/unittests/IR/OperationSupportTest.cpp
index 6510116329b5..759c00ae152c 100644
--- a/mlir/unittests/IR/OperationSupportTest.cpp
+++ b/mlir/unittests/IR/OperationSupportTest.cpp
@@ -271,4 +271,4 @@ TEST(NamedAttrListTest, TestAppendAssign) {
attrs.assign({});
ASSERT_TRUE(attrs.empty());
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/IR/ShapedTypeTest.cpp b/mlir/unittests/IR/ShapedTypeTest.cpp
index 9c2a93e9429c..b46029f1ba06 100644
--- a/mlir/unittests/IR/ShapedTypeTest.cpp
+++ b/mlir/unittests/IR/ShapedTypeTest.cpp
@@ -127,4 +127,4 @@ TEST(ShapedTypeTest, CloneVector) {
VectorType::get(vectorNewShape, vectorNewType));
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/IR/SubElementInterfaceTest.cpp b/mlir/unittests/IR/SubElementInterfaceTest.cpp
index 78356fd9eaf4..292628aad5d4 100644
--- a/mlir/unittests/IR/SubElementInterfaceTest.cpp
+++ b/mlir/unittests/IR/SubElementInterfaceTest.cpp
@@ -32,4 +32,4 @@ TEST(SubElementInterfaceTest, Nested) {
ArrayRef<Attribute>({trueAttr, falseAttr, boolArrayAttr}));
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
index 90f8e7629fe7..ca7006c22efb 100644
--- a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
+++ b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
@@ -225,7 +225,7 @@ struct DLTestDialect : Dialect {
}
};
-} // end namespace
+} // namespace
TEST(DataLayout, FallbackDefault) {
const char *ir = R"MLIR(
diff --git a/mlir/unittests/Pass/AnalysisManagerTest.cpp b/mlir/unittests/Pass/AnalysisManagerTest.cpp
index a5dcd18c8244..f6c1c1e6fe64 100644
--- a/mlir/unittests/Pass/AnalysisManagerTest.cpp
+++ b/mlir/unittests/Pass/AnalysisManagerTest.cpp
@@ -246,4 +246,4 @@ TEST(AnalysisManagerTest, DependentAnalysis2Ctors) {
EXPECT_TRUE(an.ctor2called);
}
-} // end namespace
+} // namespace
diff --git a/mlir/unittests/Pass/PassManagerTest.cpp b/mlir/unittests/Pass/PassManagerTest.cpp
index a3f8e210dcb2..bd6ef0462a71 100644
--- a/mlir/unittests/Pass/PassManagerTest.cpp
+++ b/mlir/unittests/Pass/PassManagerTest.cpp
@@ -87,7 +87,7 @@ struct InvalidPass : Pass {
*static_cast<const InvalidPass *>(this));
}
};
-} // anonymous namespace
+} // namespace
TEST(PassManagerTest, InvalidPass) {
MLIRContext context;
@@ -127,4 +127,4 @@ TEST(PassManagerTest, InvalidPass) {
ASSERT_DEATH(pm.addPass(std::make_unique<InvalidPass>()), "");
}
-} // end namespace
+} // namespace
More information about the Mlir-commits
mailing list