diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md index a3920732e1099b..577cd81f40a13b 100644 --- a/mlir/docs/PassManagement.md +++ b/mlir/docs/PassManagement.md @@ -82,7 +82,7 @@ struct MyFunctionPass : public PassWrapper x diff --git a/mlir/examples/toy/Ch4/include/toy/Passes.h b/mlir/examples/toy/Ch4/include/toy/Passes.h index 14508014eabef7..b95e0f095b9f84 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 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 c0148ff169ccab..cfe5a872e7d6e3 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 f9f32c22f8d4d3..d35679cb55cee3 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::toy::createShapeInferencePass() { diff --git a/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp index 5e74d95d573b51..01bd10c2fd173a 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 6f07ba64f7790f..2f496364b62a75 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 createShapeInferencePass(); /// for a subset of the Toy IR (e.g. matmul). std::unique_ptr 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 c0148ff169ccab..cfe5a872e7d6e3 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 4a03534b502d1b..8ac869df8c6665 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 f9f32c22f8d4d3..d35679cb55cee3 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::toy::createShapeInferencePass() { diff --git a/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp index 5e74d95d573b51..01bd10c2fd173a 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 e878d71d711c71..b52f236f81e05e 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 createLowerToAffinePass(); /// well as `Affine` and `Std`, to the LLVM dialect for codegen. std::unique_ptr 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 c0148ff169ccab..cfe5a872e7d6e3 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 4a03534b502d1b..8ac869df8c6665 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 c21f9d77b2400d..648b9e87e1f8ef 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({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 f9f32c22f8d4d3..d35679cb55cee3 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::toy::createShapeInferencePass() { diff --git a/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp index 5e74d95d573b51..01bd10c2fd173a 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 0b88244dc6ef5c..57e9d134e50051 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 createLowerToAffinePass(); /// well as `Affine` and `Std`, to the LLVM dialect for codegen. std::unique_ptr 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 c0148ff169ccab..cfe5a872e7d6e3 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 285d19c03f9f9b..8b63c0bdeaecae 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 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 4a03534b502d1b..8ac869df8c6665 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 c21f9d77b2400d..648b9e87e1f8ef 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({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 f9f32c22f8d4d3..d35679cb55cee3 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::toy::createShapeInferencePass() { diff --git a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp index 95072eeef1d2ee..11dba6f55c4a03 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 operands) { return value(); } diff --git a/mlir/include/mlir/Analysis/AffineAnalysis.h b/mlir/include/mlir/Analysis/AffineAnalysis.h index 98b02609724af5..120a5be4596acb 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> *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 0f763f833f5015..8235f03c470b3a 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 925af24ddd69c4..3ff9e8e45cc381 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, 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 d8bf933d81f8a5..9669a3c13b24ea 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 c2b6717e6b7fd1..9238b95ccc0cfb 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 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 7566c4d21b8269..29a610e7aa10ad 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 8c32a0ffda7e2f..74891520139d80 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 41c0e7c82255d3..3797398e58e0ec 100644 --- a/mlir/include/mlir/Analysis/LoopAnalysis.h +++ b/mlir/include/mlir/Analysis/LoopAnalysis.h @@ -113,6 +113,6 @@ bool isOpwiseShiftValid(AffineForOp forOp, ArrayRef shifts); /// reductions not covered by this generic matching. Value matchReduction(ArrayRef iterCarriedArgs, unsigned redPos, SmallVectorImpl &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 1587a4ea13138e..f0a7088bd8fcd0 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 aa3080431cf69a..a9508057815cf1 100644 --- a/mlir/include/mlir/Analysis/NumberOfExecutions.h +++ b/mlir/include/mlir/Analysis/NumberOfExecutions.h @@ -102,6 +102,6 @@ class BlockNumberOfExecutionsInfo { Optional 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 26646858a3b987..fa5409260c427c 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 topologicalSort(const SetVector &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 d1d2218b8c0197..7c5b5b1d2aa0f1 100644 --- a/mlir/include/mlir/Analysis/Utils.h +++ b/mlir/include/mlir/Analysis/Utils.h @@ -380,6 +380,6 @@ unsigned getInnermostCommonLoopDepth( ArrayRef ops, SmallVectorImpl *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 c2e43850c2b6fd..000516e7a85f7a 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 886efb811c9cd3..aa18558cf34494 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 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 02a45fc4cd9258..0e426082e57c37 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 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 483867933b7d2e..d1221d17d768d5 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 06e89113dd339a..da4f0f9477de98 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 639452fdcc06b2..c8194d3b660c2b 100644 --- a/mlir/include/mlir/Dialect/Affine/Passes.h +++ b/mlir/include/mlir/Dialect/Affine/Passes.h @@ -91,6 +91,6 @@ std::unique_ptr> 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 87392a8f20a785..4fa592d003a0f6 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 096b2d354f0de0..09b6942ecd28ea 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 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 37e1a0e33a8820..0d3215555c62dc 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 9accb9c626c4ad..78873cf58fcb18 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 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 12430226173bea..3b0a6cc285d7d8 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 a4447be533c2b2..c3542b5da77a6c 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 ad8982546cab98..3e5f288336f2fd 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 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 9cd1318e12978e..f3a38567ca3116 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 class SmartMutex; -} // end namespace sys -} // end namespace llvm +} // namespace sys +} // namespace llvm namespace mlir { namespace LLVM { @@ -131,7 +131,7 @@ class LoopOptionsAttrBuilder { SmallVector 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 279ea4b1d898a6..54b519bcb347fc 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 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 9080b277625de4..44f64cc8573f34 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 49f5be00c9785a..485efaab28a343 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 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 b4f11356b121ec..7ed3e8c03f1635 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 &dims, SmallVectorImpl &symbols, llvm::function_ref 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 f08e9db4dc4ee1..b3503fc732bb81 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 ac128ac928ea67..c5d18c52e52b29 100644 --- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h +++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h @@ -52,7 +52,7 @@ ArrayRef getDirectImpliedCapabilities(Capability cap); /// third one will also be returned. SmallVector 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 4ec6cc52db7aab..0d4471ee51c645 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 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 1cf83e6b0beff2..4ed7e0a9b54e8d 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 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 856a7048018e47..fe9c3c6e26f1b8 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 c453e80ee71de3..d96e17604d128d 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 4a27d3caf5d73c..6187d59e547ef2 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 cbf52d1bec19f9..201dc970e515ca 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 4c3799cb9428a1..61853d0630fc99 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 9445dee26602c6..b62399ce21aece 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 a31c822828e91c..a11dedb274a2a1 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 d7084452bd0e02..b0508c067d900b 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 c51cadf048aec4..c23f713752f801 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 bdd5909faebd57..b59452572bf2fc 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 0ed4b8370cb1db..6dd4b9aaf55526 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 788e0c8316e23e..a9f4f241410fdc 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 3baff4c9149a2a..46647b6781920f 100644 --- a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h +++ b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h @@ -81,8 +81,8 @@ struct Vector1D { 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 diff --git a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h index a1cb088e51778f..0b74c115b0bdf9 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 b33959ef468a63..793183cd5157d8 100644 --- a/mlir/include/mlir/ExecutionEngine/OptUtils.h +++ b/mlir/include/mlir/ExecutionEngine/OptUtils.h @@ -52,6 +52,6 @@ makeLLVMPassesTransformer(llvm::ArrayRef 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 259cc5e3f8717a..a2aa1fdb86d7ca 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 320891ee5a1926..14bddf5794b5e6 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 691e6c71e62061..eeb12adff08869 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 dec3e69beeb49f..97e120208d3996 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 3a2e8b16eb9c3e..9fe9f53b1b0c62 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 cafcf585bf2d6e..b270f2aa5634c9 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, friend struct llvm::ilist_traits; }; -} // 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 0988012da8ea61..e6aea796831407 100644 --- a/mlir/include/mlir/IR/BlockAndValueMapping.h +++ b/mlir/include/mlir/IR/BlockAndValueMapping.h @@ -94,6 +94,6 @@ class BlockAndValueMapping { DenseMap 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 5a2bece9c0b606..c6371f53c662e0 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 2ed1c84ee537f8..834a70e54cba0a 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(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 969bb957483404..0852678888246c 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 01c4f3fd6d39db..36bc4379b1bdad 100644 --- a/mlir/include/mlir/IR/BuiltinOps.h +++ b/mlir/include/mlir/IR/BuiltinOps.h @@ -46,7 +46,7 @@ class OwningModuleRef : public OwningOpRef { OwningModuleRef(OwningOpRef &&other) : OwningOpRef(std::move(other)) {} }; -} // end namespace mlir +} // namespace mlir namespace llvm { /// Allow stealing the low bits of FuncOp. @@ -73,6 +73,6 @@ struct PointerLikeTypeTraits { } 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 10d8a5847ebd2d..296b12c4279277 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 ad1d22764165fd..0f7912d02ffca2 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 different 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 c668df03c47458..d7dc51189d6aeb 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 70afd029c94f99..bbe4da6edd8b46 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 3ffed3d932d9bb..8649e48dedfcd1 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 83b2b819a5ce04..d94d5be3c53e59 100644 --- a/mlir/include/mlir/IR/Dominance.h +++ b/mlir/include/mlir/IR/Dominance.h @@ -109,7 +109,7 @@ class DominanceInfoBase { mutable DenseMap> dominanceInfos; }; -} // end namespace detail +} // namespace detail /// A class for computing basic dominance information. Note that this /// class is aware of different types of regions and returns a @@ -196,7 +196,7 @@ class PostDominanceInfo : public detail::DominanceInfoBase { } }; -} // end namespace mlir +} // namespace mlir namespace llvm { @@ -222,5 +222,5 @@ struct GraphTraits { 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 cc086abd1b86d3..0964d9b3dd7127 100644 --- a/mlir/include/mlir/IR/FunctionSupport.h +++ b/mlir/include/mlir/IR/FunctionSupport.h @@ -796,8 +796,8 @@ Attribute FunctionLike::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 f72e1a2e067143..0e2574768b14e7 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 77e1a0cd620cc6..47ffbf156d90c2 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 1077c9f49b89a5..76ae7a48a3cbd1 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 bc9a8a95e4a09a..e2014954e9fb11 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 3f6720d0e794ab..07a6ece3c01bef 100644 --- a/mlir/include/mlir/IR/Matchers.h +++ b/mlir/include/mlir/IR/Matchers.h @@ -225,7 +225,7 @@ struct RecursivePatternMatcher { std::tuple 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 2fc3cfbf08092f..ad461e8aef0750 100644 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -339,7 +339,7 @@ struct MultiOperandTraitBase : public TraitBase { 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 { 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 @@ -563,7 +563,7 @@ struct MultiResultTraitBase : public TraitBase { 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 { 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 @@ -1418,7 +1418,7 @@ struct Tensorizable : public TraitBase { /// 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 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 609f6be55a2c93..4b763f9efe36b3 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 e03986b6885398..0f0f16603ce435 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 struct cast_convert_val { 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 d16b19bf309beb..d6347b70b55471 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 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 } }; -} // end namespace llvm +} // namespace llvm #endif diff --git a/mlir/include/mlir/IR/OwningOpRef.h b/mlir/include/mlir/IR/OwningOpRef.h index c7ea1c615e6062..e509800c83aaa7 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 d02bda793b0845..7aedec1b15f088 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 4558ce436a9d1a..44ede7b55b6b70 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 15433cd0b69c97..c02bcc2ad04822 100644 --- a/mlir/include/mlir/IR/SymbolTable.h +++ b/mlir/include/mlir/IR/SymbolTable.h @@ -368,7 +368,7 @@ class SymbolTable : public TraitBase { } }; -} // 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 384223161014f1..0d60e95b54c112 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(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 45f8fcbc046843..6681e18c6e483d 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 04bf36e95feb00..d19d319a42c08f 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; -} // 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 0c415c701f3aa4..8c828413038cdd 100644 --- a/mlir/include/mlir/IR/Types.h +++ b/mlir/include/mlir/IR/Types.h @@ -252,7 +252,7 @@ template 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 8b839054755138..ed1f8ea96d01a8 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(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 } }; -} // end namespace llvm +} // namespace llvm #endif diff --git a/mlir/include/mlir/IR/Verifier.h b/mlir/include/mlir/IR/Verifier.h index d9d99dd09df040..3e1a0f858f14eb 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 af2d0537966272..7827a9518cfbb2 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 using walkResultType = decltype(walk(nullptr, std::declval())); -} // end namespace detail +} // namespace detail } // namespace mlir diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.h b/mlir/include/mlir/Interfaces/CallInterfaces.h index cc8e26eceba3ff..1b842e8412551e 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 { using PointerUnion::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 da3549ff3d77f8..9d65d104aa1e64 100644 --- a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h +++ b/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h @@ -140,7 +140,7 @@ struct ReturnLike : public TraitBase { }; } // 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 5a224d93cfdf0b..e27fcc0ada455e 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 133819d95569e2..6278e31b49177d 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 33a6ba69050e3c..bc2f856aedf6db 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 5f5d528f37b252..443fbb76d7c007 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 constructContainerOpForParserIfNecessary( return OwningOpRef(); 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 cf955bb564227e..f5b27fa742fe19 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; }; -} // 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 d5840818dffc42..9dab7b7b5950b9 100644 --- a/mlir/include/mlir/Pass/AnalysisManager.h +++ b/mlir/include/mlir/Pass/AnalysisManager.h @@ -94,7 +94,7 @@ std::enable_if_t::value, bool> isInvalidated(AnalysisT &analysis, const PreservedAnalyses &pa) { return !pa.isPreserved(); } -} // 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 3a9865d669dd40..308df1c7ced97c 100644 --- a/mlir/include/mlir/Pass/Pass.h +++ b/mlir/include/mlir/Pass/Pass.h @@ -422,6 +422,6 @@ template 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 88c8516343d0a9..c87be0407745fa 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 impl; }; -} // end namespace mlir +} // namespace mlir namespace llvm { template <> struct DenseMapInfo { @@ -143,6 +143,6 @@ template <> struct DenseMapInfo { 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 08468882d85768..1389276c2a1966 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 01fcde2eb7fbe0..13c44345bf23d3 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 options; }; -} // end namespace detail +} // namespace detail //===----------------------------------------------------------------------===// // PassPipelineOptions @@ -276,7 +276,7 @@ template class PassPipelineOptions : public detail::PassOptions { struct EmptyPipelineOptions : public PassPipelineOptions { }; -} // 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 8e07fc3f192029..7a7da3802050a3 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 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 3b6fa57a491a19..ed47fa66454407 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 438f47b329d042..c0d46bfccf54ba 100644 --- a/mlir/include/mlir/Reducer/Passes.h +++ b/mlir/include/mlir/Reducer/Passes.h @@ -20,6 +20,6 @@ std::unique_ptr 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 6cdbd2354810a3..c938a1b5453d05 100644 --- a/mlir/include/mlir/Reducer/ReductionNode.h +++ b/mlir/include/mlir/Reducer/ReductionNode.h @@ -192,6 +192,6 @@ class ReductionNode::iterator ArrayRef 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 887d120e4c3521..a85562fda4d93f 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 5969d63eaee2c1..9fe95adaed7608 100644 --- a/mlir/include/mlir/Reducer/Tester.h +++ b/mlir/include/mlir/Reducer/Tester.h @@ -53,6 +53,6 @@ class Tester { ArrayRef testScriptArgs; }; -} // end namespace mlir +} // namespace mlir #endif diff --git a/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h b/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h index 00c62163c23bc2..74ddba34ada942 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; }; -} // 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 9314496ecda155..a2e2286ebda348 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 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 74f0f4c47b22e4..227d213b0ddac4 100644 --- a/mlir/include/mlir/Support/DebugAction.h +++ b/mlir/include/mlir/Support/DebugAction.h @@ -223,6 +223,6 @@ template 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 1a8c33e2001391..92103fd2f171f6 100644 --- a/mlir/include/mlir/Support/InterfaceSupport.h +++ b/mlir/include/mlir/Support/InterfaceSupport.h @@ -270,7 +270,7 @@ class InterfaceMap { SmallVector> 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 b8f6bbeba94d97..3418f9ea760663 100644 --- a/mlir/include/mlir/Support/LLVM.h +++ b/mlir/include/mlir/Support/LLVM.h @@ -70,7 +70,7 @@ class APFloat; template class function_ref; template 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 65429e5f0265fa..622a7d33480c45 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 51a26d08341a47..666d83a614a5a8 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 170c77d43a298b..d03d30ee5bbcba 100644 --- a/mlir/include/mlir/Support/StorageUniquer.h +++ b/mlir/include/mlir/Support/StorageUniquer.h @@ -326,6 +326,6 @@ class StorageUniquer { return DenseMapInfo::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 3b5d6f0f424f9b..083956b717422d 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 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 c966ba4ecd57b3..badab11b8e0471 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(); } -} // 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 { 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 1d89a76c2924c8..5a8f7882c00d63 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; -} // 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 303edfdf143d1d..9f2375bc30207f 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 f8397128f03a0b..043a3556d1cd95 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 b901c8414e81ed..a5e6d01c99571d 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 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 11fa261faccf07..1f310fe1d08237 100644 --- a/mlir/include/mlir/TableGen/Class.h +++ b/mlir/include/mlir/TableGen/Class.h @@ -424,8 +424,8 @@ class Constructor : public Method { SmallVector 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 b82f6460ae153e..573a4fa4246057 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> { : std::string(); } }; -} // end namespace detail +} // namespace detail /// Generically convert a value to a std::string. template std::string stringify(T &&t) { diff --git a/mlir/include/mlir/TableGen/Constraint.h b/mlir/include/mlir/TableGen/Constraint.h index ebb3d2955ddf69..4e099aa3341613 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 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 d56b2288e2ef5e..3a378898bf50d2 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 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 6879dbf98fe76f..1772a90926ee37 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 16ed55954f3a22..6a9364d3f7f5ab 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 b02995100deb23..437306735ab509 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 { 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 a3462097e4802c..0ddfdf29a8e2e6 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 e8cc3d7f15787d..44f10440c1e33c 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 968c85416965d0..715420e2d997dd 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 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 ac8c98e5a490ce..3c7fe6dad70722 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 { 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 eb3fe53856951e..6c1b762025a0dd 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 423ef720826325..4b8dc92714ef0a 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 c5ced6682c16ee..4dcc6c90fbeeb4 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 0659a983f0d5c1..64f0386751891f 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 52d056d0581e00..c3d0d2af7ed444 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 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 7fc892690a25f4..1828e88461b324 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 cdba5a8094931a..983a5fd23d094a 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 ab7cce673d6d1e..e39258beeaac86 100644 --- a/mlir/include/mlir/Target/SPIRV/Deserialization.h +++ b/mlir/include/mlir/Target/SPIRV/Deserialization.h @@ -29,7 +29,7 @@ class ModuleOp; OwningOpRef deserialize(ArrayRef 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 f12ca452236dcb..dc2b8c7edec42a 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 &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 d8431dc7dc2a67..25033e2c4f1697 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 &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 dcfece9bb191cc..14912f1c308c0b 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 03ac6b84beaae5..0e6b589934b6c6 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 8929124ce1b3d5..d9d06963fb28ba 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 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 d5fb29387b2b26..d840c996f69b98 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 &convertedOps, function_ref 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 7f4166c12ded9e..49af0f45e1a223 100644 --- a/mlir/include/mlir/Transforms/FoldUtils.h +++ b/mlir/include/mlir/Transforms/FoldUtils.h @@ -138,6 +138,6 @@ class OperationFolder { DialectInterfaceCollection 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 bb0af5bded9b11..d9d272110b3101 100644 --- a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h +++ b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h @@ -94,6 +94,6 @@ bool applyOpPatternsAndFold(ArrayRef 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 1bf318cf0ecee7..a664ae4d8f3f8f 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 9012494cd46fc4..1da114574c9a66 100644 --- a/mlir/include/mlir/Transforms/LocationSnapshot.h +++ b/mlir/include/mlir/Transforms/LocationSnapshot.h @@ -61,6 +61,6 @@ std::unique_ptr createLocationSnapshotPass(OpPrintingFlags flags, /// Overload utilizing pass options for initialization. std::unique_ptr 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 87a71b6041dbd2..02eeb3e981eb46 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 srcOps, ArrayRef dstOps, DenseSet &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 f2651be24b15c4..70e7395237ec77 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 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 8ec611048a4dc4..e6cfda88636324 100644 --- a/mlir/include/mlir/Transforms/Passes.h +++ b/mlir/include/mlir/Transforms/Passes.h @@ -137,6 +137,6 @@ std::unique_ptr> 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 bac651909a1692..5280c2648bfae3 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 *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 ec1b6c281e877d..9fd2fe2fbefe68 100644 --- a/mlir/include/mlir/Transforms/ViewOpGraph.h +++ b/mlir/include/mlir/Transforms/ViewOpGraph.h @@ -23,6 +23,6 @@ class Pass; std::unique_ptr 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 ea600eed4d8097..34bd07ecc9e5dd 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 b91d2de602fe79..c6642112e8cbf1 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 bd5ac0b39ec47c..a72b3cbb356a41 100644 --- a/mlir/lib/Analysis/NestedMatcher.cpp +++ b/mlir/lib/Analysis/NestedMatcher.cpp @@ -171,5 +171,5 @@ bool isLoadOrStore(Operation &op) { return isa(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 dbfc1186db4e0e..0e7ab343a2e1c6 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 b5a0f84d4aba4e..81420919750545 100644 --- a/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp +++ b/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp @@ -62,7 +62,7 @@ class PyExecutionEngine { std::vector 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 272de0d7aaaf22..faf01e5c5f11d1 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 0d349143306c8d..cd5755248ea2ef 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 2c38a3a25c6c81..dba2231a153efc 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 d5802e28f563ff..0467dd9c2bfe24 100644 --- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp +++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp @@ -722,7 +722,7 @@ class AffineVectorStoreLowering : public OpRewritePattern { } }; -} // 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 07078c77626e13..f8d59e08f98336 100644 --- a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp +++ b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp @@ -108,7 +108,7 @@ struct CmpFOpLowering : public ConvertOpToLLVMPattern { 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 9f1e0a41a77a50..da62168576aea7 100644 --- a/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp +++ b/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp @@ -190,7 +190,7 @@ class CmpFOpNanNonePattern final : public OpConversionPattern { ConversionPatternRewriter &rewriter) const override; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Conversion Helpers @@ -845,7 +845,7 @@ struct ConvertArithmeticToSPIRVPass signalPassFailure(); } }; -} // end anonymous namespace +} // namespace std::unique_ptr mlir::arith::createConvertArithmeticToSPIRVPass() { return std::make_unique(); diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp index ac43d1a98791a6..9768211d314243 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(); diff --git a/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp b/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp index 55935e7f971f75..f52e589ad9dfe0 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 b074e415633153..1a570dc5985b63 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(); diff --git a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp index 45222e5a9e39cf..e106ebf3c44c4f 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 200fc3e21149ca..b8d1a8556395f8 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 d69c24e6a33ad1..87dcd2723686f8 100644 --- a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp +++ b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp @@ -135,7 +135,7 @@ struct PatternLowering { /// generated operations. SetVector 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 1b7a3bb98bc56f..4a7dcdc696f484 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 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 796eb762c97d80..9ce88d4b37be14 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 8fcd320a7aa5fe..642b6a076f5ce4 100644 --- a/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h +++ b/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h @@ -131,7 +131,7 @@ class OptimalBranching { DenseMap 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 5b4bc9231646d6..d9f47138aae535 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 90d870fe82a28a..657f04111f02d7 100644 --- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp +++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp @@ -451,7 +451,7 @@ struct SCFToOpenMPPass : public ConvertSCFToOpenMPBase { } }; -} // end namespace +} // namespace std::unique_ptr> mlir::createConvertSCFToOpenMPPass() { return std::make_unique(); diff --git a/mlir/lib/Conversion/SPIRVCommon/Pattern.h b/mlir/lib/Conversion/SPIRVCommon/Pattern.h index 26ffeec57396c0..39338995c297cb 100644 --- a/mlir/lib/Conversion/SPIRVCommon/Pattern.h +++ b/mlir/lib/Conversion/SPIRVCommon/Pattern.h @@ -39,7 +39,7 @@ class UnaryAndBinaryOpPattern final : public OpConversionPattern { } }; -} // 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 fcaba6e8748341..200834a2d1bc6c 100644 --- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp +++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp @@ -1052,7 +1052,7 @@ struct LLVMLoweringPass : public ConvertStandardToLLVMBase { StringAttr::get(m.getContext(), this->dataLayout)); } }; -} // end namespace +} // namespace std::unique_ptr> mlir::createLowerToLLVMPass() { return std::make_unique(); diff --git a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp index 50b4c3a8dd2e76..a9a3f53ee36e25 100644 --- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp +++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp @@ -145,7 +145,7 @@ class VectorTransferConversion : public ConvertOpToLLVMPattern { 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 48affcd2c1ee3f..edbcba763f0c45 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::replaceAffineOp( ArrayRef mapOperands) const { rewriter.replaceOpWithNewOp(op, map, mapOperands); } -} // end anonymous namespace. +} // namespace void AffineApplyOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -1651,7 +1651,7 @@ struct AffineForEmptyLoopFolder : public OpRewritePattern { return success(); } }; -} // end anonymous namespace +} // namespace void AffineForOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -2033,7 +2033,7 @@ struct AlwaysTrueOrFalseIf : public OpRewritePattern { 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 dad2cab6455293..218764dbec2662 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 a6d5f43819b2dc..b6f9e4c7063134 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 e1b635a110a2b5..d3df2138f007fb 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 5a42c569dbefee..69d21c66e1a483 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 { 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 9682104b356e7b..f876153834bbd0 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 { /// 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 76da2b07ef1912..cf8e15104f8b47 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 { void runOnFunction() override; }; -} // end anonymous namespace +} // namespace std::unique_ptr> mlir::createLoopUnrollAndJamPass(int unrollJamFactor) { diff --git a/mlir/lib/Dialect/Affine/Transforms/PassDetail.h b/mlir/lib/Dialect/Affine/Transforms/PassDetail.h index 3ba6fa182686d5..c3d55a60e56343 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 275338918fb0f4..04417b92b8e197 100644 --- a/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp @@ -69,7 +69,7 @@ struct SimplifyAffineStructures DenseMap simplifiedAttributes; }; -} // end anonymous namespace +} // namespace std::unique_ptr> mlir::createSimplifyAffineStructuresPass() { diff --git a/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp b/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp index 827556dca293b1..0e41d02d3c278b 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 { void runOnFunction() override; }; -} // end anonymous namespace +} // namespace Vectorize::Vectorize(ArrayRef 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 f65f8664a42a69..ea4acbc0c9a279 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 b65b152124dfab..dc4809ac7bc23e 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 9a0e8c7ba7b61f..a7691e53ce6fcc 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 e97afac9ca2d72..d9ab9275123876 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 1f3f27466bf0bf..0947804f125fc0 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 6d2321486d379b..9eb93bb4caae96 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 84980bf5488633..601ba9597bec10 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 5f93007b8e4afd..f81d726108d15b 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 { } }; -} // 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 d82170be9b77fd..49a39b621f37e6 100644 --- a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp @@ -665,7 +665,7 @@ struct BufferDeallocationPass : BufferDeallocationBase { } }; -} // 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 4565707e1fa0e6..37f88113c59b08 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 dc1949f012bc1f..579c385d653c2d 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 { } }; -} // 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 c83ac3035a4034..ab352a00349515 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 e8ad4ecd2593ac..6f488b0362a6eb 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(other) {} diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp index 2c320a380d9c2c..1688fa467e21e6 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 cf8e46842662a8..0481d15558935d 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 93b400f95a130d..3bf306dba493af 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 LLVM::createLegalizeForExportPass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h b/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h index 2a46e1208bc471..8449f77d445787 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 4ea37ce25c6419..4d004352c6839b 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 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 ede2f965036edd..bd6e8cd87d9971 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 { signalPassFailure(); } }; -} // end anonymous namespace +} // namespace std::unique_ptr> mlir::createLinalgBufferizePass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp index f90b5e5e20eceb..58f5845f0bf433 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 01a8d14111ccd7..b499dbbf0322e6 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 eb214004917457..0f7307cd68b5eb 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 057cb4600adfdd..f27355835dfbaa 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 938197df59c220..b9a78120a9e1ad 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 { return success(); } }; -} // end anonymous namespace. +} // namespace void AllocOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -676,7 +676,7 @@ struct DimOfMemRefReshape : public OpRewritePattern { } }; -} // 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 { } }; -} // 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 31475ec7b4f163..96f6ea57f6975e 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().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 2c6299f9c71c47..64844ef3ca652c 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 { 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 8727bfc8b2aa1e..4d6fb3e1f3710a 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 e28accc93fd9ec..c7f1436f9fbbcb 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 399a5b18dafb01..a3f9b5b8ca847e 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 { return signalPassFailure(); }; }; -} // end anonymous namespace +} // namespace std::unique_ptr mlir::createSCFBufferizePass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/SCF/Transforms/PassDetail.h b/mlir/lib/Dialect/SCF/Transforms/PassDetail.h index 7dfdb203ea914d..49f67c27873df1 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 c5125860d43794..05885492100187 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 9c72dbb6f7aa3f..ccd4c1d9206410 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 cb4f01f1e90857..da4f3c5c6be786 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 b89312fb8ae79d..c381ee545121e5 100644 --- a/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp +++ b/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp @@ -38,7 +38,7 @@ class RewriteInsertsPass SmallVectorImpl &insertions); }; -} // anonymous namespace +} // namespace void RewriteInsertsPass::runOnOperation() { SmallVector, 4> workList; diff --git a/mlir/lib/Dialect/Shape/Transforms/PassDetail.h b/mlir/lib/Dialect/Shape/Transforms/PassDetail.h index 6f130c808b0e5b..d1d54b929d81e9 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 5e5d056419b2ab..8404aa6213387a 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 mlir::createSparsificationPass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp index a974a4fe926262..1a43c0937d038c 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 { 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 58dda4860cca77..2cd22ef9aa2f71 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 { return success(); } }; -} // end anonymous namespace +} // namespace void mlir::populateCallOpTypeConversionPattern(RewritePatternSet &patterns, TypeConverter &converter) { @@ -85,7 +85,7 @@ class BranchOpInterfaceTypeConversion private: function_ref 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 { 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 38bf42c567d4e1..eadd026ead3ca6 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 860e0b84cfe66a..0c180892cdaf7e 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 7f1bd74cd37aa3..6edfe47fa957cc 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 { 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 5c95f2434795e6..858a0ebf0b8f88 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 601e66006d6ff8..898bc258469f69 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(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 c1fcca2d27e576..e623089f50f045 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 mlir::tosa::createTosaDecomposeTransposeConvPass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp index cd94be1abf7e27..33a1e34d2415a4 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 { }); } }; -} // end anonymous namespace +} // namespace std::unique_ptr mlir::tosa::createTosaInferShapesPass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp index 36b2287394338d..d3b2297059b1ef 100644 --- a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp +++ b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp @@ -227,7 +227,7 @@ struct ConvertTosaOp 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 mlir::tosa::createTosaMakeBroadcastablePass() { return std::make_unique(); diff --git a/mlir/lib/Dialect/Vector/VectorOps.cpp b/mlir/lib/Dialect/Vector/VectorOps.cpp index bbe7b7413f2cda..9768483231c9d4 100644 --- a/mlir/lib/Dialect/Vector/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/VectorOps.cpp @@ -2302,7 +2302,7 @@ class StridedSliceSplat final : public OpRewritePattern { } }; -} // end anonymous namespace +} // namespace void ExtractStridedSliceOp::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -3910,7 +3910,7 @@ class TransposeFolder final : public OpRewritePattern { } }; -} // end anonymous namespace +} // namespace void vector::TransposeOp::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -4005,7 +4005,7 @@ class CreateMaskFolder final : public OpRewritePattern { } }; -} // 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 5ecce561a2f5e6..e45e5c9391a65a 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 193e305e7b4d43..9a5c8e41495cc1 100644 --- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp +++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp @@ -681,7 +681,7 @@ static SparseTensorCOO *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 1c38e54bc3e63a..dfc10542b05895 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 153742fd698bfb..686dbe8dcc08bc 100644 --- a/mlir/lib/IR/AffineMap.cpp +++ b/mlir/lib/IR/AffineMap.cpp @@ -89,7 +89,7 @@ class AffineExprConstantFolder { ArrayRef 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 d3090e3a591732..c0a906b8365c16 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 d3c239d9489f36..5d5f896b7fad08 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 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 &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 53d560827db170..2fa4baabc4b6be 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 8400870b91351c..fc252585dd212b 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 filenameToBufId; }; -} // end namespace detail -} // end namespace mlir +} // namespace detail +} // namespace mlir /// Return a processable FileLineColLoc from the given location. static Optional 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 56bd66967f1454..631dc410632ad4 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 451c1594ca12e0..262617dad167e3 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 670faf1aa930f1..1e10d60f59485c 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 clOptions; @@ -110,7 +110,7 @@ struct ScopedWriterLock { } llvm::sys::SmartRWMutex *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 1dbb1168e1f55a..961f6c159705b8 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 limit; }; -} // end anonymous namespace +} // namespace /// Collect all of the symbol scopes from 'symbol' to (inclusive) 'limit'. static SmallVector collectSymbolScopes(Operation *symbol, diff --git a/mlir/lib/IR/Verifier.cpp b/mlir/lib/IR/Verifier.cpp index f041f9e35a8124..840a3156f283af 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 opsWithIsolatedRegions; diff --git a/mlir/lib/Parser/AffineParser.cpp b/mlir/lib/Parser/AffineParser.cpp index 80cf470f1d32d3..e8c4a02c21ce93 100644 --- a/mlir/lib/Parser/AffineParser.cpp +++ b/mlir/lib/Parser/AffineParser.cpp @@ -99,7 +99,7 @@ class AffineParser : public Parser { unsigned numSymbolOperands; SmallVector, 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 e8c70b7df965c8..7bbbbc7a5832c0 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 63b85427e25399..13da92c05ff732 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 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 8ba8133d14821e..8f24d08dfbe73f 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 1818e420edd01b..87d8f4bcf4de3f 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 { /// The backing operation parser. OperationParser &parser; }; -} // end anonymous namespace. +} // namespace FailureOr 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 9a1894deee7bfb..da0c81c0060a09 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 f5faffff31976f..5ab67548aaec7f 100644 --- a/mlir/lib/Parser/ParserState.h +++ b/mlir/lib/Parser/ParserState.h @@ -91,7 +91,7 @@ struct ParserState { SmallVector 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 d4d09f96ab1315..4f5e948e6aab1f 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 2094770b39c0ed..403d88d2d2933f 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 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 57ede84c5a439e..c7bbf4a9b2a785 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> 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 fdc995c335ccc9..46fec825d3d955 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 outputFile = nullptr; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // PassManager diff --git a/mlir/lib/Pass/PassDetail.h b/mlir/lib/Pass/PassDetail.h index 24782fc80f1b6b..230551cc14b32b 100644 --- a/mlir/lib/Pass/PassDetail.h +++ b/mlir/lib/Pass/PassDetail.h @@ -119,6 +119,6 @@ class PassCrashReproducerGenerator { std::unique_ptr 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 f5780ab27b5ba5..c9ba4e4524f2c8 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 options; diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp index a7fb9ec4ee0bf1..eae50918dbeaf4 100644 --- a/mlir/lib/Pass/PassRegistry.cpp +++ b/mlir/lib/Pass/PassRegistry.cpp @@ -302,7 +302,7 @@ class TextualPipeline { std::vector 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 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 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 425aeae35e059c..8b1b020746c067 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 e0c29443104f56..806ce67e529a6e 100644 --- a/mlir/lib/Reducer/OptReductionPass.cpp +++ b/mlir/lib/Reducer/OptReductionPass.cpp @@ -31,7 +31,7 @@ class OptReductionPass : public OptReductionBase { 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 4ff31b4be55b23..859f64a01e287b 100644 --- a/mlir/lib/Reducer/ReductionTreePass.cpp +++ b/mlir/lib/Reducer/ReductionTreePass.cpp @@ -199,7 +199,7 @@ class ReductionTreePass : public ReductionTreeBase { 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 bd1cd7b4acc7e5..bd98ce0c1e092a 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 valueRangeIndex; }; -} // end anonymous namespace +} // namespace void Generator::generate(ModuleOp module) { FuncOp matcherFunc = module.lookupSymbol( @@ -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 a26c3b295de96d..e423ff2a02352c 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 30864b2fc3d23d..930d5d393f774f 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 clOptions; diff --git a/mlir/lib/Support/StorageUniquer.cpp b/mlir/lib/Support/StorageUniquer.cpp index 06978ce222217f..9291199fdce150 100644 --- a/mlir/lib/Support/StorageUniquer.cpp +++ b/mlir/lib/Support/StorageUniquer.cpp @@ -257,7 +257,7 @@ class ParametricStorageUniquer { function_ref 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 11afe1e7174228..63e07324c0b130 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 options; diff --git a/mlir/lib/TableGen/Class.cpp b/mlir/lib/TableGen/Class.cpp index 0c38fa5b0067e9..9b7124e2e3a59c 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 dd71540c15d440..554b6627247fda 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. using Subst = std::pair; -} // 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 062b8820c5a84e..3706d06fb7c9c1 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 f923367796c515..776559c31c9d7d 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp index eb49a535150089..22ea7316d2e95f 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp index 27ce8a87a0aa55..364e63d40150f3 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp index cc8800df0095fa..8d19f466fe5ba7 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp index a45cd7a7d4309d..4b5ca8fa86b35a 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp index f6f7be139dd674..c8dd7fe5c7569e 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 d623dbb0c3cf83..96b7644116e8ee 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 348424ab3722de..a0c61b8de98c80 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(); diff --git a/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp index ec8b5c1d7e3c41..f2ddc2ab16455e 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(); diff --git a/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp b/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp index 681e2448fb3147..c987198f0c1291 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 cb62956eba0b5e..aadd72ae41a5f9 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 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 ee4f5d54d50468..64a005dfb55b1b 100644 --- a/mlir/lib/Transforms/BufferOptimizations.cpp +++ b/mlir/lib/Transforms/BufferOptimizations.cpp @@ -418,7 +418,7 @@ class PromoteBuffersToStackPass std::function isSmallAlloc; }; -} // end anonymous namespace +} // namespace std::unique_ptr mlir::createBufferHoistingPass() { return std::make_unique(); diff --git a/mlir/lib/Transforms/BufferResultsToOutParams.cpp b/mlir/lib/Transforms/BufferResultsToOutParams.cpp index 8ae443674ee9bb..2abdccc6866c85 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 mlir::createBufferResultsToOutParamsPass() { return std::make_unique(); diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp index c7b09b5f1a1806..bc265a4a233ee2 100644 --- a/mlir/lib/Transforms/CSE.cpp +++ b/mlir/lib/Transforms/CSE.cpp @@ -49,7 +49,7 @@ struct SimpleOperationInfo : public llvm::DenseMapInfo { OperationEquivalence::IgnoreLocations); } }; -} // end anonymous namespace +} // namespace namespace { /// Simple common sub-expression elimination. @@ -91,7 +91,7 @@ struct CSE : public CSEBase { std::vector 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 22cc32fa728abe..745477d396fbb7 100644 --- a/mlir/lib/Transforms/Canonicalizer.cpp +++ b/mlir/lib/Transforms/Canonicalizer.cpp @@ -52,7 +52,7 @@ struct Canonicalizer : public CanonicalizerBase { GreedyRewriteConfig config; FrozenRewritePatternSet patterns; }; -} // end anonymous namespace +} // namespace /// Create a Canonicalizer pass. std::unique_ptr mlir::createCanonicalizerPass() { diff --git a/mlir/lib/Transforms/Inliner.cpp b/mlir/lib/Transforms/Inliner.cpp index 03219c4b1ed85d..32b12e7a3bf402 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 nodes; llvm::scc_iterator &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 { /// during optimization. SmallVector, 8> opPipelines; }; -} // end anonymous namespace +} // namespace InlinerPass::InlinerPass() : InlinerPass(defaultInlinerOptPipeline) {} InlinerPass::InlinerPass(std::function defaultPipeline) diff --git a/mlir/lib/Transforms/LocationSnapshot.cpp b/mlir/lib/Transforms/LocationSnapshot.cpp index 4e77b1d08328c5..f23a3eee15113d 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 mlir::createLocationSnapshotPass(OpPrintingFlags flags, StringRef fileName, diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp index 24ef03ba730a31..1a3de13177d7e8 100644 --- a/mlir/lib/Transforms/LoopFusion.cpp +++ b/mlir/lib/Transforms/LoopFusion.cpp @@ -59,7 +59,7 @@ struct LoopFusion : public AffineLoopFusionBase { void runOnFunction() override; }; -} // end anonymous namespace +} // namespace std::unique_ptr> 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 2bef6c5a92d4c7..71a24104c71ab7 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -32,7 +32,7 @@ struct LoopInvariantCodeMotion : public LoopInvariantCodeMotionBase { 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 c3fa7fe412beaf..b890bc70e70258 100644 --- a/mlir/lib/Transforms/NormalizeMemRefs.cpp +++ b/mlir/lib/Transforms/NormalizeMemRefs.cpp @@ -41,7 +41,7 @@ struct NormalizeMemRefs : public NormalizeMemRefsBase { Operation *createOpResultsNormalized(FuncOp funcOp, Operation *oldOp); }; -} // end anonymous namespace +} // namespace std::unique_ptr> mlir::createNormalizeMemRefsPass() { return std::make_unique(); diff --git a/mlir/lib/Transforms/PassDetail.h b/mlir/lib/Transforms/PassDetail.h index 06ec234227c66f..9b846198fc08ac 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 500203b19a1859..1613ecc2f727dd 100644 --- a/mlir/lib/Transforms/PipelineDataTransfer.cpp +++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp @@ -38,7 +38,7 @@ struct PipelineDataTransfer std::vector 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 3d725d77db8ec4..7a2f9949a7463e 100644 --- a/mlir/lib/Transforms/SCCP.cpp +++ b/mlir/lib/Transforms/SCCP.cpp @@ -239,7 +239,7 @@ namespace { struct SCCP : public SCCPBase { 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 39db964969f9ee..99e11517b7e093 100644 --- a/mlir/lib/Transforms/StripDebugInfo.cpp +++ b/mlir/lib/Transforms/StripDebugInfo.cpp @@ -18,7 +18,7 @@ namespace { struct StripDebugInfo : public StripDebugInfoBase { 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 2c65d635d4c446..0319cb95d77d10 100644 --- a/mlir/lib/Transforms/SymbolDCE.cpp +++ b/mlir/lib/Transforms/SymbolDCE.cpp @@ -28,7 +28,7 @@ struct SymbolDCE : public SymbolDCEBase { bool symbolTableIsHidden, DenseSet &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 ad34eebff5b9b5..97c6a4daaf82ac 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 &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 *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 5e9f6dda5a45a6..e9ea661cb68e92 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 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 d7d8661989b21e..023b1d6ed5eaf7 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 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> 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 deb58cd5f42a5e..b549a0bb7eca1c 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 af550d432a56a8..2b4899e451bfcb 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 eff356cff30fb6..e945e5518c43c5 100644 --- a/mlir/test/lib/Analysis/TestCallGraph.cpp +++ b/mlir/test/lib/Analysis/TestCallGraph.cpp @@ -29,7 +29,7 @@ struct TestCallGraphPass getAnalysis().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 94d0e96e7ef902..287f742783bba9 100644 --- a/mlir/test/lib/Analysis/TestLiveness.cpp +++ b/mlir/test/lib/Analysis/TestLiveness.cpp @@ -30,7 +30,7 @@ struct TestLivenessPass : public PassWrapper { } }; -} // 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 bbc15c6bd4f271..dde27f3c7bd160 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 974cea29161c52..e49f986fca641e 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 3be9dc14b7520e..d3e6788711d8c4 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 39e60db50771a1..8142024b63606e 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 1eb73b0b307825..5684096bff2293 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 962df7602a29f3..dbdcfd950cbbe2 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 332f1fe635d670..df74cf71ed538e 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 bad3732c7bbefc..a0e0082db481b2 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 22df6da2564b13..542e109ebbb818 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 5205b25f881abc..8a88d15a425523 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 b2f0ef915c68ef..d9dfe7b1330afd 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 6d9c3be2a88fa3..6c3e6ff5de8b12 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 9424046f8e85c2..15ff86ceecf334 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 2507ae8f0e3ece..0aa5cfde99f382 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 20219de10748c0..05f6448943678b 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 2b7395697991ee..99770657754862 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 ef43d105d4def3..bd5e09d7debe24 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 d1aa7796437f7b..6f34215ca03079 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 f68cf63890559f..09c6c3f75de306 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 03ab46af0a7f17..5bfec82f7db979 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 8804df42c367d1..c6d61d9bba77e8 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 cb09ea45795b07..73d4243ad1088d 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 { 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 { StringRef getName() final { return ""; } }; -} // 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 cd77d62c89cb26..184158c8dc96a0 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 ed84b8cba3f68d..e2e054c1af67ba 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 { (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 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 bb78a4b175da15..a19c3b1649ba7a 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 { RewritePatternSet(&getContext())); } }; -} // end anonymous namespace +} // namespace namespace mlir { void registerTestTraitsPass() { PassRegistration(); } diff --git a/mlir/test/lib/Dialect/Test/TestTypes.h b/mlir/test/lib/Dialect/Test/TestTypes.h index 0b050034a6b438..91650afebb9b17 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 99bf14b6b59fd8..8a30446545d8b3 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 4d67e07c12a9f4..f7e13bc330d44c 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 f7371f87339301..96c162de775d35 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 bb7610789c1bdf..8bff82a22e6256 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 ccc2ffe7cae578..b49b73c8606254 100644 --- a/mlir/test/lib/IR/TestDominance.cpp +++ b/mlir/test/lib/IR/TestDominance.cpp @@ -120,7 +120,7 @@ struct TestDominancePass : public PassWrapper { } }; -} // 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 a2d0c796c66b54..556ee053738460 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 bafcdcb5d0c6f9..823c607435e067 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 98b20337632e1c..a4007cd99ab654 100644 --- a/mlir/test/lib/IR/TestMatchers.cpp +++ b/mlir/test/lib/IR/TestMatchers.cpp @@ -22,7 +22,7 @@ struct TestMatchers : public PassWrapper { return "Test C++ pattern matchers."; } }; -} // end anonymous namespace +} // namespace // This could be done better but is not worth the variadic template trouble. template diff --git a/mlir/test/lib/IR/TestOpaqueLoc.cpp b/mlir/test/lib/IR/TestOpaqueLoc.cpp index 35d31a04f9d7e1..ea268bf91af2dd 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 0ef6dfe9e84bad..dc655ab3f70607 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 cff36197439e59..6fa37b9cec7393 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(); } diff --git a/mlir/test/lib/IR/TestPrintNesting.cpp b/mlir/test/lib/IR/TestPrintNesting.cpp index 7149435245c1fb..e2841feb01fa1a 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 68b419b33db17a..d56414de744d4b 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(); } diff --git a/mlir/test/lib/IR/TestSymbolUses.cpp b/mlir/test/lib/IR/TestSymbolUses.cpp index 22ff2adad32b72..914dd25b067e37 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 c92ccc339bc8e4..c662d750fa4d1b 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 0202a5bf9d9eb5..243bd8b86981e0 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 5893020f88e087..77e8fc5b253140 100644 --- a/mlir/test/lib/Reducer/MLIRTestReducer.cpp +++ b/mlir/test/lib/Reducer/MLIRTestReducer.cpp @@ -29,7 +29,7 @@ struct TestReducer : public PassWrapper> { 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 159c623bf4eb3a..1f893e6d82304d 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 e9f78b3093027b..ef5c995f4b1ae6 100644 --- a/mlir/test/lib/Transforms/TestConstantFold.cpp +++ b/mlir/test/lib/Transforms/TestConstantFold.cpp @@ -26,7 +26,7 @@ struct TestConstantFold : public PassWrapper { 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 3a761fb46e8763..f4ccede65a24a5 100644 --- a/mlir/test/lib/Transforms/TestInlining.cpp +++ b/mlir/test/lib/Transforms/TestInlining.cpp @@ -64,7 +64,7 @@ struct Inliner : public PassWrapper { } } }; -} // 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 83b3e4fdd871ce..380d4e68a7ce67 100644 --- a/mlir/test/lib/Transforms/TestLoopFusion.cpp +++ b/mlir/test/lib/Transforms/TestLoopFusion.cpp @@ -49,7 +49,7 @@ struct TestLoopFusion : public PassWrapper { 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 ec2188beb8cc22..34c8588225f70d 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 4b6a7837250038..2ec3f651883685 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 7bbbf5a53bdce7..0e4ee23a45e557 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 8e245fcc82068b..eac8e5638badae 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 94e81f1085b5b3..22b9b36c908dc5 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 FormatParser::parse() { std::vector> elements; diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h index 6f24de5ea4f622..c371aee268b421 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 33c15fb81fbb51..de596b408de34d 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::iterator, std::function>; -} // 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 3a434765b29ec9..b5c441916a1ff1 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 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 5258bd19e302f9..b0558a0e551396 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 f845845f8cb24d..f84646c136fd5d 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 08785516b99f27..4223c2d2ee585a 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; -} // 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 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 seenRegions; llvm::DenseSet 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 ebafec0ddc68ed..88dbc99d9f78ef 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 d4b35d2b804950..166d24725ac6fc 100644 --- a/mlir/tools/mlir-tblgen/OpGenHelpers.h +++ b/mlir/tools/mlir-tblgen/OpGenHelpers.h @@ -24,7 +24,7 @@ namespace tblgen { std::vector 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 b28cfbb225060f..366a236c72c7bc 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(this))"); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // GEN: Interface definitions @@ -443,7 +443,7 @@ void InterfaceGenerator::emitInterfaceDecl(Interface interface) { os << "template \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 attrGen("attr", "attribute"); diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp index 2a98497ed7b255..03892192995aba 100644 --- a/mlir/tools/mlir-tblgen/RewriterGen.cpp +++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -50,7 +50,7 @@ struct format_provider { 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 0b58838c24da80..5d9b1af7847a42 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 5125413a6c11ce..d30815410af95f 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().getInt(), 5); } -} // end namespace +} // namespace diff --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp index 1cb4d085b23b7e..9ec6c1b15b1a44 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 f76ab456391aff..b46fda38fbc600 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 ddabec514b93af..ca89e824a7ed73 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 b1c803823c4324..a9b5547e4fb8c0 100644 --- a/mlir/unittests/IR/InterfaceAttachmentTest.cpp +++ b/mlir/unittests/IR/InterfaceAttachmentTest.cpp @@ -398,4 +398,4 @@ TEST(InterfaceAttachment, OperationDelayedContextAppend) { EXPECT_FALSE(isa(opI.getOperation())); } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/OperationSupportTest.cpp b/mlir/unittests/IR/OperationSupportTest.cpp index 6510116329b512..759c00ae152c55 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 9c2a93e9429c66..b46029f1ba06c4 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 78356fd9eaf495..292628aad5d47b 100644 --- a/mlir/unittests/IR/SubElementInterfaceTest.cpp +++ b/mlir/unittests/IR/SubElementInterfaceTest.cpp @@ -32,4 +32,4 @@ TEST(SubElementInterfaceTest, Nested) { ArrayRef({trueAttr, falseAttr, boolArrayAttr})); } -} // end namespace +} // namespace diff --git a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp index 90f8e7629fe75f..ca7006c22efb85 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 a5dcd18c824464..f6c1c1e6fe647e 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 a3f8e210dcb2d1..bd6ef0462a71e3 100644 --- a/mlir/unittests/Pass/PassManagerTest.cpp +++ b/mlir/unittests/Pass/PassManagerTest.cpp @@ -87,7 +87,7 @@ struct InvalidPass : Pass { *static_cast(this)); } }; -} // anonymous namespace +} // namespace TEST(PassManagerTest, InvalidPass) { MLIRContext context; @@ -127,4 +127,4 @@ TEST(PassManagerTest, InvalidPass) { ASSERT_DEATH(pm.addPass(std::make_unique()), ""); } -} // end namespace +} // namespace