diff --git a/mlir/docs/OpDefinitions.md b/mlir/docs/OpDefinitions.md --- a/mlir/docs/OpDefinitions.md +++ b/mlir/docs/OpDefinitions.md @@ -797,7 +797,7 @@ custom directive is transformed into a call to a `print*` and a `parse*` method when generating the C++ code for the format. The `UserDirective` is an identifier used as a suffix to these two calls, i.e., `custom(...)` -would result in calls to `parseMyDirective` and `printMyDirective` wihtin the +would result in calls to `parseMyDirective` and `printMyDirective` within the parser and printer respectively. `Params` may be any combination of variables (i.e. Attribute, Operand, Successor, etc.), type directives, and `attr-dict`. The type directives must refer to a variable, but that variable need not also @@ -1515,7 +1515,7 @@ The name of the C++ class which gets generated defaults to `Type` (e.g. `TestIntegerType` in the above example). This -can be overridden via the the `cppClassName` field. The field `mnemonic` is +can be overridden via the `cppClassName` field. The field `mnemonic` is to specify the asm name for parsing. It is optional and not specifying it will imply that no parser or printer methods are attached to this class. @@ -1554,7 +1554,7 @@ know anything about the types. In this case, the ArrayRef requires allocation with `dims = allocator.copyInto(dims)`. -You can specify the necessary constuctor by specializing the `TypeParameter` +You can specify the necessary constructor by specializing the `TypeParameter` tblgen class: ```tablegen diff --git a/mlir/include/mlir-c/Diagnostics.h b/mlir/include/mlir-c/Diagnostics.h --- a/mlir/include/mlir-c/Diagnostics.h +++ b/mlir/include/mlir-c/Diagnostics.h @@ -21,7 +21,7 @@ extern "C" { #endif -/** An opaque reference to a dignostic, always owned by the diagnostics engine +/** An opaque reference to a diagnostic, always owned by the diagnostics engine * (context). Must not be stored outside of the diagnostic handler. */ struct MlirDiagnostic { void *ptr; diff --git a/mlir/include/mlir-c/StandardAttributes.h b/mlir/include/mlir-c/StandardAttributes.h --- a/mlir/include/mlir-c/StandardAttributes.h +++ b/mlir/include/mlir-c/StandardAttributes.h @@ -203,7 +203,7 @@ * live as long as the context in which the attribute lives. */ MlirStringRef mlirSymbolRefAttrGetRootReference(MlirAttribute attr); -/** Returns the stirng reference to the leaf referenced symbol. The data remains +/** Returns the string reference to the leaf referenced symbol. The data remains * live as long as the context in which the attribute lives. */ MlirStringRef mlirSymbolRefAttrGetLeafReference(MlirAttribute attr); diff --git a/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td b/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td --- a/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td +++ b/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td @@ -43,7 +43,7 @@ (`async.token` or `async.value`). `async.execute` operation takes `async.token` dependencies and `async.value` - operands separatly, and starts execution of the attached body region only + operands separately, and starts execution of the attached body region only when all tokens and values become ready. Example: diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -913,7 +913,7 @@ let returnType = [{ ::llvm::APInt }]; } // Base class for signless integer attributes of fixed width that have a -// correpsonding C++ type. +// corresponding C++ type. class TypedSignlessIntegerAttrBase : SignlessIntegerAttrBase { let returnType = retType; @@ -942,7 +942,7 @@ let returnType = [{ ::llvm::APInt }]; } // Base class for signed integer attributes of fixed width that have a -// correpsonding C++ type. +// corresponding C++ type. class TypedSignedIntegerAttrBase : SignedIntegerAttrBase { let returnType = retType; @@ -971,7 +971,7 @@ let returnType = [{ ::llvm::APInt }]; } // Base class for unsigned integer attributes of fixed width that have a -// correpsonding C++ type. +// corresponding C++ type. class TypedUnsignedIntegerAttrBase : UnsignedIntegerAttrBase { let returnType = retType; diff --git a/mlir/include/mlir/Reducer/Passes/OpReducer.h b/mlir/include/mlir/Reducer/Passes/OpReducer.h --- a/mlir/include/mlir/Reducer/Passes/OpReducer.h +++ b/mlir/include/mlir/Reducer/Passes/OpReducer.h @@ -8,7 +8,7 @@ // // This file defines the OpReducer class. It defines a variant generator method // with the purpose of producing different variants by eliminating a -// parametarizable type of operations from the parent module. +// parameterizable type of operations from the parent module. // //===----------------------------------------------------------------------===// diff --git a/mlir/include/mlir/Support/IndentedOstream.h b/mlir/include/mlir/Support/IndentedOstream.h --- a/mlir/include/mlir/Support/IndentedOstream.h +++ b/mlir/include/mlir/Support/IndentedOstream.h @@ -51,7 +51,7 @@ } /// Re-indents by removing the leading whitespace from the first non-empty - /// line from every line of the the string, skipping over empty lines at the + /// line from every line of the string, skipping over empty lines at the /// start. raw_indented_ostream &reindent(StringRef str); diff --git a/mlir/integration_test/Dialect/Vector/CPU/test-create-mask-v4i1.mlir b/mlir/integration_test/Dialect/Vector/CPU/test-create-mask-v4i1.mlir --- a/mlir/integration_test/Dialect/Vector/CPU/test-create-mask-v4i1.mlir +++ b/mlir/integration_test/Dialect/Vector/CPU/test-create-mask-v4i1.mlir @@ -4,7 +4,7 @@ // RUN: FileCheck %s // NOTE: This is similar to test-create-mask.mlir, but with a different length, -// because the v4i1 vector specifially exposed bugs in the LLVM backend. +// because the v4i1 vector specifically exposed bugs in the LLVM backend. func @entry() { %c0 = constant 0 : index 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 @@ -351,7 +351,7 @@ } /// Add an inequality to the tableau. If coeffs is c_0, c_1, ... c_n, where n -/// is the curent number of variables, then the corresponding inequality is +/// is the current number of variables, then the corresponding inequality is /// c_n + c_0*x_0 + c_1*x_1 + ... + c_{n-1}*x_{n-1} >= 0. /// /// We add the inequality and mark it as restricted. We then try to make its @@ -367,7 +367,7 @@ } /// Add an equality to the tableau. If coeffs is c_0, c_1, ... c_n, where n -/// is the curent number of variables, then the corresponding equality is +/// is the current number of variables, then the corresponding equality is /// c_n + c_0*x_0 + c_1*x_1 + ... + c_{n-1}*x_{n-1} == 0. /// /// We simply add two opposing inequalities, which force the expression to @@ -383,7 +383,7 @@ unsigned Simplex::numVariables() const { return var.size(); } unsigned Simplex::numConstraints() const { return con.size(); } -/// Return a snapshot of the curent state. This is just the current size of the +/// Return a snapshot of the current state. This is just the current size of the /// undo log. unsigned Simplex::getSnapshot() const { return undoLog.size(); } diff --git a/mlir/lib/Bindings/Python/IRModules.cpp b/mlir/lib/Bindings/Python/IRModules.cpp --- a/mlir/lib/Bindings/Python/IRModules.cpp +++ b/mlir/lib/Bindings/Python/IRModules.cpp @@ -326,7 +326,7 @@ }; /// Blocks are exposed by the C-API as a forward-only linked list. In Python, -/// we present them as a more full-featured list-like container but optimzie +/// we present them as a more full-featured list-like container but optimize /// it for forward iteration. Blocks are always owned by a region. class PyBlockList { public: @@ -424,7 +424,7 @@ /// Operations are exposed by the C-API as a forward-only linked list. In /// Python, we present them as a more full-featured list-like container but -/// optimzie it for forward iteration. Iterable operations are always owned +/// optimize it for forward iteration. Iterable operations are always owned /// by a block. class PyOperationList { public: diff --git a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp --- a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp +++ b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp @@ -34,7 +34,7 @@ ConversionPatternRewriter &rewriter) const override; }; -/// Pattern lowering subgoup size/id to loading SPIR-V invocation +/// Pattern lowering subgroup size/id to loading SPIR-V invocation /// builtin variables. template class SingleDimLaunchConfigConversion : public SPIRVOpLowering { diff --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp --- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp +++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp @@ -108,7 +108,7 @@ loc, dstType, rewriter.getFloatAttr(floatType, value)); } -/// Utility function for bitfiled ops: +/// Utility function for bitfield ops: /// - `BitFieldInsert` /// - `BitFieldSExtract` /// - `BitFieldUExtract` @@ -163,7 +163,7 @@ return value; } -/// Utility function for bitfiled ops: `BitFieldInsert`, `BitFieldSExtract` and +/// Utility function for bitfield ops: `BitFieldInsert`, `BitFieldSExtract` and /// `BitFieldUExtract`. /// Broadcast `Offset` and `Count` to match the type of `Base`. If `Base` is of /// a vector type, construct a vector that has: @@ -971,8 +971,8 @@ Location loc = loopOp.getLoc(); - // Split the current block after `spv.loop`. The remaing ops will be used in - // `endBlock`. + // Split the current block after `spv.loop`. The remaining ops will be used + // in `endBlock`. Block *currentBlock = rewriter.getBlock(); auto position = Block::iterator(loopOp); Block *endBlock = rewriter.splitBlock(currentBlock, position); @@ -1028,7 +1028,7 @@ Location loc = op.getLoc(); - // Split the current block after `spv.selection`. The remaing ops will be + // Split the current block after `spv.selection`. The remaining ops will be // used in `continueBlock`. auto *currentBlock = rewriter.getInsertionBlock(); rewriter.setInsertionPointAfter(op); @@ -1387,7 +1387,7 @@ // Entry points and execution mode // Module generated from SPIR-V could have other "internal" functions, so - // having entry point and execution mode metadat can be useful. For now, + // having entry point and execution mode metadata can be useful. For now, // simply remove them. // TODO: Support EntryPoint/ExecutionMode properly. ErasePattern, ErasePattern, diff --git a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp --- a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp +++ b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp @@ -132,7 +132,7 @@ }, [&](OpBuilder &b, Location loc) { // The broadcasting logic is: - // - if one extent (here we arbitrariliy choose the extent from + // - if one extent (here we arbitrarily choose the extent from // the greater-rank operand) is equal to 1, then take the extent // from the other operand // - otherwise, take the extent as-is. 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 @@ -249,7 +249,7 @@ LLVM::LLVMType LLVMTypeConverter::convertFunctionSignature( FunctionType funcTy, bool isVariadic, LLVMTypeConverter::SignatureConversion &result) { - // Select the argument converter depending on the calling convetion. + // Select the argument converter depending on the calling convention. auto funcArgConverter = options.useBarePtrCallConv ? barePtrFuncArgTypeConverter : structFuncArgTypeConverter; diff --git a/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp b/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp --- a/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp +++ b/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp @@ -414,7 +414,7 @@ ConversionPatternRewriter &rewriter) const override; }; -/// Converts integer compare operation on i1 type opearnds to SPIR-V ops. +/// Converts integer compare operation on i1 type operands to SPIR-V ops. class BoolCmpIOpPattern final : public SPIRVOpLowering { public: using SPIRVOpLowering::SPIRVOpLowering; 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 @@ -100,7 +100,7 @@ return failure(); // Note that the dataPtr starts at the offset address specified by - // indices, so no need to calculat offset size in bytes again in + // indices, so no need to calculate offset size in bytes again in // the MUBUF instruction. Value dataPtr = getDataPtr(loc, memRefType, adaptor.memref(), adaptor.indices(), rewriter); diff --git a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp --- a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp +++ b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp @@ -84,7 +84,7 @@ return false; for (Value operand : op->getOperands()) { - // It is already visisble in the kernel, keep going. + // It is already visible in the kernel, keep going. if (availableValues.count(operand)) continue; // Else check whether it can be made available via sinking or already is a 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 @@ -79,7 +79,7 @@ bool isIdentified() const { return identified; } bool isPacked() const { assert(!isIdentified() && - "'packed' bit is not part of the key for identified stucts"); + "'packed' bit is not part of the key for identified structs"); return packed; } bool isOpaque() const { @@ -196,7 +196,7 @@ /// Constructs the storage from the given key. This sets up the uniquing key /// components and optionally the mutable component if they construction key /// has the relevant information. In the latter case, the struct is considered - /// as initalized and can no longer be mutated. + /// as initialized and can no longer be mutated. LLVMStructTypeStorage(const KeyTy &key) { if (!key.isIdentified()) { ArrayRef types = key.getTypeList(); diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp --- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp @@ -711,10 +711,10 @@ convertReassociationIndicesToMaps( OpBuilder &b, ArrayRef reassociationIndices) { SmallVector, 2> reassociationMaps; - for (const auto &indicies : reassociationIndices) { + for (const auto &indices : reassociationIndices) { SmallVector reassociationMap; - reassociationMap.reserve(indicies.size()); - for (int64_t index : indicies) + reassociationMap.reserve(indices.size()); + for (int64_t index : indices) reassociationMap.push_back(b.getAffineDimExpr(index)); reassociationMaps.push_back(std::move(reassociationMap)); } diff --git a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp @@ -147,7 +147,7 @@ } // If consumer is an indexed_generic op, map the indices to the block - // arguments directly. Otherwise, add the same type of arugment and map to + // arguments directly. Otherwise, add the same type of argument and map to // it. if (consumerArg.index() < numConsumerIndices) { mapper.map(consumerArg.value(), diff --git a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp @@ -80,7 +80,7 @@ } } -/// Return true if we can prove that the transfer operations access dijoint +/// Return true if we can prove that the transfer operations access disjoint /// memory. static bool isDisjoint(VectorTransferOpInterface transferA, VectorTransferOpInterface transferB) { diff --git a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp @@ -161,7 +161,7 @@ CopyCallbackFn copyInFn; CopyCallbackFn copyOutFn; - /// Allow the use of dynamicaly-sized buffers. + /// Allow the use of dynamically-sized buffers. bool dynamicBuffers; /// Alignment of promoted buffer. Optional alignment; diff --git a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp @@ -302,7 +302,7 @@ } // cooperative-matrix-type ::= `!spv.coopmatrix` `<` element-type ',' scope ',' -// rows ',' coloumns>` +// rows ',' columns>` static Type parseCooperativeMatrixType(SPIRVDialect const &dialect, DialectAsmParser &parser) { if (parser.parseLess()) @@ -621,7 +621,7 @@ StringRef identifier; - // Check if this is an idenitifed struct type. + // Check if this is an identified struct type. if (succeeded(parser.parseOptionalKeyword(&identifier))) { // Check if this is a possible recursive reference. if (succeeded(parser.parseOptionalGreater())) { diff --git a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp @@ -217,9 +217,9 @@ } // TODO Make sure to merge this and the previous function into one template -// parameterized by memroy access attribute name and alignment. Doing so now +// parameterized by memory access attribute name and alignment. Doing so now // results in VS2017 in producing an internal error (at the call site) that's -// not detailed enough to understand what is happenning. +// not detailed enough to understand what is happening. static ParseResult parseSourceMemoryAccessAttributes(OpAsmParser &parser, OperationState &state) { // Parse an optional list of attributes staring with '[' @@ -274,9 +274,9 @@ } // TODO Make sure to merge this and the previous function into one template -// parameterized by memroy access attribute name and alignment. Doing so now +// parameterized by memory access attribute name and alignment. Doing so now // results in VS2017 in producing an internal error (at the call site) that's -// not detailed enough to understand what is happenning. +// not detailed enough to understand what is happening. template static void printSourceMemoryAccessAttribute( MemoryOpTy memoryOp, OpAsmPrinter &printer, @@ -393,9 +393,9 @@ } // TODO Make sure to merge this and the previous function into one template -// parameterized by memroy access attribute name and alignment. Doing so now +// parameterized by memory access attribute name and alignment. Doing so now // results in VS2017 in producing an internal error (at the call site) that's -// not detailed enough to understand what is happenning. +// not detailed enough to understand what is happening. template static LogicalResult verifySourceMemoryAccessAttribute(MemoryOpTy memoryOp) { // ODS checks for attributes values. Just need to verify that if the diff --git a/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp b/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp @@ -810,7 +810,7 @@ std::tuple, ArrayRef, ArrayRef>; - /// For idetified structs, return true if the given key contains the same + /// For identified structs, return true if the given key contains the same /// identifier. /// /// For literal structs, return true if the given key contains a matching list diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp @@ -1033,7 +1033,7 @@ LogicalResult Serializer::processType(Location loc, Type type, uint32_t &typeID) { // Maintains a set of names for nested identified struct types. This is used - // to properly seialize resursive references. + // to properly serialize resursive references. llvm::SetVector serializationCtx; return processTypeImpl(loc, type, typeID, serializationCtx); } @@ -1170,7 +1170,7 @@ spirv::Opcode::OpTypeForwardPointer, forwardPtrOperands); - // 2. Find the the pointee (enclosing) struct. + // 2. Find the pointee (enclosing) struct. auto structType = spirv::StructType::getIdentified( module.getContext(), pointeeStruct.getIdentifier()); 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 @@ -878,7 +878,7 @@ } int64_t position = linearize(extractedPos, strides); - // Then extract the strides assoociated to the shapeCast op vector source and + // Then extract the strides associated to the shapeCast op vector source and // delinearize the position using those strides. SmallVector newStrides; int64_t numDimension = diff --git a/mlir/lib/Dialect/Vector/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/VectorTransforms.cpp --- a/mlir/lib/Dialect/Vector/VectorTransforms.cpp +++ b/mlir/lib/Dialect/Vector/VectorTransforms.cpp @@ -2178,7 +2178,7 @@ /// 2. else return a new MemRefType obtained by iterating over the shape and /// strides and: /// a. keeping the ones that are static and equal across `aT` and `bT`. -/// b. using a dynamic shape and/or stride for the dimeniosns that don't +/// b. using a dynamic shape and/or stride for the dimensions that don't /// agree. static MemRefType getCastCompatibleMemRefType(MemRefType aT, MemRefType bT) { if (MemRefCastOp::areCastCompatible(aT, bT)) 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 @@ -292,8 +292,8 @@ /// operations. llvm::StringMap registeredOperations; - /// Identifers are uniqued by string value and use the internal string set for - /// storage. + /// Identifiers are uniqued by string value and use the internal string set + /// for storage. llvm::StringSet identifiers; /// A thread local cache of identifiers to reduce lock contention. ThreadLocalCache *>> diff --git a/mlir/lib/IR/PatternMatch.cpp b/mlir/lib/IR/PatternMatch.cpp --- a/mlir/lib/IR/PatternMatch.cpp +++ b/mlir/lib/IR/PatternMatch.cpp @@ -140,7 +140,7 @@ assert(source->hasNoSuccessors() && "expected 'source' to have no successors"); - // Split the block containing 'op' into two, one containg all operations + // Split the block containing 'op' into two, one containing all operations // before 'op' (prologue) and another (epilogue) containing 'op' and all // operations after it. Block *prologue = op->getBlock(); diff --git a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp --- a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp +++ b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp @@ -167,7 +167,7 @@ for (unsigned regionNo : llvm::seq(0U, op->getNumRegions())) { Region ®ion = op->getRegion(regionNo); - // Since the interface cannnot distinguish between different ReturnLike + // Since the interface cannot distinguish between different ReturnLike // ops within the region branching to different successors, all ReturnLike // ops in this region should have the same operand types. We will then use // one of them as the representative for type matching. diff --git a/mlir/lib/Interfaces/VectorInterfaces.cpp b/mlir/lib/Interfaces/VectorInterfaces.cpp --- a/mlir/lib/Interfaces/VectorInterfaces.cpp +++ b/mlir/lib/Interfaces/VectorInterfaces.cpp @@ -14,5 +14,5 @@ // VectorUnroll Interfaces //===----------------------------------------------------------------------===// -/// Include the definitions of the VectorUntoll interfaces. +/// Include the definitions of the VectorUnroll interfaces. #include "mlir/Interfaces/VectorInterfaces.cpp.inc" diff --git a/mlir/lib/Reducer/Tester.cpp b/mlir/lib/Reducer/Tester.cpp --- a/mlir/lib/Reducer/Tester.cpp +++ b/mlir/lib/Reducer/Tester.cpp @@ -9,7 +9,7 @@ // This file defines the Tester class used in the MLIR Reduce tool. // // A Tester object is passed as an argument to the reduction passes and it is -// used to run the interestigness testing script on the different generated +// used to run the interestingness testing script on the different generated // reduced variants of the test case. // //===----------------------------------------------------------------------===// diff --git a/mlir/lib/TableGen/CMakeLists.txt b/mlir/lib/TableGen/CMakeLists.txt --- a/mlir/lib/TableGen/CMakeLists.txt +++ b/mlir/lib/TableGen/CMakeLists.txt @@ -5,7 +5,7 @@ # component dependencies, LLVM_LINK_LLVM_DYLIB tends to introduce a # dependence on libLLVM.so) However, it must also be linkable against # libMLIR.so in some contexts (see unittests/Tablegen, for instance, which -# has a dependance on MLIRIR, which must depend on libLLVM.so). This works +# has a dependence on MLIRIR, which must depend on libLLVM.so). This works # in this special case because this library is static. llvm_add_library(MLIRTableGen STATIC diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp --- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp @@ -487,7 +487,7 @@ return success(); }) .Case([&](omp::FlushOp) { - // No support in Openmp runtime funciton (__kmpc_flush) to accept + // No support in Openmp runtime function (__kmpc_flush) to accept // the argument list. // OpenMP standard states the following: // "An implementation may implement a flush with a list by ignoring diff --git a/mlir/lib/Transforms/Bufferize.cpp b/mlir/lib/Transforms/Bufferize.cpp --- a/mlir/lib/Transforms/Bufferize.cpp +++ b/mlir/lib/Transforms/Bufferize.cpp @@ -148,7 +148,7 @@ } /// This method returns the mapping values list. The unknown result values - /// that only their indicies are available are replaced with their values. + /// that only their indices are available are replaced with their values. void getMappingValues(ValueRange valuesToReplaceIndices, SmallVectorImpl &values) { // Append available values to the list. 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 @@ -9,7 +9,7 @@ // This transformation pass performs a sparse conditional constant propagation // in MLIR. It identifies values known to be constant, propagates that // information throughout the IR, and replaces them. This is done with an -// optimisitic dataflow analysis that assumes that all values are constant until +// optimistic dataflow analysis that assumes that all values are constant until // proven otherwise. // //===----------------------------------------------------------------------===// @@ -27,7 +27,7 @@ namespace { /// This class represents a single lattice value. A lattive value corresponds to -/// the various different states that a value in the SCCP dataflow anaylsis can +/// the various different states that a value in the SCCP dataflow analysis can /// take. See 'Kind' below for more details on the different states a value can /// take. class LatticeValue { 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 @@ -522,7 +522,7 @@ } //===----------------------------------------------------------------------===// -// Rewriter and Transation State +// Rewriter and Translation State //===----------------------------------------------------------------------===// namespace { /// This class contains a snapshot of the current conversion rewriter state. diff --git a/mlir/lib/Transforms/Utils/LoopUtils.cpp b/mlir/lib/Transforms/Utils/LoopUtils.cpp --- a/mlir/lib/Transforms/Utils/LoopUtils.cpp +++ b/mlir/lib/Transforms/Utils/LoopUtils.cpp @@ -694,13 +694,13 @@ AffineForOp newLoop, Value tileSize) { OperandRange newLbOperands = origLoop.getLowerBoundOperands(); - // The lower bounds for inter-tile loops are same as the correspondig lower + // The lower bounds for inter-tile loops are same as the corresponding lower // bounds of original loops. newLoop.setLowerBound(newLbOperands, origLoop.getLowerBoundMap()); // The new upper bound map for inter-tile loops, assuming constant lower - // bounds, are now originalLowerBound + ceildiv((orignalUpperBound - - // originalLowerBound), tiling paramter); where tiling parameter is the + // bounds, are now originalLowerBound + ceildiv((originalUpperBound - + // originalLowerBound), tiling parameter); where tiling parameter is the // respective tile size for that loop. For e.g. if the original ubmap was // ()->(1024), the new map will be // ()[s0]->(ceildiv((1024 -lb) % s0)), where s0 is the tiling parameter. @@ -757,7 +757,7 @@ // ubmap has only one result expression. For e.g. // affine.for %i = 5 to %ub // - // A symbol operand is added which represents the tiling paramater. The + // A symbol operand is added which represents the tiling parameter. The // new loop bounds here will be like ()[s0, s1] -> ((s0 - 5) ceildiv s1 + 5) // where 's0' is the original upper bound and 's1' is the tiling // parameter. 2.) When ubMap has more than one result expression. For e.g. diff --git a/mlir/test/CAPI/ir.c b/mlir/test/CAPI/ir.c --- a/mlir/test/CAPI/ir.c +++ b/mlir/test/CAPI/ir.c @@ -981,7 +981,7 @@ !mlirAffineExprIsFunctionOfDim(affineCeilDivExpr, 5)) return 8; - // Tests 'IsA' methods of affine binary operaion expression. + // Tests 'IsA' methods of affine binary operation expression. if (!mlirAffineExprIsAAdd(affineAddExpr)) return 9; diff --git a/mlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir b/mlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir --- a/mlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir +++ b/mlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir @@ -111,9 +111,9 @@ // ----- -// Test case: Testing BufferAssginmnetCallOpConverter to see if it matches with the +// Test case: Testing BufferAssignmentCallOpConverter to see if it matches with the // signature of the new signature of the callee function when there are tuple typed -// args and results. BufferAssginmentTypeConverter is set to flatten tuple typed +// args and results. BufferAssignmentTypeConverter is set to flatten tuple typed // arguments. The tuple typed values should be decomposed and composed using // get_tuple_element and make_tuple operations of test dialect. Tensor types are // converted to Memref. Memref typed function results remain as function results. @@ -158,10 +158,10 @@ // ----- -// Test case: Testing BufferAssginmnetFuncOpConverter and -// BufferAssginmentReturnOpConverter to see if the return operation matches with +// Test case: Testing BufferAssignmentFuncOpConverter and +// BufferAssignmentReturnOpConverter to see if the return operation matches with // the new function signature when there are tuple typed args and results. -// BufferAssginmentTypeConverter is set to flatten tuple typed arguments. The tuple +// BufferAssignmentTypeConverter is set to flatten tuple typed arguments. The tuple // typed values should be decomposed and composed using get_tuple_element and // make_tuple operations of test dialect. Tensor types are converted to Memref. // Memref typed function results remain as function results. diff --git a/mlir/test/Transforms/buffer-placement-preparation.mlir b/mlir/test/Transforms/buffer-placement-preparation.mlir --- a/mlir/test/Transforms/buffer-placement-preparation.mlir +++ b/mlir/test/Transforms/buffer-placement-preparation.mlir @@ -302,9 +302,9 @@ // ----- -// Test case: Testing BufferAssginmnetCallOpConverter to see if it matches with the +// Test case: Testing BufferAssignmentCallOpConverter to see if it matches with the // signature of the new signature of the callee function when there are tuple typed -// args and results. BufferAssginmentTypeConverter is set to flatten tuple typed +// args and results. BufferAssignmentTypeConverter is set to flatten tuple typed // arguments. The tuple typed values should be decomposed and composed using // get_tuple_element and make_tuple operations of test dialect. Tensor types are // converted to Memref. Memref typed function results are appended to the function @@ -359,10 +359,10 @@ // ----- -// Test case: Testing BufferAssginmnetFuncOpConverter and -// BufferAssginmentReturnOpConverter to see if the return operation matches with +// Test case: Testing BufferAssignmentFuncOpConverter and +// BufferAssignmentReturnOpConverter to see if the return operation matches with // the new function signature when there are tuple typed args and results. -// BufferAssginmentTypeConverter is set to flatten tuple typed arguments. The tuple +// BufferAssignmentTypeConverter is set to flatten tuple typed arguments. The tuple // typed values should be decomposed and composed using get_tuple_element and // make_tuple operations of test dialect. Tensor types are converted to Memref. // Memref typed function results are appended to the function arguments list. diff --git a/mlir/test/Transforms/normalize-memrefs-ops.mlir b/mlir/test/Transforms/normalize-memrefs-ops.mlir --- a/mlir/test/Transforms/normalize-memrefs-ops.mlir +++ b/mlir/test/Transforms/normalize-memrefs-ops.mlir @@ -26,7 +26,7 @@ return } -// Same test with op_nonnorm, with maps in the argmentets and the operations in the function. +// Same test with op_nonnorm, with maps in the arguments and the operations in the function. // CHECK-LABEL: test_nonnorm // CHECK-SAME: (%[[ARG0:[a-z0-9]*]]: memref<1x16x14x14xf32, #map0>) 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 @@ -90,7 +90,7 @@ let parameters = ( ins "SignednessSemantics":$signedness, - TypeParameter<"unsigned", "Bitwdith of integer">:$width + TypeParameter<"unsigned", "Bitwidth of integer">:$width ); // DECL-LABEL: IntegerType: public ::mlir::Type diff --git a/mlir/tools/mlir-reduce/Passes/OpReducer.cpp b/mlir/tools/mlir-reduce/Passes/OpReducer.cpp --- a/mlir/tools/mlir-reduce/Passes/OpReducer.cpp +++ b/mlir/tools/mlir-reduce/Passes/OpReducer.cpp @@ -8,7 +8,7 @@ // // This file defines the OpReducer class. It defines a variant generator method // with the purpose of producing different variants by eliminating a -// parametarizable type of operations from the parent module. +// parameterizable type of operations from the parent module. // //===----------------------------------------------------------------------===// #include "mlir/Reducer/Passes/OpReducer.h" diff --git a/mlir/tools/mlir-reduce/ReductionNode.cpp b/mlir/tools/mlir-reduce/ReductionNode.cpp --- a/mlir/tools/mlir-reduce/ReductionNode.cpp +++ b/mlir/tools/mlir-reduce/ReductionNode.cpp @@ -39,7 +39,7 @@ SmallString<128> filepath; int fd; - // Print module to temprary file. + // Print module to temporary file. std::error_code ec = llvm::sys::fs::createTemporaryFile("mlir-reduce", "mlir", fd, filepath); diff --git a/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp b/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp --- a/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp +++ b/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp @@ -26,7 +26,7 @@ reduced.getBody()->getOperations()); } -/// Update the the smallest node traversed so far in the reduction tree and +/// Update the smallest node traversed so far in the reduction tree and /// print the debugging information for the currNode being traversed. void ReductionTreeUtils::updateSmallestNode(ReductionNode *currNode, ReductionNode *&smallestNode, @@ -95,7 +95,7 @@ } /// Create the specified number of variants by applying the transform method -/// to different ranges of indices in the parent module. The isDeletion bolean +/// to different ranges of indices in the parent module. The isDeletion boolean /// specifies if the transformation is the deletion of indices. void ReductionTreeUtils::createVariants( ReductionNode *parent, const Tester &test, int numVariants, 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 @@ -325,7 +325,7 @@ // attribute (the generated function call returns an Attribute); // - operandGet corresponds to the name of the function with which to retrieve // an operand (the generated function call returns an OperandRange); -// - reultGet corresponds to the name of the function to get an result (the +// - resultGet corresponds to the name of the function to get an result (the // generated function call returns a ValueRange); static void populateSubstitutions(const Operator &op, const char *attrGet, const char *operandGet, const char *resultGet, @@ -570,7 +570,7 @@ PrintWarning( op.getLoc(), formatv( - "op has non-materialzable derived attributes '{0}', skipping", + "op has non-materializable derived attributes '{0}', skipping", os.str())); body << formatv(" emitOpError(\"op has non-materializable derived " "attributes '{0}'\");\n", @@ -965,7 +965,7 @@ llvm_unreachable("unhandled TypeParamKind"); }; - // Some of the build methods generated here may be amiguous, but TableGen's + // Some of the build methods generated here may be ambiguous, but TableGen's // ambiguous function detection will elide those ones. for (auto attrType : attrBuilderType) { emit(attrType, TypeParamKind::Separate, /*inferType=*/false);