Adjust "end namespace" comment in MLIR to match new agree'd coding style

See D115115 and this mailing list discussion:
https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html

Differential Revision: https://reviews.llvm.org/D115309
This commit is contained in:
Mehdi Amini 2021-12-07 18:27:58 +00:00
parent 3bed2a7212
commit be0a7e9f27
405 changed files with 708 additions and 708 deletions

View File

@ -82,7 +82,7 @@ struct MyFunctionPass : public PassWrapper<MyFunctionPass,
});
}
};
} // end anonymous namespace
} // namespace
/// Register this pass so that it can be built via from a textual pass pipeline.
/// (Pass registration is discussed more below)

View File

@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
} // end anonymous namespace
} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x

View File

@ -20,7 +20,7 @@ class Pass;
namespace toy {
std::unique_ptr<Pass> createShapeInferencePass();
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H

View File

@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_

View File

@ -105,7 +105,7 @@ public:
});
}
};
} // end anonymous namespace
} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {

View File

@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
} // end anonymous namespace
} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x

View File

@ -25,7 +25,7 @@ std::unique_ptr<Pass> createShapeInferencePass();
/// for a subset of the Toy IR (e.g. matmul).
std::unique_ptr<mlir::Pass> createLowerToAffinePass();
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H

View File

@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_

View File

@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
} // end anonymous namespace.
} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
} // end anonymous namespace.
} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();

View File

@ -105,7 +105,7 @@ public:
});
}
};
} // end anonymous namespace
} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {

View File

@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
} // end anonymous namespace
} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x

View File

@ -29,7 +29,7 @@ std::unique_ptr<mlir::Pass> createLowerToAffinePass();
/// well as `Affine` and `Std`, to the LLVM dialect for codegen.
std::unique_ptr<mlir::Pass> createLowerToLLVMPass();
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H

View File

@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_

View File

@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
} // end anonymous namespace.
} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
} // end anonymous namespace.
} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();

View File

@ -160,7 +160,7 @@ private:
globalPtr, ArrayRef<Value>({cst0, cst0}));
}
};
} // end anonymous namespace
} // namespace
//===----------------------------------------------------------------------===//
// ToyToLLVMLoweringPass
@ -174,7 +174,7 @@ struct ToyToLLVMLoweringPass
}
void runOnOperation() final;
};
} // end anonymous namespace
} // namespace
void ToyToLLVMLoweringPass::runOnOperation() {
// The first thing to define is the conversion target. This will define the

View File

@ -105,7 +105,7 @@ public:
});
}
};
} // end anonymous namespace
} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {

View File

@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
} // end anonymous namespace
} // namespace
/// This is an example of a c++ rewrite pattern for the TransposeOp. It
/// optimizes the following scenario: transpose(transpose(x)) -> x

View File

@ -25,9 +25,9 @@ namespace mlir {
namespace toy {
namespace detail {
struct StructTypeStorage;
} // end namespace detail
} // end namespace toy
} // end namespace mlir
} // namespace detail
} // namespace toy
} // namespace mlir
/// Include the auto-generated header file containing the declaration of the toy
/// dialect.
@ -70,7 +70,7 @@ public:
/// 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_

View File

@ -29,7 +29,7 @@ std::unique_ptr<mlir::Pass> createLowerToAffinePass();
/// well as `Affine` and `Std`, to the LLVM dialect for codegen.
std::unique_ptr<mlir::Pass> createLowerToLLVMPass();
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_PASSES_H

View File

@ -22,7 +22,7 @@ namespace toy {
/// Include the auto-generated declarations.
#include "toy/ShapeInferenceOpInterfaces.h.inc"
} // end namespace toy
} // end namespace mlir
} // namespace toy
} // namespace mlir
#endif // MLIR_TUTORIAL_TOY_SHAPEINFERENCEINTERFACE_H_

View File

@ -461,9 +461,9 @@ struct StructTypeStorage : public mlir::TypeStorage {
/// The following field contains the element types of the struct.
llvm::ArrayRef<mlir::Type> elementTypes;
};
} // end namespace detail
} // end namespace toy
} // end namespace mlir
} // namespace detail
} // namespace toy
} // namespace mlir
/// Create an instance of a `StructType` with the given element types. There
/// *must* be at least one element type.

View File

@ -266,7 +266,7 @@ struct TransposeOpLowering : public ConversionPattern {
}
};
} // end anonymous namespace.
} // namespace
//===----------------------------------------------------------------------===//
// ToyToAffineLoweringPass
@ -283,7 +283,7 @@ struct ToyToAffineLoweringPass
}
void runOnFunction() final;
};
} // end anonymous namespace.
} // namespace
void ToyToAffineLoweringPass::runOnFunction() {
auto function = getFunction();

View File

@ -160,7 +160,7 @@ private:
globalPtr, ArrayRef<Value>({cst0, cst0}));
}
};
} // end anonymous namespace
} // namespace
//===----------------------------------------------------------------------===//
// ToyToLLVMLoweringPass
@ -174,7 +174,7 @@ struct ToyToLLVMLoweringPass
}
void runOnOperation() final;
};
} // end anonymous namespace
} // namespace
void ToyToLLVMLoweringPass::runOnOperation() {
// The first thing to define is the conversion target. This will define the

View File

@ -105,7 +105,7 @@ public:
});
}
};
} // end anonymous namespace
} // namespace
/// Create a Shape Inference pass.
std::unique_ptr<mlir::Pass> mlir::toy::createShapeInferencePass() {

View File

@ -21,7 +21,7 @@ using namespace toy;
namespace {
/// Include the patterns defined in the Declarative Rewrite framework.
#include "ToyCombine.inc"
} // end anonymous namespace
} // namespace
/// Fold constants.
OpFoldResult ConstantOp::fold(ArrayRef<Attribute> operands) { return value(); }

View File

@ -182,6 +182,6 @@ void getDependenceComponents(
AffineForOp forOp, unsigned maxLoopDepth,
std::vector<SmallVector<DependenceComponent, 2>> *depCompsVec);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_AFFINE_ANALYSIS_H

View File

@ -1088,6 +1088,6 @@ LogicalResult getRelationFromMap(AffineMap &map, FlatAffineRelation &rel);
LogicalResult getRelationFromMap(const AffineValueMap &map,
FlatAffineRelation &rel);
} // end namespace mlir.
} // namespace mlir.
#endif // MLIR_ANALYSIS_AFFINESTRUCTURES_H

View File

@ -212,7 +212,7 @@ struct AliasAnalysisTraits {
ImplT impl;
};
};
} // end namespace detail
} // namespace detail
//===----------------------------------------------------------------------===//
// AliasAnalysis
@ -278,6 +278,6 @@ private:
SmallVector<std::unique_ptr<Concept>, 4> aliasImpls;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_ALIASANALYSIS_H_

View File

@ -29,6 +29,6 @@ public:
/// 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_

View File

@ -216,7 +216,7 @@ private:
CallGraphNode externalNode;
};
} // end namespace mlir
} // namespace mlir
namespace llvm {
// Provide graph traits for traversing call graphs using standard graph
@ -253,6 +253,6 @@ struct GraphTraits<const mlir::CallGraph *>
static nodes_iterator nodes_begin(mlir::CallGraph *cg) { return cg->begin(); }
static nodes_iterator nodes_end(mlir::CallGraph *cg) { return cg->end(); }
};
} // end namespace llvm
} // namespace llvm
#endif // MLIR_ANALYSIS_CALLGRAPH_H

View File

@ -396,6 +396,6 @@ private:
MLIRContext *context;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_DATAFLOWANALYSIS_H

View File

@ -142,6 +142,6 @@ private:
friend class Liveness;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_LIVENESS_H

View File

@ -113,6 +113,6 @@ bool isOpwiseShiftValid(AffineForOp forOp, ArrayRef<uint64_t> shifts);
/// reductions not covered by this generic matching.
Value matchReduction(ArrayRef<BlockArgument> iterCarriedArgs, unsigned redPos,
SmallVectorImpl<Operation *> &combinerOps);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_LOOP_ANALYSIS_H

View File

@ -195,7 +195,7 @@ bool isParallelLoop(Operation &op);
bool isReductionLoop(Operation &op);
bool isLoadOrStore(Operation &op);
} // end namespace matcher
} // end namespace mlir
} // namespace matcher
} // namespace mlir
#endif // MLIR_ANALYSIS_MLFUNCTIONMATCHER_H_

View File

@ -102,6 +102,6 @@ private:
Optional<int64_t> numberOfBlockExecutions;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_NUMBER_OF_EXECUTIONS_H

View File

@ -205,6 +205,6 @@ getSlice(Operation *op,
/// Returns a topologically sorted SetVector.
SetVector<Operation *> topologicalSort(const SetVector<Operation *> &toSort);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_SLICEANALYSIS_H_

View File

@ -380,6 +380,6 @@ unsigned getInnermostCommonLoopDepth(
ArrayRef<Operation *> ops,
SmallVectorImpl<AffineForOp> *surroundingLoops = nullptr);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_ANALYSIS_UTILS_H

View File

@ -45,7 +45,7 @@ private:
void *opaqueData;
uint64_t pos;
};
} // end namespace detail
} // end namespace mlir
} // namespace detail
} // namespace mlir
#endif // MLIR_CAPI_UTILS_H

View File

@ -22,7 +22,7 @@ void populateArithmeticToLLVMConversionPatterns(LLVMTypeConverter &converter,
RewritePatternSet &patterns);
std::unique_ptr<Pass> createConvertArithmeticToLLVMPass();
} // end namespace arith
} // end namespace mlir
} // namespace arith
} // namespace mlir
#endif // MLIR_CONVERSION_ARITHMETICTOLLVM_ARITHMETICTOLLVM_H

View File

@ -22,7 +22,7 @@ void populateArithmeticToSPIRVPatterns(SPIRVTypeConverter &typeConverter,
RewritePatternSet &patterns);
std::unique_ptr<Pass> createConvertArithmeticToSPIRVPass();
} // end namespace arith
} // end namespace mlir
} // namespace arith
} // namespace mlir
#endif // MLIR_CONVERSION_ARITHMETICTOSPIRV_ARITHMETICTOSPIRV_H

View File

@ -22,7 +22,7 @@ using OwningRewritePatternList = RewritePatternSet;
namespace scf {
class ForOp;
} // end namespace scf
} // namespace scf
/// Convert a perfect affine loop nest with the outermost loop identified by
/// `forOp` into a gpu::Launch operation. Map `numBlockDims` outer loops to

View File

@ -455,6 +455,6 @@ private:
friend class AffineForOp;
};
} // end namespace mlir
} // namespace mlir
#endif

View File

@ -91,6 +91,6 @@ std::unique_ptr<OperationPass<FuncOp>> createSuperVectorizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Affine/Passes.h.inc"
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_AFFINE_RANSFORMS_PASSES_H

View File

@ -89,8 +89,8 @@ public:
static bool classof(Operation *op);
};
} // end namespace arith
} // end namespace mlir
} // namespace arith
} // namespace mlir
//===----------------------------------------------------------------------===//
// Utility Functions
@ -109,7 +109,7 @@ bool applyCmpPredicate(arith::CmpIPredicate predicate, const APInt &lhs,
bool applyCmpPredicate(arith::CmpFPredicate predicate, const APFloat &lhs,
const APFloat &rhs);
} // end namespace arith
} // end namespace mlir
} // namespace arith
} // namespace mlir
#endif // MLIR_DIALECT_ARITHMETIC_IR_ARITHMETIC_H_

View File

@ -14,7 +14,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
} // end namespace bufferization
} // namespace bufferization
namespace arith {
@ -40,7 +40,7 @@ std::unique_ptr<Pass> createArithmeticExpandOpsPass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Arithmetic/Transforms/Passes.h.inc"
} // end namespace arith
} // end namespace mlir
} // namespace arith
} // namespace mlir
#endif // MLIR_DIALECT_ARITHMETIC_TRANSFORMS_PASSES_H_

View File

@ -52,7 +52,7 @@ void populateBufferizeMaterializationLegality(ConversionTarget &target);
void populateEliminateBufferizeMaterializationsPatterns(
BufferizeTypeConverter &typeConverter, RewritePatternSet &patterns);
} // end namespace bufferization
} // end namespace mlir
} // namespace bufferization
} // namespace mlir
#endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_BUFFERIZE_H

View File

@ -26,7 +26,7 @@ std::unique_ptr<FunctionPass> createFinalizingBufferizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
} // end namespace bufferization
} // end namespace mlir
} // namespace bufferization
} // namespace mlir
#endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_PASSES_H

View File

@ -164,8 +164,8 @@ public:
// 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"

View File

@ -24,6 +24,6 @@ class GPUFuncOp;
/// copies will be inserted in the beginning and in the end of the function.
void promoteToWorkgroupMemory(gpu::GPUFuncOp op, unsigned arg);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_GPU_MEMORYPROMOTION_H

View File

@ -59,7 +59,7 @@ ParallelLoopDimMapping getParallelLoopDimMappingAttr(Processor processor,
/// - the mapping does not map multiple loops to the same processor.
LogicalResult setMappingAttr(scf::ParallelOp ploopOp,
ArrayRef<ParallelLoopDimMapping> mapping);
} // end namespace gpu
} // namespace gpu
/// Maps the parallel loops found in the given function to workgroups. The first
/// loop encountered will be mapped to the global workgroup and the second loop
@ -68,5 +68,5 @@ LogicalResult setMappingAttr(scf::ParallelOp ploopOp,
/// mapped to sequential loops.
void greedilyMapParallelSCFToGPU(Region &region);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_GPU_PARALLELLOOPMAPPER_H

View File

@ -50,8 +50,8 @@ class LLVMContext;
namespace sys {
template <bool mt_only>
class SmartMutex;
} // end namespace sys
} // end namespace llvm
} // namespace sys
} // namespace llvm
namespace mlir {
namespace LLVM {
@ -131,7 +131,7 @@ private:
SmallVector<LoopOptionsAttr::OptionValuePair> options;
};
} // end namespace LLVM
} // end namespace mlir
} // namespace LLVM
} // namespace mlir
#endif // MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_

View File

@ -24,6 +24,6 @@ namespace mlir {
/// are > 1 deallocates for `allocValue`, returns None, else returns the single
/// deallocate if it exists or nullptr.
llvm::Optional<Operation *> findDealloc(Value allocValue);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_MEMREF_UTILS_MEMREFUTILS_H

View File

@ -36,7 +36,7 @@ namespace acc {
/// combined and the final mapping value would be 5 (4 | 1).
enum OpenACCExecMapping { NONE = 0, VECTOR = 1, WORKER = 2, GANG = 4 };
} // end namespace acc
} // end namespace mlir
} // namespace acc
} // namespace mlir
#endif // MLIR_DIALECT_OPENACC_OPENACC_H_

View File

@ -96,6 +96,6 @@ LoopNest buildLoopNest(OpBuilder &builder, Location loc, ValueRange lbs,
function_ref<void(OpBuilder &, Location, ValueRange)>
bodyBuilder = nullptr);
} // end namespace scf
} // end namespace mlir
} // namespace scf
} // namespace mlir
#endif // MLIR_DIALECT_SCF_H_

View File

@ -29,7 +29,7 @@ namespace scf {
class IfOp;
class ForOp;
class ParallelOp;
} // end namespace scf
} // namespace scf
/// Create a clone of `loop` with `newIterOperands` added as new initialization
/// values and `newYieldedValues` added as new yielded values. The returned
@ -77,5 +77,5 @@ getSCFMinMaxExpr(Value value, SmallVectorImpl<Value> &dims,
SmallVectorImpl<Value> &symbols,
llvm::function_ref<bool(Operation *)> loopFilter = nullptr);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_SCF_UTILS_H_

View File

@ -20,8 +20,8 @@ namespace spirv {
enum class Decoration : uint32_t;
} // end namespace spirv
} // end namespace mlir
} // namespace spirv
} // namespace mlir
#include "mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc"

View File

@ -52,7 +52,7 @@ ArrayRef<Capability> getDirectImpliedCapabilities(Capability cap);
/// third one will also be returned.
SmallVector<Capability, 0> getRecursiveImpliedCapabilities(Capability cap);
} // end namespace spirv
} // end namespace mlir
} // namespace spirv
} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_IR_SPIRVENUMS_H_

View File

@ -456,7 +456,7 @@ public:
Optional<StorageClass> storage = llvm::None);
};
} // end namespace spirv
} // end namespace mlir
} // namespace spirv
} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_IR_SPIRVTYPES_H_

View File

@ -69,6 +69,6 @@ std::unique_ptr<FunctionPass> createShapeBufferizePass();
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Shape/Transforms/Passes.h.inc"
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_SHAPE_TRANSFORMS_PASSES_H_

View File

@ -67,6 +67,6 @@ Value getIdentityValue(AtomicRMWKind op, Type resultType, OpBuilder &builder,
Value getReductionOp(AtomicRMWKind op, OpBuilder &builder, Location loc,
Value lhs, Value rhs);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_IR_STANDARDOPS_IR_OPS_H

View File

@ -86,6 +86,6 @@ void populateDecomposeCallGraphTypesPatterns(MLIRContext *context,
ValueDecomposer &decomposer,
RewritePatternSet &patterns);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H

View File

@ -69,6 +69,6 @@ bool isLegalForReturnOpTypeConversionPattern(Operation *op,
/// `isLegalForBranchOpInterfaceTypeConversionPattern` and
/// `isLegalForReturnOpTypeConversionPattern`.
bool isNotBranchOpInterfaceOrReturnLikeOp(Operation *op);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_FUNCCONVERSIONS_H_

View File

@ -19,7 +19,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
} // end namespace bufferization
} // namespace bufferization
class GlobalCreator;
class RewritePatternSet;
@ -63,6 +63,6 @@ void populateStdExpandOpsPatterns(RewritePatternSet &patterns);
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/StandardOps/Transforms/Passes.h.inc"
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_STANDARD_TRANSFORMS_PASSES_H_

View File

@ -103,6 +103,6 @@ private:
OpBuilder &b;
Location loc;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_STANDARDOPS_UTILS_UTILS_H

View File

@ -14,7 +14,7 @@
namespace mlir {
namespace bufferization {
class BufferizeTypeConverter;
} // end namespace bufferization
} // namespace bufferization
class RewritePatternSet;
using OwningRewritePatternList = RewritePatternSet;
@ -36,6 +36,6 @@ namespace tensor {
#include "mlir/Dialect/Tensor/Transforms/Passes.h.inc"
} // namespace tensor
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES_H_

View File

@ -31,8 +31,8 @@ namespace tosa {
#include "mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc"
} // end namespace tosa
} // end namespace mlir
} // namespace tosa
} // namespace mlir
#define GET_OP_CLASSES
#include "mlir/Dialect/Tosa/IR/TosaOps.h.inc"

View File

@ -19,6 +19,6 @@ namespace mlir {
#define GEN_PASS_CLASSES
#include "mlir/Dialect/Tosa/Transforms/Passes.h.inc"
} // end namespace mlir
} // namespace mlir
#endif // MLIR_DIALECT_TOSA_TRANSFORMS_PASSDETAIL_H

View File

@ -93,7 +93,7 @@ public:
}
};
} // end namespace OpTrait
} // end namespace mlir
} // namespace OpTrait
} // namespace mlir
#endif // MLIR_DIALECT_TRAITS

View File

@ -189,6 +189,6 @@ protected:
Operation *op;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_UTILS_STRUCTUREDOPSUTILS_H

View File

@ -144,8 +144,8 @@ namespace impl {
AffineMap getTransferMinorIdentityMap(ShapedType shapedType,
VectorType vectorType);
} // namespace impl
} // end namespace vector
} // end namespace mlir
} // namespace vector
} // namespace mlir
#define GET_OP_CLASSES
#include "mlir/Dialect/Vector/VectorOps.h.inc"

View File

@ -202,7 +202,7 @@ namespace matcher {
/// adding even 1 extra bit in the IR for now.
bool operatesOnSuperVectorsOf(Operation &op, VectorType subVectorType);
} // end namespace matcher
} // end namespace mlir
} // namespace matcher
} // namespace mlir
#endif // MLIR_DIALECT_VECTOR_VECTORUTILS_H_

View File

@ -81,8 +81,8 @@ private:
T vector[Dim];
char padding[nextPowerOf2(sizeof(T[Dim])) - sizeof(T[Dim])];
};
} // end namespace detail
} // end namespace mlir
} // namespace detail
} // namespace mlir
// N-D vectors recurse down to 1-D.
template <typename T, int Dim, int... Dims>

View File

@ -197,6 +197,6 @@ private:
llvm::JITEventListener *perfListener;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_EXECUTIONENGINE_EXECUTIONENGINE_H_

View File

@ -52,6 +52,6 @@ makeLLVMPassesTransformer(llvm::ArrayRef<const llvm::PassInfo *> llvmPasses,
llvm::TargetMachine *targetMachine,
unsigned optPassesInsertPos = 0);
} // end namespace mlir
} // namespace mlir
#endif // LIR_EXECUTIONENGINE_OPTUTILS_H_

View File

@ -340,6 +340,6 @@ private:
inline unsigned getDimStartIndex() const { return 0; }
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_AFFINE_EXPR_VISITOR_H

View File

@ -24,7 +24,7 @@ namespace mlir {
namespace detail {
struct AffineMapStorage;
} // end namespace detail
} // namespace detail
class Attribute;
struct LogicalResult;
@ -567,7 +567,7 @@ inline raw_ostream &operator<<(raw_ostream &os, AffineMap map) {
map.print(os);
return os;
}
} // end namespace mlir
} // namespace mlir
namespace llvm {

View File

@ -23,7 +23,7 @@ class Operation;
namespace detail {
class AsmStateImpl;
} // end namespace detail
} // namespace detail
/// This class provides management for the lifetime of the state used when
/// printing the IR. It allows for alleviating the cost of recomputing the
@ -66,6 +66,6 @@ private:
/// various flags within the AsmPrinter.
void registerAsmPrinterCLOptions();
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_ASMSTATE_H_

View File

@ -109,7 +109,7 @@ private:
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 @@ private:
};
} // namespace detail
} // end namespace mlir
} // namespace mlir
#endif

View File

@ -227,7 +227,7 @@ private:
friend InterfaceBase;
};
} // end namespace mlir.
} // namespace mlir.
namespace llvm {

View File

@ -18,7 +18,7 @@
namespace llvm {
class BitVector;
} // end namespace llvm
} // namespace llvm
namespace mlir {
class TypeRange;
@ -364,6 +364,6 @@ private:
friend struct llvm::ilist_traits<Block>;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_BLOCK_H

View File

@ -94,6 +94,6 @@ private:
DenseMap<Block *, Block *> blockMap;
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_BLOCKANDVALUEMAPPING_H

View File

@ -171,8 +171,8 @@ public:
/// 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 @@ protected:
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 @@ private:
mlir::Region *getParentRegion();
};
} // end namespace llvm
} // namespace llvm
#endif // MLIR_IR_BLOCK_SUPPORT_H

View File

@ -312,6 +312,6 @@ auto ElementsAttr::try_value_begin() const
return llvm::None;
return iterator<T>(std::move(*indexer), 0);
}
} // end namespace mlir.
} // namespace mlir.
#endif // MLIR_IR_BUILTINATTRIBUTEINTERFACES_H

View File

@ -940,7 +940,7 @@ inline bool operator!=(StringRef lhs, StringAttr rhs) { return !(lhs == rhs); }
inline Type StringAttr::getType() const { return Attribute::getType(); }
} // end namespace mlir
} // namespace mlir
//===----------------------------------------------------------------------===//
// Attribute Utilities

View File

@ -46,7 +46,7 @@ public:
OwningModuleRef(OwningOpRef<ModuleOp> &&other)
: OwningOpRef<ModuleOp>(std::move(other)) {}
};
} // end namespace mlir
} // namespace mlir
namespace llvm {
/// Allow stealing the low bits of FuncOp.
@ -73,6 +73,6 @@ public:
}
static constexpr int NumLowBitsAvailable = 3;
};
} // end namespace llvm
} // namespace llvm
#endif // MLIR_IR_BUILTINOPS_H_

View File

@ -183,7 +183,7 @@ public:
unsigned getMemorySpaceAsInt() const;
};
} // end namespace mlir
} // namespace mlir
//===----------------------------------------------------------------------===//
// Tablegen Type Declarations
@ -531,6 +531,6 @@ bool isStrided(MemRefType t);
/// Return null if the layout is not compatible with a strided layout.
AffineMap getStridedLinearLayoutMap(MemRefType t);
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_BUILTINTYPES_H

View File

@ -20,7 +20,7 @@ namespace llvm {
class MemoryBuffer;
class SMLoc;
class SourceMgr;
} // end namespace llvm
} // namespace llvm
namespace mlir {
class DiagnosticEngine;
@ -34,7 +34,7 @@ class Value;
namespace detail {
struct DiagnosticEngineImpl;
} // end namespace detail
} // namespace detail
/// Defines the different supported severity of a diagnostic.
enum class DiagnosticSeverity {
@ -516,7 +516,7 @@ private:
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 @@ private:
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 @@ private:
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

View File

@ -50,7 +50,7 @@ public:
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; }

View File

@ -127,6 +127,6 @@ struct FieldParser<
}
};
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_DIALECTIMPLEMENTATION_H

View File

@ -35,7 +35,7 @@ public:
protected:
DialectInterfaceBase(Dialect *dialect) : BaseT(dialect, getInterfaceID()) {}
};
} // end namespace detail
} // namespace detail
/// This class represents an interface overridden for a single dialect.
class DialectInterface {

View File

@ -109,7 +109,7 @@ protected:
mutable DenseMap<Region *, llvm::PointerIntPair<DomTree *, 1, bool>>
dominanceInfos;
};
} // end namespace detail
} // namespace detail
/// A class for computing basic dominance information. Note that this
/// class is aware of different types of regions and returns a
@ -196,7 +196,7 @@ public:
}
};
} // end namespace mlir
} // namespace mlir
namespace llvm {
@ -222,5 +222,5 @@ struct GraphTraits<const mlir::DominanceInfoNode *> {
static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
} // end namespace llvm
} // namespace llvm
#endif

View File

@ -796,8 +796,8 @@ Attribute FunctionLike<ConcreteType>::removeResultAttr(unsigned index,
return removedAttr;
}
} // end namespace OpTrait
} // namespace OpTrait
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_FUNCTIONSUPPORT_H

View File

@ -15,6 +15,6 @@ namespace mlir {
/// NOTICE: Identifier is deprecated and usages of it should be replaced with
/// StringAttr.
using Identifier = StringAttr;
} // end namespace mlir
} // namespace mlir
#endif

View File

@ -31,7 +31,7 @@ namespace mlir {
namespace detail {
struct IntegerSetStorage;
} // end namespace detail
} // namespace detail
class MLIRContext;
@ -124,7 +124,7 @@ inline ::llvm::hash_code hash_value(IntegerSet arg) {
return ::llvm::hash_value(arg.set);
}
} // end namespace mlir
} // namespace mlir
namespace llvm {
// IntegerSet hash just like pointers.

View File

@ -97,7 +97,7 @@ inline ::llvm::hash_code hash_value(Location arg) {
return hash_value(arg.impl);
}
} // end namespace mlir
} // namespace mlir
//===----------------------------------------------------------------------===//
// Tablegen Attribute Declarations

View File

@ -17,7 +17,7 @@
namespace llvm {
class ThreadPool;
} // end namespace llvm
} // namespace llvm
namespace mlir {
class DebugActionManager;
@ -236,6 +236,6 @@ private:
/// an MLIR context for initialization.
void registerMLIRContextCLOptions();
} // end namespace mlir
} // namespace mlir
#endif // MLIR_IR_MLIRCONTEXT_H

View File

@ -225,7 +225,7 @@ struct RecursivePatternMatcher {
std::tuple<OperandMatchers...> operandMatchers;
};
} // end namespace detail
} // namespace detail
/// Matches a constant foldable operation.
inline detail::constant_op_matcher m_Constant() {
@ -294,6 +294,6 @@ inline auto m_Any(Value *val) { return detail::AnyCapturedValueMatcher(val); }
inline auto m_Val(Value v) { return detail::PatternMatcherValue(v); }
} // namespace matchers
} // end namespace mlir
} // namespace mlir
#endif // MLIR_MATCHERS_H

View File

@ -339,7 +339,7 @@ struct MultiOperandTraitBase : public TraitBase<ConcreteType, TraitType> {
return this->getOperation()->getOperandTypes();
}
};
} // end namespace detail
} // namespace detail
/// This class provides the API for ops that are known to have no
/// SSA operand.
@ -448,7 +448,7 @@ struct MultiRegionTraitBase : public TraitBase<ConcreteType, TraitType> {
region_iterator region_end() { return this->getOperation()->region_end(); }
region_range getRegions() { return this->getOperation()->getRegions(); }
};
} // end namespace detail
} // namespace detail
/// This class provides APIs for ops that are known to have a single region.
template <typename ConcreteType>
@ -563,7 +563,7 @@ struct MultiResultTraitBase : public TraitBase<ConcreteType, TraitType> {
return this->getOperation()->getResultTypes();
}
};
} // end namespace detail
} // namespace detail
/// This class provides return value APIs for ops that are known to have a
/// single result. ResultType is the concrete type returned by getType().
@ -712,7 +712,7 @@ struct MultiSuccessorTraitBase : public TraitBase<ConcreteType, TraitType> {
succ_iterator succ_end() { return this->getOperation()->succ_end(); }
succ_range getSuccessors() { return this->getOperation()->getSuccessors(); }
};
} // end namespace detail
} // namespace detail
/// This class provides APIs for ops that are known to have a single successor.
template <typename ConcreteType>
@ -1418,7 +1418,7 @@ struct Tensorizable : public TraitBase<ConcreteType, Tensorizable> {
/// behavior to vectors/tensors, and systematize conversion between these forms.
bool hasElementwiseMappableTraits(Operation *op);
} // end namespace OpTrait
} // namespace OpTrait
//===----------------------------------------------------------------------===//
// Internal Trait Utilities
@ -1906,7 +1906,7 @@ Value foldCastOp(Operation *op);
LogicalResult verifyCastOp(Operation *op,
function_ref<bool(Type, Type)> areCastCompatible);
} // namespace impl
} // end namespace mlir
} // namespace mlir
namespace llvm {
@ -1927,6 +1927,6 @@ struct DenseMapInfo<
static bool isEqual(T lhs, T rhs) { return lhs == rhs; }
};
} // end namespace llvm
} // namespace llvm
#endif

View File

@ -1354,7 +1354,7 @@ public:
virtual void getAsmBlockArgumentNames(Block *block,
OpAsmSetValueNameFn setNameFn) const {}
};
} // end namespace mlir
} // namespace mlir
//===--------------------------------------------------------------------===//
// Operation OpAsm interface.

View File

@ -717,7 +717,7 @@ inline raw_ostream &operator<<(raw_ostream &os, const Operation &op) {
return os;
}
} // end namespace mlir
} // namespace mlir
namespace llvm {
/// Provide isa functionality for operation casts.
@ -743,6 +743,6 @@ template <class T>
struct cast_convert_val<T, ::mlir::Operation *, ::mlir::Operation *> {
static T doit(::mlir::Operation *val) { return T(val); }
};
} // end namespace llvm
} // namespace llvm
#endif // MLIR_IR_OPERATION_H

Some files were not shown because too many files have changed in this diff Show More