diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md --- a/mlir/docs/PassManagement.md +++ b/mlir/docs/PassManagement.md @@ -82,7 +82,7 @@ }); } }; -} // end anonymous namespace +} // namespace /// Register this pass so that it can be built via from a textual pass pipeline. /// (Pass registration is discussed more below) diff --git a/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp --- a/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp +++ b/mlir/examples/toy/Ch3/mlir/ToyCombine.cpp @@ -21,7 +21,7 @@ namespace { /// Include the patterns defined in the Declarative Rewrite framework. #include "ToyCombine.inc" -} // end anonymous namespace +} // namespace /// This is an example of a c++ rewrite pattern for the TransposeOp. It /// optimizes the following scenario: transpose(transpose(x)) -> x diff --git a/mlir/examples/toy/Ch4/include/toy/Passes.h b/mlir/examples/toy/Ch4/include/toy/Passes.h --- a/mlir/examples/toy/Ch4/include/toy/Passes.h +++ b/mlir/examples/toy/Ch4/include/toy/Passes.h @@ -20,7 +20,7 @@ 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 --- a/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h +++ b/mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h @@ -22,7 +22,7 @@ /// 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 --- a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp +++ b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp @@ -105,7 +105,7 @@ }); } }; -} // 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 --- a/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp +++ b/mlir/examples/toy/Ch4/mlir/ToyCombine.cpp @@ -21,7 +21,7 @@ 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 --- a/mlir/examples/toy/Ch5/include/toy/Passes.h +++ b/mlir/examples/toy/Ch5/include/toy/Passes.h @@ -25,7 +25,7 @@ /// 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 --- a/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h +++ b/mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h @@ -22,7 +22,7 @@ /// 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 --- a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp @@ -266,7 +266,7 @@ } }; -} // end anonymous namespace. +} // namespace //===----------------------------------------------------------------------===// // ToyToAffineLoweringPass @@ -283,7 +283,7 @@ } 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 --- a/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp +++ b/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp @@ -105,7 +105,7 @@ }); } }; -} // 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 --- a/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp +++ b/mlir/examples/toy/Ch5/mlir/ToyCombine.cpp @@ -21,7 +21,7 @@ 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 --- a/mlir/examples/toy/Ch6/include/toy/Passes.h +++ b/mlir/examples/toy/Ch6/include/toy/Passes.h @@ -29,7 +29,7 @@ /// 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 --- a/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h +++ b/mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h @@ -22,7 +22,7 @@ /// 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 --- a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp @@ -266,7 +266,7 @@ } }; -} // end anonymous namespace. +} // namespace //===----------------------------------------------------------------------===// // ToyToAffineLoweringPass @@ -283,7 +283,7 @@ } 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 --- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp @@ -160,7 +160,7 @@ globalPtr, ArrayRef({cst0, cst0})); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ToyToLLVMLoweringPass @@ -174,7 +174,7 @@ } 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 --- a/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp +++ b/mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp @@ -105,7 +105,7 @@ }); } }; -} // 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 --- a/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp +++ b/mlir/examples/toy/Ch6/mlir/ToyCombine.cpp @@ -21,7 +21,7 @@ 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 --- a/mlir/examples/toy/Ch7/include/toy/Dialect.h +++ b/mlir/examples/toy/Ch7/include/toy/Dialect.h @@ -25,9 +25,9 @@ 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 @@ /// Returns the number of element type held by this struct. size_t getNumElementTypes() { return getElementTypes().size(); } }; -} // end namespace toy -} // end namespace mlir +} // namespace toy +} // namespace mlir #endif // MLIR_TUTORIAL_TOY_DIALECT_H_ diff --git a/mlir/examples/toy/Ch7/include/toy/Passes.h b/mlir/examples/toy/Ch7/include/toy/Passes.h --- a/mlir/examples/toy/Ch7/include/toy/Passes.h +++ b/mlir/examples/toy/Ch7/include/toy/Passes.h @@ -29,7 +29,7 @@ /// 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 --- a/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h +++ b/mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h @@ -22,7 +22,7 @@ /// 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 --- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp @@ -461,9 +461,9 @@ /// 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 --- a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp @@ -266,7 +266,7 @@ } }; -} // end anonymous namespace. +} // namespace //===----------------------------------------------------------------------===// // ToyToAffineLoweringPass @@ -283,7 +283,7 @@ } 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 --- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp @@ -160,7 +160,7 @@ globalPtr, ArrayRef({cst0, cst0})); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ToyToLLVMLoweringPass @@ -174,7 +174,7 @@ } 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 --- a/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp +++ b/mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp @@ -105,7 +105,7 @@ }); } }; -} // 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 --- a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp +++ b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp @@ -21,7 +21,7 @@ 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 --- a/mlir/include/mlir/Analysis/AffineAnalysis.h +++ b/mlir/include/mlir/Analysis/AffineAnalysis.h @@ -182,6 +182,6 @@ 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 --- a/mlir/include/mlir/Analysis/AffineStructures.h +++ b/mlir/include/mlir/Analysis/AffineStructures.h @@ -1088,6 +1088,6 @@ 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 --- a/mlir/include/mlir/Analysis/AliasAnalysis.h +++ b/mlir/include/mlir/Analysis/AliasAnalysis.h @@ -212,7 +212,7 @@ ImplT impl; }; }; -} // end namespace detail +} // namespace detail //===----------------------------------------------------------------------===// // AliasAnalysis @@ -278,6 +278,6 @@ 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 --- a/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h +++ b/mlir/include/mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h @@ -29,6 +29,6 @@ /// 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 --- a/mlir/include/mlir/Analysis/CallGraph.h +++ b/mlir/include/mlir/Analysis/CallGraph.h @@ -216,7 +216,7 @@ CallGraphNode externalNode; }; -} // end namespace mlir +} // namespace mlir namespace llvm { // Provide graph traits for traversing call graphs using standard graph @@ -253,6 +253,6 @@ 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 --- a/mlir/include/mlir/Analysis/DataFlowAnalysis.h +++ b/mlir/include/mlir/Analysis/DataFlowAnalysis.h @@ -396,6 +396,6 @@ 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 --- a/mlir/include/mlir/Analysis/Liveness.h +++ b/mlir/include/mlir/Analysis/Liveness.h @@ -142,6 +142,6 @@ 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 --- a/mlir/include/mlir/Analysis/LoopAnalysis.h +++ b/mlir/include/mlir/Analysis/LoopAnalysis.h @@ -113,6 +113,6 @@ /// 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 --- a/mlir/include/mlir/Analysis/NestedMatcher.h +++ b/mlir/include/mlir/Analysis/NestedMatcher.h @@ -195,7 +195,7 @@ 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 --- a/mlir/include/mlir/Analysis/NumberOfExecutions.h +++ b/mlir/include/mlir/Analysis/NumberOfExecutions.h @@ -102,6 +102,6 @@ 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 --- a/mlir/include/mlir/Analysis/SliceAnalysis.h +++ b/mlir/include/mlir/Analysis/SliceAnalysis.h @@ -205,6 +205,6 @@ /// 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 --- a/mlir/include/mlir/Analysis/Utils.h +++ b/mlir/include/mlir/Analysis/Utils.h @@ -380,6 +380,6 @@ 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 --- a/mlir/include/mlir/CAPI/Utils.h +++ b/mlir/include/mlir/CAPI/Utils.h @@ -45,7 +45,7 @@ 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 --- a/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h +++ b/mlir/include/mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h @@ -22,7 +22,7 @@ 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 --- a/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h +++ b/mlir/include/mlir/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.h @@ -22,7 +22,7 @@ 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 --- a/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h +++ b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h @@ -22,7 +22,7 @@ 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 --- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h +++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h @@ -455,6 +455,6 @@ 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 --- a/mlir/include/mlir/Dialect/Affine/Passes.h +++ b/mlir/include/mlir/Dialect/Affine/Passes.h @@ -91,6 +91,6 @@ #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 --- a/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h +++ b/mlir/include/mlir/Dialect/Arithmetic/IR/Arithmetic.h @@ -89,8 +89,8 @@ static bool classof(Operation *op); }; -} // end namespace arith -} // end namespace mlir +} // namespace arith +} // namespace mlir //===----------------------------------------------------------------------===// // Utility Functions @@ -109,7 +109,7 @@ 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 --- 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 @@ #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 --- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h +++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h @@ -52,7 +52,7 @@ 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 --- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h +++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h @@ -26,7 +26,7 @@ #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 --- a/mlir/include/mlir/Dialect/GPU/GPUDialect.h +++ b/mlir/include/mlir/Dialect/GPU/GPUDialect.h @@ -164,8 +164,8 @@ // 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 --- a/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h +++ b/mlir/include/mlir/Dialect/GPU/MemoryPromotion.h @@ -24,6 +24,6 @@ /// 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 --- a/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h +++ b/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h @@ -59,7 +59,7 @@ /// - 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 @@ /// 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 --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h @@ -50,8 +50,8 @@ namespace sys { template class SmartMutex; -} // end namespace sys -} // end namespace llvm +} // namespace sys +} // namespace llvm namespace mlir { namespace LLVM { @@ -131,7 +131,7 @@ 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 --- a/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h +++ b/mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h @@ -24,6 +24,6 @@ /// 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 --- a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h @@ -36,7 +36,7 @@ /// 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 --- a/mlir/include/mlir/Dialect/SCF/SCF.h +++ b/mlir/include/mlir/Dialect/SCF/SCF.h @@ -96,6 +96,6 @@ 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 --- a/mlir/include/mlir/Dialect/SCF/Utils.h +++ b/mlir/include/mlir/Dialect/SCF/Utils.h @@ -29,7 +29,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h +++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h @@ -20,8 +20,8 @@ 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 --- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h +++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h @@ -52,7 +52,7 @@ /// 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 --- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h +++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h @@ -456,7 +456,7 @@ Optional 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 --- a/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h +++ b/mlir/include/mlir/Dialect/Shape/Transforms/Passes.h @@ -69,6 +69,6 @@ #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 --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h @@ -67,6 +67,6 @@ 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 --- a/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h +++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h @@ -86,6 +86,6 @@ 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 --- a/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h +++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h @@ -69,6 +69,6 @@ /// `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 --- 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 @@ #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 --- a/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h +++ b/mlir/include/mlir/Dialect/StandardOps/Utils/Utils.h @@ -103,6 +103,6 @@ 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 --- 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 @@ #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 --- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h +++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h @@ -31,8 +31,8 @@ #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 --- a/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h +++ b/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h @@ -19,6 +19,6 @@ #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 --- a/mlir/include/mlir/Dialect/Traits.h +++ b/mlir/include/mlir/Dialect/Traits.h @@ -93,7 +93,7 @@ } }; -} // 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 --- a/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h +++ b/mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h @@ -189,6 +189,6 @@ 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 --- a/mlir/include/mlir/Dialect/Vector/VectorOps.h +++ b/mlir/include/mlir/Dialect/Vector/VectorOps.h @@ -144,8 +144,8 @@ 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 --- a/mlir/include/mlir/Dialect/Vector/VectorUtils.h +++ b/mlir/include/mlir/Dialect/Vector/VectorUtils.h @@ -202,7 +202,7 @@ /// 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 --- a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h +++ b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h @@ -81,8 +81,8 @@ 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 --- a/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h +++ b/mlir/include/mlir/ExecutionEngine/ExecutionEngine.h @@ -197,6 +197,6 @@ 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 --- a/mlir/include/mlir/ExecutionEngine/OptUtils.h +++ b/mlir/include/mlir/ExecutionEngine/OptUtils.h @@ -52,6 +52,6 @@ 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 --- a/mlir/include/mlir/IR/AffineExprVisitor.h +++ b/mlir/include/mlir/IR/AffineExprVisitor.h @@ -340,6 +340,6 @@ 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 --- a/mlir/include/mlir/IR/AffineMap.h +++ b/mlir/include/mlir/IR/AffineMap.h @@ -24,7 +24,7 @@ namespace detail { struct AffineMapStorage; -} // end namespace detail +} // namespace detail class Attribute; struct LogicalResult; @@ -567,7 +567,7 @@ 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 --- a/mlir/include/mlir/IR/AsmState.h +++ b/mlir/include/mlir/IR/AsmState.h @@ -23,7 +23,7 @@ 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 @@ /// 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 --- a/mlir/include/mlir/IR/AttributeSupport.h +++ b/mlir/include/mlir/IR/AttributeSupport.h @@ -109,7 +109,7 @@ 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 @@ }; } // namespace detail -} // end namespace mlir +} // namespace mlir #endif diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h --- a/mlir/include/mlir/IR/Attributes.h +++ b/mlir/include/mlir/IR/Attributes.h @@ -227,7 +227,7 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/IR/BlockAndValueMapping.h +++ b/mlir/include/mlir/IR/BlockAndValueMapping.h @@ -94,6 +94,6 @@ 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 --- a/mlir/include/mlir/IR/BlockSupport.h +++ b/mlir/include/mlir/IR/BlockSupport.h @@ -171,8 +171,8 @@ /// 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 @@ 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 @@ 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 --- a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h +++ b/mlir/include/mlir/IR/BuiltinAttributeInterfaces.h @@ -312,6 +312,6 @@ 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 --- a/mlir/include/mlir/IR/BuiltinAttributes.h +++ b/mlir/include/mlir/IR/BuiltinAttributes.h @@ -940,7 +940,7 @@ 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 --- a/mlir/include/mlir/IR/BuiltinOps.h +++ b/mlir/include/mlir/IR/BuiltinOps.h @@ -46,7 +46,7 @@ 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 @@ } 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 --- a/mlir/include/mlir/IR/BuiltinTypes.h +++ b/mlir/include/mlir/IR/BuiltinTypes.h @@ -183,7 +183,7 @@ unsigned getMemorySpaceAsInt() const; }; -} // end namespace mlir +} // namespace mlir //===----------------------------------------------------------------------===// // Tablegen Type Declarations @@ -531,6 +531,6 @@ /// 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 --- a/mlir/include/mlir/IR/Diagnostics.h +++ b/mlir/include/mlir/IR/Diagnostics.h @@ -20,7 +20,7 @@ class MemoryBuffer; class SMLoc; class SourceMgr; -} // end namespace llvm +} // namespace llvm namespace mlir { class DiagnosticEngine; @@ -34,7 +34,7 @@ namespace detail { struct DiagnosticEngineImpl; -} // end namespace detail +} // namespace detail /// Defines the different supported severity of a diagnostic. enum class DiagnosticSeverity { @@ -516,7 +516,7 @@ 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 @@ 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 @@ 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 --- a/mlir/include/mlir/IR/Dialect.h +++ b/mlir/include/mlir/IR/Dialect.h @@ -50,7 +50,7 @@ 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 --- a/mlir/include/mlir/IR/DialectImplementation.h +++ b/mlir/include/mlir/IR/DialectImplementation.h @@ -127,6 +127,6 @@ } }; -} // 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 --- a/mlir/include/mlir/IR/DialectInterface.h +++ b/mlir/include/mlir/IR/DialectInterface.h @@ -35,7 +35,7 @@ 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 --- a/mlir/include/mlir/IR/Dominance.h +++ b/mlir/include/mlir/IR/Dominance.h @@ -109,7 +109,7 @@ 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 @@ } }; -} // end namespace mlir +} // namespace mlir namespace llvm { @@ -222,5 +222,5 @@ 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 --- a/mlir/include/mlir/IR/FunctionSupport.h +++ b/mlir/include/mlir/IR/FunctionSupport.h @@ -796,8 +796,8 @@ 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 --- a/mlir/include/mlir/IR/Identifier.h +++ b/mlir/include/mlir/IR/Identifier.h @@ -15,6 +15,6 @@ /// 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 --- a/mlir/include/mlir/IR/IntegerSet.h +++ b/mlir/include/mlir/IR/IntegerSet.h @@ -31,7 +31,7 @@ namespace detail { struct IntegerSetStorage; -} // end namespace detail +} // namespace detail class MLIRContext; @@ -124,7 +124,7 @@ 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 --- a/mlir/include/mlir/IR/Location.h +++ b/mlir/include/mlir/IR/Location.h @@ -97,7 +97,7 @@ 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 --- 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 @@ /// 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 --- a/mlir/include/mlir/IR/Matchers.h +++ b/mlir/include/mlir/IR/Matchers.h @@ -225,7 +225,7 @@ 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_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 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -339,7 +339,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ /// 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 @@ LogicalResult verifyCastOp(Operation *op, function_ref areCastCompatible); } // namespace impl -} // end namespace mlir +} // namespace mlir namespace llvm { @@ -1927,6 +1927,6 @@ 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 --- a/mlir/include/mlir/IR/OpImplementation.h +++ b/mlir/include/mlir/IR/OpImplementation.h @@ -1354,7 +1354,7 @@ 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 --- a/mlir/include/mlir/IR/Operation.h +++ b/mlir/include/mlir/IR/Operation.h @@ -717,7 +717,7 @@ return os; } -} // end namespace mlir +} // namespace mlir namespace llvm { /// Provide isa functionality for operation casts. @@ -743,6 +743,6 @@ 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 --- 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 @@ return findAttrUnsorted(first, last, name); } -} // end namespace impl +} // namespace impl //===----------------------------------------------------------------------===// // NamedAttrList @@ -688,7 +688,7 @@ /// A pointer to the operand storage. OpOperand *operandStorage; }; -} // end namespace detail +} // namespace detail //===----------------------------------------------------------------------===// // OpPrintingFlags @@ -1171,7 +1171,7 @@ /// Enable Bitmask enums for OperationEquivalence::Flags. LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); -} // end namespace mlir +} // namespace mlir namespace llvm { template <> @@ -1223,6 +1223,6 @@ } }; -} // end namespace llvm +} // namespace llvm #endif diff --git a/mlir/include/mlir/IR/OwningOpRef.h b/mlir/include/mlir/IR/OwningOpRef.h --- a/mlir/include/mlir/IR/OwningOpRef.h +++ b/mlir/include/mlir/IR/OwningOpRef.h @@ -62,6 +62,6 @@ 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 --- a/mlir/include/mlir/IR/PatternMatch.h +++ b/mlir/include/mlir/IR/PatternMatch.h @@ -1087,6 +1087,6 @@ 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 --- a/mlir/include/mlir/IR/Region.h +++ b/mlir/include/mlir/IR/Region.h @@ -344,6 +344,6 @@ 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 --- a/mlir/include/mlir/IR/SymbolTable.h +++ b/mlir/include/mlir/IR/SymbolTable.h @@ -368,7 +368,7 @@ } }; -} // end namespace OpTrait +} // namespace OpTrait //===----------------------------------------------------------------------===// // Visibility parsing implementation. @@ -379,9 +379,9 @@ /// 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 --- a/mlir/include/mlir/IR/Threading.h +++ b/mlir/include/mlir/IR/Threading.h @@ -148,6 +148,6 @@ 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 --- a/mlir/include/mlir/IR/TypeSupport.h +++ b/mlir/include/mlir/IR/TypeSupport.h @@ -115,7 +115,7 @@ 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 @@ }; } // namespace detail -} // end namespace mlir +} // namespace mlir #endif diff --git a/mlir/include/mlir/IR/TypeUtilities.h b/mlir/include/mlir/IR/TypeUtilities.h --- a/mlir/include/mlir/IR/TypeUtilities.h +++ b/mlir/include/mlir/IR/TypeUtilities.h @@ -97,6 +97,6 @@ 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 --- a/mlir/include/mlir/IR/Types.h +++ b/mlir/include/mlir/IR/Types.h @@ -252,7 +252,7 @@ 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 --- a/mlir/include/mlir/IR/Value.h +++ b/mlir/include/mlir/IR/Value.h @@ -294,7 +294,7 @@ /// 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 @@ 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 @@ } }; -} // end namespace llvm +} // namespace llvm #endif diff --git a/mlir/include/mlir/IR/Verifier.h b/mlir/include/mlir/IR/Verifier.h --- a/mlir/include/mlir/IR/Verifier.h +++ b/mlir/include/mlir/IR/Verifier.h @@ -17,6 +17,6 @@ /// 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 --- a/mlir/include/mlir/IR/Visitors.h +++ b/mlir/include/mlir/IR/Visitors.h @@ -200,7 +200,7 @@ /// 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 --- a/mlir/include/mlir/Interfaces/CallInterfaces.h +++ b/mlir/include/mlir/Interfaces/CallInterfaces.h @@ -23,7 +23,7 @@ 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 --- a/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h +++ b/mlir/include/mlir/Interfaces/ControlFlowInterfaces.h @@ -140,7 +140,7 @@ }; } // 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 --- a/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h +++ b/mlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h @@ -32,6 +32,6 @@ } }; -} // 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 --- a/mlir/include/mlir/Interfaces/FoldInterfaces.h +++ b/mlir/include/mlir/Interfaces/FoldInterfaces.h @@ -44,6 +44,6 @@ 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 --- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.h +++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.h @@ -257,7 +257,7 @@ /// `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 --- a/mlir/include/mlir/Parser.h +++ b/mlir/include/mlir/Parser.h @@ -21,7 +21,7 @@ class SourceMgr; class SMDiagnostic; class StringRef; -} // end namespace llvm +} // namespace llvm namespace mlir { class AsmParserState; @@ -71,7 +71,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Parser/AsmParserState.h +++ b/mlir/include/mlir/Parser/AsmParserState.h @@ -177,6 +177,6 @@ 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 --- a/mlir/include/mlir/Pass/AnalysisManager.h +++ b/mlir/include/mlir/Pass/AnalysisManager.h @@ -94,7 +94,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Pass/Pass.h +++ b/mlir/include/mlir/Pass/Pass.h @@ -422,6 +422,6 @@ } }; -} // 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 --- a/mlir/include/mlir/Pass/PassInstrumentation.h +++ b/mlir/include/mlir/Pass/PassInstrumentation.h @@ -19,7 +19,7 @@ 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 @@ std::unique_ptr impl; }; -} // end namespace mlir +} // namespace mlir namespace llvm { template <> struct DenseMapInfo { @@ -143,6 +143,6 @@ 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 --- 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 @@ class OpToOpPassAdaptor; class PassCrashReproducerGenerator; struct PassExecutionState; -} // end namespace detail +} // namespace detail //===----------------------------------------------------------------------===// // OpPassManager @@ -421,6 +421,6 @@ /// 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 --- a/mlir/include/mlir/Pass/PassOptions.h +++ b/mlir/include/mlir/Pass/PassOptions.h @@ -242,7 +242,7 @@ /// A list of all of the opaque options. std::vector options; }; -} // end namespace detail +} // namespace detail //===----------------------------------------------------------------------===// // PassPipelineOptions @@ -276,7 +276,7 @@ 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 --- a/mlir/include/mlir/Pass/PassRegistry.h +++ b/mlir/include/mlir/Pass/PassRegistry.h @@ -24,7 +24,7 @@ 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 @@ 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 @@ 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 --- a/mlir/include/mlir/Reducer/PassDetail.h +++ b/mlir/include/mlir/Reducer/PassDetail.h @@ -16,6 +16,6 @@ #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 --- a/mlir/include/mlir/Reducer/Passes.h +++ b/mlir/include/mlir/Reducer/Passes.h @@ -20,6 +20,6 @@ #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 --- a/mlir/include/mlir/Reducer/ReductionNode.h +++ b/mlir/include/mlir/Reducer/ReductionNode.h @@ -192,6 +192,6 @@ 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 --- a/mlir/include/mlir/Reducer/ReductionPatternInterface.h +++ b/mlir/include/mlir/Reducer/ReductionPatternInterface.h @@ -51,6 +51,6 @@ 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 --- a/mlir/include/mlir/Reducer/Tester.h +++ b/mlir/include/mlir/Reducer/Tester.h @@ -53,6 +53,6 @@ ArrayRef testScriptArgs; }; -} // end namespace mlir +} // namespace mlir #endif diff --git a/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h b/mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h --- 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 @@ 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 --- a/mlir/include/mlir/Rewrite/PatternApplicator.h +++ b/mlir/include/mlir/Rewrite/PatternApplicator.h @@ -21,7 +21,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Support/DebugAction.h +++ b/mlir/include/mlir/Support/DebugAction.h @@ -223,6 +223,6 @@ 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 --- a/mlir/include/mlir/Support/InterfaceSupport.h +++ b/mlir/include/mlir/Support/InterfaceSupport.h @@ -270,7 +270,7 @@ 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 --- a/mlir/include/mlir/Support/LLVM.h +++ b/mlir/include/mlir/Support/LLVM.h @@ -70,7 +70,7 @@ 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 --- a/mlir/include/mlir/Support/MathExtras.h +++ b/mlir/include/mlir/Support/MathExtras.h @@ -53,6 +53,6 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/Support/StorageUniquer.h +++ b/mlir/include/mlir/Support/StorageUniquer.h @@ -326,6 +326,6 @@ 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 --- a/mlir/include/mlir/Support/ThreadLocalCache.h +++ b/mlir/include/mlir/Support/ThreadLocalCache.h @@ -112,6 +112,6 @@ /// 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 --- a/mlir/include/mlir/Support/TypeID.h +++ b/mlir/include/mlir/Support/TypeID.h @@ -138,7 +138,7 @@ 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 @@ 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 --- 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 @@ // 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 --- a/mlir/include/mlir/TableGen/AttrOrTypeDef.h +++ b/mlir/include/mlir/TableGen/AttrOrTypeDef.h @@ -260,7 +260,7 @@ 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 --- 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 @@ // 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 --- a/mlir/include/mlir/TableGen/Builder.h +++ b/mlir/include/mlir/TableGen/Builder.h @@ -23,7 +23,7 @@ class Init; class Record; class SMLoc; -} // end namespace llvm +} // namespace llvm namespace mlir { namespace tblgen { @@ -79,7 +79,7 @@ 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 --- a/mlir/include/mlir/TableGen/Class.h +++ b/mlir/include/mlir/TableGen/Class.h @@ -424,8 +424,8 @@ 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 --- a/mlir/include/mlir/TableGen/CodeGenHelpers.h +++ b/mlir/include/mlir/TableGen/CodeGenHelpers.h @@ -64,7 +64,7 @@ ~NamespaceEmitter() { for (StringRef ns : llvm::reverse(namespaces)) - os << "} // end namespace " << ns << "\n"; + os << "} // namespace " << ns << "\n"; } private: @@ -243,7 +243,7 @@ : 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 --- 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 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/TableGen/Format.h +++ b/mlir/include/mlir/TableGen/Format.h @@ -271,7 +271,7 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/TableGen/GenNameParser.h +++ b/mlir/include/mlir/TableGen/GenNameParser.h @@ -26,6 +26,6 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/TableGen/Operator.h +++ b/mlir/include/mlir/TableGen/Operator.h @@ -32,7 +32,7 @@ class DefInit; class Record; class StringInit; -} // end namespace llvm +} // namespace llvm namespace mlir { namespace tblgen { @@ -370,7 +370,7 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/TableGen/Pattern.h +++ b/mlir/include/mlir/TableGen/Pattern.h @@ -28,7 +28,7 @@ class DagInit; class Init; class Record; -} // end namespace llvm +} // namespace llvm namespace mlir { namespace tblgen { @@ -508,8 +508,8 @@ RecordOperatorMap *recordOpMap; }; -} // end namespace tblgen -} // end namespace mlir +} // namespace tblgen +} // namespace mlir namespace llvm { template <> @@ -547,6 +547,6 @@ 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 --- a/mlir/include/mlir/TableGen/Predicate.h +++ b/mlir/include/mlir/TableGen/Predicate.h @@ -24,7 +24,7 @@ class ListInit; class Record; class SMLoc; -} // end namespace llvm +} // namespace llvm namespace mlir { namespace tblgen { @@ -122,7 +122,7 @@ 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 --- a/mlir/include/mlir/TableGen/Region.h +++ b/mlir/include/mlir/TableGen/Region.h @@ -36,7 +36,7 @@ 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 --- a/mlir/include/mlir/TableGen/SideEffects.h +++ b/mlir/include/mlir/TableGen/SideEffects.h @@ -52,7 +52,7 @@ 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 --- a/mlir/include/mlir/TableGen/Successor.h +++ b/mlir/include/mlir/TableGen/Successor.h @@ -38,7 +38,7 @@ 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 --- 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 @@ 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 --- 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 @@ 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 --- a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h +++ b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h @@ -39,7 +39,7 @@ 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 --- a/mlir/include/mlir/Target/SPIRV/Deserialization.h +++ b/mlir/include/mlir/Target/SPIRV/Deserialization.h @@ -29,7 +29,7 @@ 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 --- a/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h +++ b/mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h @@ -41,7 +41,7 @@ /// 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 --- a/mlir/include/mlir/Target/SPIRV/Serialization.h +++ b/mlir/include/mlir/Target/SPIRV/Serialization.h @@ -28,7 +28,7 @@ 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 --- a/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h +++ b/mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h @@ -23,6 +23,6 @@ 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 --- a/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h +++ b/mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h @@ -17,6 +17,6 @@ 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 --- a/mlir/include/mlir/Transforms/BufferUtils.h +++ b/mlir/include/mlir/Transforms/BufferUtils.h @@ -137,6 +137,6 @@ // 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 --- a/mlir/include/mlir/Transforms/DialectConversion.h +++ b/mlir/include/mlir/Transforms/DialectConversion.h @@ -518,7 +518,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Transforms/FoldUtils.h +++ b/mlir/include/mlir/Transforms/FoldUtils.h @@ -138,6 +138,6 @@ 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 --- a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h +++ b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h @@ -94,6 +94,6 @@ 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 --- a/mlir/include/mlir/Transforms/InliningUtils.h +++ b/mlir/include/mlir/Transforms/InliningUtils.h @@ -244,6 +244,6 @@ 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 --- a/mlir/include/mlir/Transforms/LocationSnapshot.h +++ b/mlir/include/mlir/Transforms/LocationSnapshot.h @@ -61,6 +61,6 @@ /// 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 --- a/mlir/include/mlir/Transforms/LoopFusionUtils.h +++ b/mlir/include/mlir/Transforms/LoopFusionUtils.h @@ -165,6 +165,6 @@ 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 --- a/mlir/include/mlir/Transforms/LoopUtils.h +++ b/mlir/include/mlir/Transforms/LoopUtils.h @@ -32,7 +32,7 @@ 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 @@ /// 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 --- a/mlir/include/mlir/Transforms/Passes.h +++ b/mlir/include/mlir/Transforms/Passes.h @@ -137,6 +137,6 @@ #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 --- a/mlir/include/mlir/Transforms/Utils.h +++ b/mlir/include/mlir/Transforms/Utils.h @@ -30,7 +30,7 @@ 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 @@ 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 --- a/mlir/include/mlir/Transforms/ViewOpGraph.h +++ b/mlir/include/mlir/Transforms/ViewOpGraph.h @@ -23,6 +23,6 @@ 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 --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -66,7 +66,7 @@ } }; -} // 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 --- a/mlir/lib/Analysis/DataFlowAnalysis.cpp +++ b/mlir/lib/Analysis/DataFlowAnalysis.cpp @@ -211,7 +211,7 @@ /// 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 --- a/mlir/lib/Analysis/NestedMatcher.cpp +++ b/mlir/lib/Analysis/NestedMatcher.cpp @@ -171,5 +171,5 @@ 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 --- a/mlir/lib/Analysis/Presburger/Simplex.cpp +++ b/mlir/lib/Analysis/Presburger/Simplex.cpp @@ -141,7 +141,7 @@ 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 --- a/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp +++ b/mlir/lib/Bindings/Python/ExecutionEngineModule.cpp @@ -62,7 +62,7 @@ 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 --- a/mlir/lib/Bindings/Python/IRAffine.cpp +++ b/mlir/lib/Bindings/Python/IRAffine.cpp @@ -397,7 +397,7 @@ 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 --- a/mlir/lib/Bindings/Python/IRCore.cpp +++ b/mlir/lib/Bindings/Python/IRCore.cpp @@ -2012,7 +2012,7 @@ 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 --- a/mlir/lib/Bindings/Python/Pass.cpp +++ b/mlir/lib/Bindings/Python/Pass.cpp @@ -48,7 +48,7 @@ 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 --- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp +++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp @@ -722,7 +722,7 @@ } }; -} // 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 --- a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp +++ b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp @@ -108,7 +108,7 @@ ConversionPatternRewriter &rewriter) const override; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ConstantOpLowering @@ -252,7 +252,7 @@ signalPassFailure(); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Pattern Population diff --git a/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp b/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp --- a/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp +++ b/mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp @@ -190,7 +190,7 @@ ConversionPatternRewriter &rewriter) const override; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Conversion Helpers @@ -845,7 +845,7 @@ 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 --- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp +++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp @@ -173,7 +173,7 @@ } }; -} // 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 --- a/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp +++ b/mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp @@ -356,7 +356,7 @@ } }; -} // anonymous namespace +} // namespace namespace mlir { diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp --- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp +++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp @@ -87,7 +87,7 @@ } }; -} // 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 --- a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp +++ b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp @@ -74,7 +74,7 @@ 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 --- a/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp +++ b/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp @@ -166,7 +166,7 @@ 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 --- a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp +++ b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp @@ -135,7 +135,7 @@ /// 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 --- a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h +++ b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h @@ -71,7 +71,7 @@ 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/RootOrdering.h b/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h --- a/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h +++ b/mlir/lib/Conversion/PDLToPDLInterp/RootOrdering.h @@ -131,7 +131,7 @@ 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 --- a/mlir/lib/Conversion/PassDetail.h +++ b/mlir/lib/Conversion/PassDetail.h @@ -21,76 +21,76 @@ 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 --- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp +++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp @@ -451,7 +451,7 @@ } }; -} // 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 --- a/mlir/lib/Conversion/SPIRVCommon/Pattern.h +++ b/mlir/lib/Conversion/SPIRVCommon/Pattern.h @@ -39,7 +39,7 @@ } }; -} // 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 --- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp +++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp @@ -1052,7 +1052,7 @@ 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 --- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp +++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp @@ -145,7 +145,7 @@ 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 --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -204,7 +204,7 @@ /// Affine regions should be analyzed recursively. bool shouldAnalyzeRecursively(Operation *op) const final { return true; } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // AffineDialect @@ -944,7 +944,7 @@ ArrayRef mapOperands) const { rewriter.replaceOpWithNewOp(op, map, mapOperands); } -} // end anonymous namespace. +} // namespace void AffineApplyOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -1651,7 +1651,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace void AffineForOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -2033,7 +2033,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp @@ -72,7 +72,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp @@ -47,7 +47,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp @@ -75,7 +75,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp @@ -49,7 +49,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp @@ -59,7 +59,7 @@ /// 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 --- a/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp @@ -61,7 +61,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Affine/Transforms/PassDetail.h @@ -18,19 +18,19 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp @@ -69,7 +69,7 @@ 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 --- a/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp @@ -611,7 +611,7 @@ void runOnFunction() override; }; -} // end anonymous namespace +} // namespace Vectorize::Vectorize(ArrayRef virtualVectorSize) { vectorSizes = virtualVectorSize; @@ -764,7 +764,7 @@ 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 --- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp +++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticDialect.cpp @@ -27,7 +27,7 @@ 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 --- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp +++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp @@ -73,7 +73,7 @@ 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 --- a/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp +++ b/mlir/lib/Dialect/Arithmetic/Transforms/Bufferize.cpp @@ -55,7 +55,7 @@ } }; -} // 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 --- a/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp +++ b/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp @@ -223,7 +223,7 @@ } }; -} // 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 --- a/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h @@ -17,15 +17,15 @@ 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 --- a/mlir/lib/Dialect/Async/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Async/Transforms/PassDetail.h @@ -16,7 +16,7 @@ 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 --- a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp +++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp @@ -28,7 +28,7 @@ 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 --- a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp +++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp @@ -100,7 +100,7 @@ } }; -} // 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 --- a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp @@ -665,7 +665,7 @@ } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // BufferDeallocationPass construction diff --git a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h --- a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h @@ -17,15 +17,15 @@ 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 --- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp +++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp @@ -1177,7 +1177,7 @@ } }; -} // 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 --- a/mlir/lib/Dialect/GPU/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/GPU/Transforms/PassDetail.h @@ -17,6 +17,6 @@ #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 --- a/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp +++ b/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp @@ -104,7 +104,7 @@ 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 --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp @@ -1502,7 +1502,7 @@ 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 --- a/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h +++ b/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h @@ -426,8 +426,8 @@ 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 --- a/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp +++ b/mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp @@ -63,7 +63,7 @@ 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 --- a/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/LLVMIR/Transforms/PassDetail.h @@ -16,6 +16,6 @@ #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 --- a/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp @@ -53,7 +53,7 @@ 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 --- a/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp @@ -339,7 +339,7 @@ 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 --- a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp @@ -56,7 +56,7 @@ 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 --- a/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Linalg/Transforms/PassDetail.h @@ -20,31 +20,31 @@ 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 --- a/mlir/lib/Dialect/Math/IR/MathDialect.cpp +++ b/mlir/lib/Dialect/Math/IR/MathDialect.cpp @@ -26,7 +26,7 @@ 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 --- a/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp +++ b/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp @@ -30,7 +30,7 @@ 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 --- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp +++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp @@ -191,7 +191,7 @@ return success(); } }; -} // end anonymous namespace. +} // namespace void AllocOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -676,7 +676,7 @@ } }; -} // end anonymous namespace. +} // namespace void DimOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -1473,8 +1473,8 @@ 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 @@ } }; -} // 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 --- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp +++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp @@ -40,7 +40,7 @@ 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 --- a/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp +++ b/mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp @@ -32,7 +32,7 @@ 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 --- a/mlir/lib/Dialect/Quant/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Quant/Transforms/PassDetail.h @@ -16,6 +16,6 @@ #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 --- a/mlir/lib/Dialect/SCF/SCF.cpp +++ b/mlir/lib/Dialect/SCF/SCF.cpp @@ -54,7 +54,7 @@ } } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // SCFDialect diff --git a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp --- a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp +++ b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp @@ -36,7 +36,7 @@ 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 --- a/mlir/lib/Dialect/SCF/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/SCF/Transforms/PassDetail.h @@ -20,23 +20,23 @@ 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 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp @@ -108,7 +108,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace void spirv::AccessChainOp::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -414,7 +414,7 @@ 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 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp @@ -18,7 +18,7 @@ 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 --- a/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h @@ -15,11 +15,11 @@ 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 --- a/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp +++ b/mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp @@ -38,7 +38,7 @@ 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 --- a/mlir/lib/Dialect/Shape/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Shape/Transforms/PassDetail.h @@ -15,15 +15,15 @@ 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 --- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp +++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp @@ -134,7 +134,7 @@ } }; -} // 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 --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -94,7 +94,7 @@ valuesToRepl[it.index()].replaceAllUsesWith(it.value()); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // StandardOpsDialect @@ -749,7 +749,7 @@ 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 --- a/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp +++ b/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp @@ -35,7 +35,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace void mlir::populateCallOpTypeConversionPattern(RewritePatternSet &patterns, TypeConverter &converter) { @@ -85,7 +85,7 @@ private: function_ref shouldConvertBranchOperand; }; -} // end anonymous namespace +} // namespace namespace { /// Only needed to support partial conversion of functions where this pattern @@ -105,7 +105,7 @@ 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 --- a/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h @@ -18,15 +18,15 @@ 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 --- a/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp +++ b/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp @@ -30,7 +30,7 @@ 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 --- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp +++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp @@ -313,7 +313,7 @@ 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 --- a/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h +++ b/mlir/lib/Dialect/Tensor/Transforms/PassDetail.h @@ -15,19 +15,19 @@ 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 --- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp +++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp @@ -60,7 +60,7 @@ 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 --- a/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp +++ b/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp @@ -383,7 +383,7 @@ (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 --- a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp +++ b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp @@ -320,7 +320,7 @@ }); } }; -} // 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 --- a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp +++ b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp @@ -227,7 +227,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace namespace { /// Pass that enables broadcast by making all input arrays have the same @@ -262,7 +262,7 @@ (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 --- a/mlir/lib/Dialect/Vector/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/VectorOps.cpp @@ -2302,7 +2302,7 @@ } }; -} // end anonymous namespace +} // namespace void ExtractStridedSliceOp::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -3910,7 +3910,7 @@ } }; -} // end anonymous namespace +} // namespace void vector::TransposeOp::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -4005,7 +4005,7 @@ } }; -} // 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 --- a/mlir/lib/ExecutionEngine/JitRunner.cpp +++ b/mlir/lib/ExecutionEngine/JitRunner.cpp @@ -108,7 +108,7 @@ 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 --- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp +++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp @@ -681,7 +681,7 @@ return tensor; } -} // anonymous namespace +} // namespace extern "C" { diff --git a/mlir/lib/IR/AffineExprDetail.h b/mlir/lib/IR/AffineExprDetail.h --- a/mlir/lib/IR/AffineExprDetail.h +++ b/mlir/lib/IR/AffineExprDetail.h @@ -92,6 +92,6 @@ 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 --- a/mlir/lib/IR/AffineMap.cpp +++ b/mlir/lib/IR/AffineMap.cpp @@ -89,7 +89,7 @@ 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 --- a/mlir/lib/IR/AffineMapDetail.h +++ b/mlir/lib/IR/AffineMapDetail.h @@ -51,7 +51,7 @@ } }; -} // 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 --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -146,7 +146,7 @@ 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 @@ ++newLine.curLine; return os << '\n'; } -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // AliasInitializer @@ -538,7 +538,7 @@ /// 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 @@ /// 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 @@ DialectInterfaceCollection &interfaces; }; -} // end anonymous namespace +} // namespace SSANameState::SSANameState( Operation *op, const OpPrintingFlags &printerFlags, @@ -1215,8 +1215,8 @@ /// 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 @@ // 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 --- a/mlir/lib/IR/BuiltinDialect.cpp +++ b/mlir/lib/IR/BuiltinDialect.cpp @@ -59,7 +59,7 @@ 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 --- a/mlir/lib/IR/Diagnostics.cpp +++ b/mlir/lib/IR/Diagnostics.cpp @@ -372,8 +372,8 @@ /// 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 @@ 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 @@ /// 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 --- a/mlir/lib/IR/Dialect.cpp +++ b/mlir/lib/IR/Dialect.cpp @@ -178,7 +178,7 @@ } /// 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 --- a/mlir/lib/IR/IntegerSetDetail.h +++ b/mlir/lib/IR/IntegerSetDetail.h @@ -52,6 +52,6 @@ } }; -} // 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 --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -71,7 +71,7 @@ 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 @@ } llvm::sys::SmartRWMutex *mutex; }; -} // end anonymous namespace. +} // namespace //===----------------------------------------------------------------------===// // MLIRContextImpl @@ -250,7 +250,7 @@ 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 --- a/mlir/lib/IR/SymbolTable.cpp +++ b/mlir/lib/IR/SymbolTable.cpp @@ -619,7 +619,7 @@ /// 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 --- a/mlir/lib/IR/Verifier.cpp +++ b/mlir/lib/IR/Verifier.cpp @@ -62,7 +62,7 @@ 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 --- a/mlir/lib/Parser/AffineParser.cpp +++ b/mlir/lib/Parser/AffineParser.cpp @@ -99,7 +99,7 @@ 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 --- a/mlir/lib/Parser/AsmParserImpl.h +++ b/mlir/lib/Parser/AsmParserImpl.h @@ -516,6 +516,6 @@ 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 --- a/mlir/lib/Parser/AttributeParser.cpp +++ b/mlir/lib/Parser/AttributeParser.cpp @@ -485,7 +485,7 @@ /// 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 --- a/mlir/lib/Parser/Lexer.h +++ b/mlir/lib/Parser/Lexer.h @@ -68,6 +68,6 @@ void operator=(const Lexer &) = delete; }; -} // end namespace mlir +} // namespace mlir #endif // MLIR_LIB_PARSER_LEXER_H diff --git a/mlir/lib/Parser/Parser.h b/mlir/lib/Parser/Parser.h --- a/mlir/lib/Parser/Parser.h +++ b/mlir/lib/Parser/Parser.h @@ -301,7 +301,7 @@ /// 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/Parser.cpp b/mlir/lib/Parser/Parser.cpp --- a/mlir/lib/Parser/Parser.cpp +++ b/mlir/lib/Parser/Parser.cpp @@ -487,7 +487,7 @@ /// 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 @@ /// The backing operation parser. OperationParser &parser; }; -} // end anonymous namespace. +} // namespace FailureOr OperationParser::parseCustomOperationName() { std::string opName = getTokenSpelling().str(); @@ -2025,7 +2025,7 @@ /// Parse an attribute alias declaration. ParseResult parseTypeAliasDef(); }; -} // end anonymous namespace +} // namespace /// Parses an attribute alias declaration. /// diff --git a/mlir/lib/Parser/ParserState.h b/mlir/lib/Parser/ParserState.h --- a/mlir/lib/Parser/ParserState.h +++ b/mlir/lib/Parser/ParserState.h @@ -91,7 +91,7 @@ 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 --- a/mlir/lib/Parser/Token.h +++ b/mlir/lib/Parser/Token.h @@ -119,6 +119,6 @@ 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 --- a/mlir/lib/Pass/IRPrinting.cpp +++ b/mlir/lib/Pass/IRPrinting.cpp @@ -92,7 +92,7 @@ /// 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 @@ /// 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 --- a/mlir/lib/Pass/Pass.cpp +++ b/mlir/lib/Pass/Pass.cpp @@ -131,8 +131,8 @@ /// 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 @@ /// 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 --- a/mlir/lib/Pass/PassCrashRecovery.cpp +++ b/mlir/lib/Pass/PassCrashRecovery.cpp @@ -362,7 +362,7 @@ /// The generator used to create crash reproducers. PassCrashReproducerGenerator &generator; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // FileReproducerStream @@ -386,7 +386,7 @@ /// 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 --- a/mlir/lib/Pass/PassDetail.h +++ b/mlir/lib/Pass/PassDetail.h @@ -119,6 +119,6 @@ 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 --- a/mlir/lib/Pass/PassManagerOptions.cpp +++ b/mlir/lib/Pass/PassManagerOptions.cpp @@ -78,7 +78,7 @@ 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 --- a/mlir/lib/Pass/PassRegistry.cpp +++ b/mlir/lib/Pass/PassRegistry.cpp @@ -302,7 +302,7 @@ 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 @@ /// pipeline. TextualPipeline pipeline; }; -} // end anonymous namespace +} // namespace namespace llvm { namespace cl { @@ -539,8 +539,8 @@ PassArgData value; }; -} // end namespace cl -} // end namespace llvm +} // namespace cl +} // namespace llvm namespace { @@ -687,8 +687,8 @@ /// 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 --- a/mlir/lib/Pass/PassStatistics.cpp +++ b/mlir/lib/Pass/PassStatistics.cpp @@ -23,7 +23,7 @@ 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 --- a/mlir/lib/Reducer/OptReductionPass.cpp +++ b/mlir/lib/Reducer/OptReductionPass.cpp @@ -31,7 +31,7 @@ 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 --- a/mlir/lib/Reducer/ReductionTreePass.cpp +++ b/mlir/lib/Reducer/ReductionTreePass.cpp @@ -199,7 +199,7 @@ FrozenRewritePatternSet reducerPatterns; }; -} // end anonymous namespace +} // namespace LogicalResult ReductionTreePass::initialize(MLIRContext *context) { RewritePatternSet patterns(context); diff --git a/mlir/lib/Rewrite/ByteCode.h b/mlir/lib/Rewrite/ByteCode.h --- 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 @@ ByteCodeField maxLoopLevel = 0; }; -} // end namespace detail -} // end namespace mlir +} // namespace detail +} // namespace mlir #endif // MLIR_REWRITE_BYTECODE_H_ diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -160,7 +160,7 @@ /// Compare a range of types with a set of constants. SwitchTypes, }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ByteCode Generation @@ -479,7 +479,7 @@ /// 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 @@ return allocatedValueRanges; } }; -} // end anonymous namespace +} // namespace void ByteCodeExecutor::executeApplyConstraint(PatternRewriter &rewriter) { LLVM_DEBUG(llvm::dbgs() << "Executing ApplyConstraint:\n"); diff --git a/mlir/lib/Support/DebugCounter.cpp b/mlir/lib/Support/DebugCounter.cpp --- a/mlir/lib/Support/DebugCounter.cpp +++ b/mlir/lib/Support/DebugCounter.cpp @@ -34,7 +34,7 @@ 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 --- a/mlir/lib/Support/StorageUniquer.cpp +++ b/mlir/lib/Support/StorageUniquer.cpp @@ -257,7 +257,7 @@ function_ref destructorFn; #endif }; -} // end anonymous namespace +} // namespace namespace mlir { namespace detail { @@ -328,7 +328,7 @@ /// 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 --- a/mlir/lib/Support/Timing.cpp +++ b/mlir/lib/Support/Timing.cpp @@ -549,7 +549,7 @@ 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 --- a/mlir/lib/TableGen/Class.cpp +++ b/mlir/lib/TableGen/Class.cpp @@ -207,8 +207,8 @@ } 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 --- a/mlir/lib/TableGen/Predicate.cpp +++ b/mlir/lib/TableGen/Predicate.cpp @@ -110,7 +110,7 @@ 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 @@ 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 --- a/mlir/lib/Target/LLVMIR/DebugTranslation.h +++ b/mlir/lib/Target/LLVMIR/DebugTranslation.h @@ -67,8 +67,8 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp @@ -40,7 +40,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp @@ -41,7 +41,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp @@ -40,7 +40,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp @@ -471,7 +471,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp @@ -108,7 +108,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp @@ -492,7 +492,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp @@ -900,7 +900,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp @@ -80,7 +80,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp @@ -41,7 +41,7 @@ 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 --- a/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp +++ b/mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp @@ -150,9 +150,9 @@ 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 --- a/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp +++ b/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp @@ -170,9 +170,9 @@ /// 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 --- a/mlir/lib/Transforms/BufferOptimizations.cpp +++ b/mlir/lib/Transforms/BufferOptimizations.cpp @@ -418,7 +418,7 @@ 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 --- a/mlir/lib/Transforms/BufferResultsToOutParams.cpp +++ b/mlir/lib/Transforms/BufferResultsToOutParams.cpp @@ -136,7 +136,7 @@ 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 --- a/mlir/lib/Transforms/CSE.cpp +++ b/mlir/lib/Transforms/CSE.cpp @@ -49,7 +49,7 @@ OperationEquivalence::IgnoreLocations); } }; -} // end anonymous namespace +} // namespace namespace { /// Simple common sub-expression elimination. @@ -91,7 +91,7 @@ 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 --- a/mlir/lib/Transforms/Canonicalizer.cpp +++ b/mlir/lib/Transforms/Canonicalizer.cpp @@ -52,7 +52,7 @@ 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 --- a/mlir/lib/Transforms/Inliner.cpp +++ b/mlir/lib/Transforms/Inliner.cpp @@ -123,7 +123,7 @@ /// 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 @@ 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 @@ 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 @@ /// 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 --- a/mlir/lib/Transforms/LocationSnapshot.cpp +++ b/mlir/lib/Transforms/LocationSnapshot.cpp @@ -140,7 +140,7 @@ /// 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 --- a/mlir/lib/Transforms/LoopFusion.cpp +++ b/mlir/lib/Transforms/LoopFusion.cpp @@ -59,7 +59,7 @@ void runOnFunction() override; }; -} // end anonymous namespace +} // namespace std::unique_ptr> mlir::createLoopFusionPass(unsigned fastMemorySpace, @@ -726,7 +726,7 @@ } } -} // 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 @@ } }; -} // end anonymous namespace +} // namespace void LoopFusion::runOnFunction() { MemRefDependenceGraph g; diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -32,7 +32,7 @@ : 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 --- a/mlir/lib/Transforms/NormalizeMemRefs.cpp +++ b/mlir/lib/Transforms/NormalizeMemRefs.cpp @@ -41,7 +41,7 @@ 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 --- a/mlir/lib/Transforms/PassDetail.h +++ b/mlir/lib/Transforms/PassDetail.h @@ -21,11 +21,11 @@ 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 @@ #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 --- a/mlir/lib/Transforms/PipelineDataTransfer.cpp +++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp @@ -38,7 +38,7 @@ 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 --- a/mlir/lib/Transforms/SCCP.cpp +++ b/mlir/lib/Transforms/SCCP.cpp @@ -239,7 +239,7 @@ 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 --- a/mlir/lib/Transforms/StripDebugInfo.cpp +++ b/mlir/lib/Transforms/StripDebugInfo.cpp @@ -18,7 +18,7 @@ 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 --- a/mlir/lib/Transforms/SymbolDCE.cpp +++ b/mlir/lib/Transforms/SymbolDCE.cpp @@ -28,7 +28,7 @@ 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 --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -147,7 +147,7 @@ /// Current value mappings. BlockAndValueMapping mapping; }; -} // end anonymous namespace +} // namespace Value ConversionValueMapping::lookupOrDefault(Value from, Type desiredType) const { @@ -408,7 +408,7 @@ /// 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 @@ /// An ordered set of unresolved materializations during conversion. SmallVectorImpl &unresolvedMaterializations; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Rewrite Application @@ -1018,8 +1018,8 @@ 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 @@ /// *not* to be legalizable to the target. DenseSet *trackedOps; }; -} // end anonymous namespace +} // namespace LogicalResult OperationConverter::convert(ConversionPatternRewriter &rewriter, Operation *op) { @@ -3086,7 +3086,7 @@ 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 --- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp +++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp @@ -101,7 +101,7 @@ llvm::ScopedPrinter logger{llvm::dbgs()}; #endif }; -} // end anonymous namespace +} // namespace GreedyPatternRewriteDriver::GreedyPatternRewriteDriver( MLIRContext *ctx, const FrozenRewritePatternSet &patterns, @@ -436,7 +436,7 @@ 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 @@ 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 --- a/mlir/lib/Transforms/Utils/RegionUtils.cpp +++ b/mlir/lib/Transforms/Utils/RegionUtils.cpp @@ -417,7 +417,7 @@ /// 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 @@ /// 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 --- a/mlir/test/APITest.h +++ b/mlir/test/APITest.h @@ -33,7 +33,7 @@ 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 --- a/mlir/test/lib/Analysis/TestAliasAnalysis.cpp +++ b/mlir/test/lib/Analysis/TestAliasAnalysis.cpp @@ -79,7 +79,7 @@ llvm::errs() << ": " << result << "\n"; } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Testing ModRefResult @@ -125,7 +125,7 @@ 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 --- a/mlir/test/lib/Analysis/TestCallGraph.cpp +++ b/mlir/test/lib/Analysis/TestCallGraph.cpp @@ -29,7 +29,7 @@ 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 --- a/mlir/test/lib/Analysis/TestLiveness.cpp +++ b/mlir/test/lib/Analysis/TestLiveness.cpp @@ -30,7 +30,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/Analysis/TestMatchReduction.cpp b/mlir/test/lib/Analysis/TestMatchReduction.cpp --- a/mlir/test/lib/Analysis/TestMatchReduction.cpp +++ b/mlir/test/lib/Analysis/TestMatchReduction.cpp @@ -75,7 +75,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp b/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp --- a/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp +++ b/mlir/test/lib/Analysis/TestMemRefBoundCheck.cpp @@ -36,7 +36,7 @@ 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 --- a/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp +++ b/mlir/test/lib/Analysis/TestMemRefDependenceCheck.cpp @@ -36,7 +36,7 @@ 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 --- a/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp +++ b/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp @@ -23,7 +23,7 @@ } 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 --- a/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp +++ b/mlir/test/lib/Analysis/TestNumberOfExecutions.cpp @@ -52,7 +52,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/Analysis/TestSlice.cpp b/mlir/test/lib/Analysis/TestSlice.cpp --- a/mlir/test/lib/Analysis/TestSlice.cpp +++ b/mlir/test/lib/Analysis/TestSlice.cpp @@ -39,7 +39,7 @@ } }; -} // 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 --- a/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp +++ b/mlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp @@ -53,7 +53,7 @@ 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 --- a/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp +++ b/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp @@ -28,7 +28,7 @@ } 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 --- a/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp +++ b/mlir/test/lib/Dialect/Affine/TestAffineLoopUnswitching.cpp @@ -38,7 +38,7 @@ 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 --- a/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp +++ b/mlir/test/lib/Dialect/Affine/TestLoopPermutation.cpp @@ -44,7 +44,7 @@ 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 --- a/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp +++ b/mlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp @@ -91,7 +91,7 @@ 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 --- a/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp +++ b/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp @@ -48,7 +48,7 @@ } } }; -} // 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 --- a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp @@ -206,7 +206,7 @@ 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 --- a/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgHoisting.cpp @@ -38,7 +38,7 @@ 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 --- a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp @@ -129,7 +129,7 @@ "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 --- a/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp +++ b/mlir/test/lib/Dialect/Math/TestAlgebraicSimplification.cpp @@ -32,7 +32,7 @@ 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 --- a/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp +++ b/mlir/test/lib/Dialect/Math/TestExpandTanh.cpp @@ -23,7 +23,7 @@ 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 --- a/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp +++ b/mlir/test/lib/Dialect/Math/TestPolynomialApproximation.cpp @@ -48,7 +48,7 @@ "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 --- a/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp +++ b/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp @@ -28,7 +28,7 @@ return "Test SPIR-V op availability"; } }; -} // end anonymous namespace +} // namespace void PrintOpAvailability::runOnFunction() { auto f = getFunction(); @@ -140,7 +140,7 @@ 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 --- a/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp +++ b/mlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp @@ -25,7 +25,7 @@ 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 --- a/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp +++ b/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp @@ -88,7 +88,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/Dialect/Test/TestDialect.h b/mlir/test/lib/Dialect/Test/TestDialect.h --- a/mlir/test/lib/Dialect/Test/TestDialect.h +++ b/mlir/test/lib/Dialect/Test/TestDialect.h @@ -50,6 +50,6 @@ 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/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp --- a/mlir/test/lib/Dialect/Test/TestDialect.cpp +++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp @@ -224,7 +224,7 @@ } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // TestDialect @@ -374,7 +374,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace void FoldToCallOp::getCanonicalizationPatterns(RewritePatternSet &results, MLIRContext *context) { @@ -855,7 +855,7 @@ return success(); } }; -} // end anonymous namespace +} // namespace void TestOpWithRegionPattern::getCanonicalizationPatterns( RewritePatternSet &results, MLIRContext *context) { @@ -972,7 +972,7 @@ 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/TestPatterns.cpp b/mlir/test/lib/Dialect/Test/TestPatterns.cpp --- a/mlir/test/lib/Dialect/Test/TestPatterns.cpp +++ b/mlir/test/lib/Dialect/Test/TestPatterns.cpp @@ -63,7 +63,7 @@ namespace { #include "TestPatterns.inc" -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Test Reduce Pattern Interface @@ -139,7 +139,7 @@ (void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns)); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ReturnType Driver. @@ -225,7 +225,7 @@ } } }; -} // end anonymous namespace +} // namespace namespace { struct TestDerivedAttributeDriver @@ -236,7 +236,7 @@ } void runOnFunction() override; }; -} // end anonymous namespace +} // namespace void TestDerivedAttributeDriver::runOnFunction() { getFunction().walk([](DerivedAttributeOpInterface dOp) { @@ -743,7 +743,7 @@ /// The mode of conversion to use. ConversionMode mode; }; -} // end anonymous namespace +} // namespace static llvm::cl::opt legalizerConversionMode( @@ -871,7 +871,7 @@ } } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Test patterns without a specific root operation kind @@ -911,7 +911,7 @@ signalPassFailure(); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Test type conversions @@ -1127,7 +1127,7 @@ 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 --- a/mlir/test/lib/Dialect/Test/TestTraits.cpp +++ b/mlir/test/lib/Dialect/Test/TestTraits.cpp @@ -39,7 +39,7 @@ 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 --- a/mlir/test/lib/Dialect/Test/TestTypes.h +++ b/mlir/test/lib/Dialect/Test/TestTypes.h @@ -69,7 +69,7 @@ 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 --- a/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp +++ b/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp @@ -197,7 +197,7 @@ (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 --- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp +++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp @@ -583,7 +583,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp b/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp --- a/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp +++ b/mlir/test/lib/IR/TestBuiltinAttributeInterfaces.cpp @@ -50,7 +50,7 @@ }); } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/IR/TestDiagnostics.cpp b/mlir/test/lib/IR/TestDiagnostics.cpp --- a/mlir/test/lib/IR/TestDiagnostics.cpp +++ b/mlir/test/lib/IR/TestDiagnostics.cpp @@ -57,7 +57,7 @@ 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 --- a/mlir/test/lib/IR/TestDominance.cpp +++ b/mlir/test/lib/IR/TestDominance.cpp @@ -120,7 +120,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/IR/TestFunc.cpp b/mlir/test/lib/IR/TestFunc.cpp --- a/mlir/test/lib/IR/TestFunc.cpp +++ b/mlir/test/lib/IR/TestFunc.cpp @@ -149,7 +149,7 @@ } } }; -} // end anonymous namespace +} // namespace namespace mlir { void registerTestFunc() { diff --git a/mlir/test/lib/IR/TestInterfaces.cpp b/mlir/test/lib/IR/TestInterfaces.cpp --- a/mlir/test/lib/IR/TestInterfaces.cpp +++ b/mlir/test/lib/IR/TestInterfaces.cpp @@ -40,7 +40,7 @@ }); } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/IR/TestMatchers.cpp b/mlir/test/lib/IR/TestMatchers.cpp --- a/mlir/test/lib/IR/TestMatchers.cpp +++ b/mlir/test/lib/IR/TestMatchers.cpp @@ -22,7 +22,7 @@ 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 --- a/mlir/test/lib/IR/TestOpaqueLoc.cpp +++ b/mlir/test/lib/IR/TestOpaqueLoc.cpp @@ -82,7 +82,7 @@ } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/IR/TestOperationEquals.cpp b/mlir/test/lib/IR/TestOperationEquals.cpp --- a/mlir/test/lib/IR/TestOperationEquals.cpp +++ b/mlir/test/lib/IR/TestOperationEquals.cpp @@ -46,7 +46,7 @@ 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 --- a/mlir/test/lib/IR/TestPrintDefUse.cpp +++ b/mlir/test/lib/IR/TestPrintDefUse.cpp @@ -63,7 +63,7 @@ }); } }; -} // 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 --- a/mlir/test/lib/IR/TestPrintNesting.cpp +++ b/mlir/test/lib/IR/TestPrintNesting.cpp @@ -88,7 +88,7 @@ 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 --- a/mlir/test/lib/IR/TestSideEffects.cpp +++ b/mlir/test/lib/IR/TestSideEffects.cpp @@ -69,7 +69,7 @@ }); } }; -} // 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 --- a/mlir/test/lib/IR/TestSymbolUses.cpp +++ b/mlir/test/lib/IR/TestSymbolUses.cpp @@ -115,7 +115,7 @@ }); } }; -} // end anonymous namespace +} // namespace namespace mlir { void registerSymbolTestPasses() { diff --git a/mlir/test/lib/IR/TestVisitors.cpp b/mlir/test/lib/IR/TestVisitors.cpp --- a/mlir/test/lib/IR/TestVisitors.cpp +++ b/mlir/test/lib/IR/TestVisitors.cpp @@ -161,7 +161,7 @@ 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 --- a/mlir/test/lib/Pass/TestPassManager.cpp +++ b/mlir/test/lib/Pass/TestPassManager.cpp @@ -98,7 +98,7 @@ 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 --- a/mlir/test/lib/Reducer/MLIRTestReducer.cpp +++ b/mlir/test/lib/Reducer/MLIRTestReducer.cpp @@ -29,7 +29,7 @@ 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 --- a/mlir/test/lib/Rewrite/TestPDLByteCode.cpp +++ b/mlir/test/lib/Rewrite/TestPDLByteCode.cpp @@ -109,7 +109,7 @@ 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 --- a/mlir/test/lib/Transforms/TestConstantFold.cpp +++ b/mlir/test/lib/Transforms/TestConstantFold.cpp @@ -26,7 +26,7 @@ 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 --- a/mlir/test/lib/Transforms/TestInlining.cpp +++ b/mlir/test/lib/Transforms/TestInlining.cpp @@ -64,7 +64,7 @@ } } }; -} // end anonymous namespace +} // namespace namespace mlir { namespace test { diff --git a/mlir/test/lib/Transforms/TestLoopFusion.cpp b/mlir/test/lib/Transforms/TestLoopFusion.cpp --- a/mlir/test/lib/Transforms/TestLoopFusion.cpp +++ b/mlir/test/lib/Transforms/TestLoopFusion.cpp @@ -49,7 +49,7 @@ 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 --- a/mlir/test/mlir-tblgen/attrdefs.td +++ b/mlir/test/mlir-tblgen/attrdefs.td @@ -9,7 +9,7 @@ // 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 --- 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 @@ // ATTR: return; // ATTR: } -// ATTR: } // end namespace test +// ATTR: } // namespace test def TypeA : TestType<"TypeA"> { let mnemonic = "type_a"; @@ -73,4 +73,4 @@ // 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 --- a/mlir/test/mlir-tblgen/typedefs.td +++ b/mlir/test/mlir-tblgen/typedefs.td @@ -9,7 +9,7 @@ // 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 --- a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp @@ -173,7 +173,7 @@ /// 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 @@ : DefGenerator(records.getAllDerivedDefinitions("TypeDef"), os, "Type", "Type", /*isAttrGenerator=*/false) {} }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // GEN: Declarations @@ -663,7 +663,7 @@ namespace mlir { class AsmParser; class AsmPrinter; -} // end namespace mlir +} // namespace mlir )"; bool DefGenerator::emitDecls(StringRef selectedDialect) { diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h --- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h +++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.h @@ -25,7 +25,7 @@ /// 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/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp --- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp @@ -152,7 +152,7 @@ using Base::Base; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Format Strings @@ -268,7 +268,7 @@ bool shouldEmitSpace; bool lastWasPunctuation; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // ParserGen @@ -559,7 +559,7 @@ /// 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/DialectGen.cpp b/mlir/tools/mlir-tblgen/DialectGen.cpp --- a/mlir/tools/mlir-tblgen/DialectGen.cpp +++ b/mlir/tools/mlir-tblgen/DialectGen.cpp @@ -41,7 +41,7 @@ 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 --- 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 @@ /// 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 --- a/mlir/tools/mlir-tblgen/OpClass.h +++ b/mlir/tools/mlir-tblgen/OpClass.h @@ -43,7 +43,7 @@ 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 --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -260,7 +260,7 @@ // 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 @@ const StaticVerifierFunctionEmitter &staticVerifierEmitter; }; -} // end anonymous namespace +} // namespace // Populate the format context `ctx` with substitutions of attributes, operands // and results. @@ -2539,7 +2539,7 @@ Class adaptor; StaticVerifierFunctionEmitter &staticVerifierEmitter; }; -} // end anonymous namespace +} // namespace OpOperandAdaptorEmitter::OpOperandAdaptorEmitter( const Operator &op, StaticVerifierFunctionEmitter &staticVerifierEmitter) diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.h b/mlir/tools/mlir-tblgen/OpFormatGen.h --- a/mlir/tools/mlir-tblgen/OpFormatGen.h +++ b/mlir/tools/mlir-tblgen/OpFormatGen.h @@ -22,7 +22,7 @@ // 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/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp --- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp @@ -134,7 +134,7 @@ /// This class represents a variable that refers to a successor. using SuccessorVariable = VariableElement; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // DirectiveElement @@ -263,7 +263,7 @@ /// The spelling of the literal for this element. StringRef literal; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // WhitespaceElement @@ -306,7 +306,7 @@ private: bool value; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // OptionalElement @@ -354,7 +354,7 @@ /// WhitespaceElement). unsigned parseStart; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // OperationFormat @@ -468,7 +468,7 @@ SmallVector usedAttributes; llvm::StringSet<> inferredAttributes; }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // Parser Gen @@ -795,7 +795,7 @@ /// 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 @@ 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/OpGenHelpers.h b/mlir/tools/mlir-tblgen/OpGenHelpers.h --- a/mlir/tools/mlir-tblgen/OpGenHelpers.h +++ b/mlir/tools/mlir-tblgen/OpGenHelpers.h @@ -24,7 +24,7 @@ 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 --- a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp +++ b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp @@ -148,7 +148,7 @@ "(*static_cast(this))"); } }; -} // end anonymous namespace +} // namespace //===----------------------------------------------------------------------===// // GEN: Interface definitions @@ -443,7 +443,7 @@ 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 @@ 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 --- a/mlir/tools/mlir-tblgen/RewriterGen.cpp +++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -50,7 +50,7 @@ os << v.first << ":" << v.second; } }; -} // end namespace llvm +} // namespace llvm //===----------------------------------------------------------------------===// // PatternEmitter @@ -328,7 +328,7 @@ 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 --- a/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp +++ b/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp @@ -109,4 +109,4 @@ 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 --- a/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp +++ b/mlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp @@ -169,4 +169,4 @@ 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 --- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp +++ b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp @@ -198,7 +198,7 @@ } }; -} // 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 --- a/mlir/unittests/IR/AttributeTest.cpp +++ b/mlir/unittests/IR/AttributeTest.cpp @@ -250,4 +250,4 @@ EXPECT_TRUE(zeroStringValue.getType() == stringTy); } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/DialectTest.cpp b/mlir/unittests/IR/DialectTest.cpp --- a/mlir/unittests/IR/DialectTest.cpp +++ b/mlir/unittests/IR/DialectTest.cpp @@ -142,4 +142,4 @@ #endif } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/InterfaceAttachmentTest.cpp b/mlir/unittests/IR/InterfaceAttachmentTest.cpp --- a/mlir/unittests/IR/InterfaceAttachmentTest.cpp +++ b/mlir/unittests/IR/InterfaceAttachmentTest.cpp @@ -398,4 +398,4 @@ EXPECT_FALSE(isa(opI.getOperation())); } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/OperationSupportTest.cpp b/mlir/unittests/IR/OperationSupportTest.cpp --- a/mlir/unittests/IR/OperationSupportTest.cpp +++ b/mlir/unittests/IR/OperationSupportTest.cpp @@ -271,4 +271,4 @@ attrs.assign({}); ASSERT_TRUE(attrs.empty()); } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/ShapedTypeTest.cpp b/mlir/unittests/IR/ShapedTypeTest.cpp --- a/mlir/unittests/IR/ShapedTypeTest.cpp +++ b/mlir/unittests/IR/ShapedTypeTest.cpp @@ -127,4 +127,4 @@ VectorType::get(vectorNewShape, vectorNewType)); } -} // end namespace +} // namespace diff --git a/mlir/unittests/IR/SubElementInterfaceTest.cpp b/mlir/unittests/IR/SubElementInterfaceTest.cpp --- a/mlir/unittests/IR/SubElementInterfaceTest.cpp +++ b/mlir/unittests/IR/SubElementInterfaceTest.cpp @@ -32,4 +32,4 @@ ArrayRef({trueAttr, falseAttr, boolArrayAttr})); } -} // end namespace +} // namespace diff --git a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp --- a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp +++ b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp @@ -225,7 +225,7 @@ } }; -} // 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 --- a/mlir/unittests/Pass/AnalysisManagerTest.cpp +++ b/mlir/unittests/Pass/AnalysisManagerTest.cpp @@ -246,4 +246,4 @@ EXPECT_TRUE(an.ctor2called); } -} // end namespace +} // namespace diff --git a/mlir/unittests/Pass/PassManagerTest.cpp b/mlir/unittests/Pass/PassManagerTest.cpp --- a/mlir/unittests/Pass/PassManagerTest.cpp +++ b/mlir/unittests/Pass/PassManagerTest.cpp @@ -87,7 +87,7 @@ *static_cast(this)); } }; -} // anonymous namespace +} // namespace TEST(PassManagerTest, InvalidPass) { MLIRContext context; @@ -127,4 +127,4 @@ ASSERT_DEATH(pm.addPass(std::make_unique()), ""); } -} // end namespace +} // namespace