[Mlir-commits] [mlir] 41b09f4 - [mlir] NFC: fix trivial typos

Kazuaki Ishizaki llvmlistbot at llvm.org
Wed Oct 28 12:05:52 PDT 2020


Author: Kazuaki Ishizaki
Date: 2020-10-29T04:05:22+09:00
New Revision: 41b09f4efff1a9cd82af2d7d7eeb9916a88332e5

URL: https://github.com/llvm/llvm-project/commit/41b09f4efff1a9cd82af2d7d7eeb9916a88332e5
DIFF: https://github.com/llvm/llvm-project/commit/41b09f4efff1a9cd82af2d7d7eeb9916a88332e5.diff

LOG: [mlir] NFC: fix trivial typos
fix typos in comments and documents

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D90089

Added: 
    

Modified: 
    mlir/docs/OpDefinitions.md
    mlir/include/mlir-c/Diagnostics.h
    mlir/include/mlir-c/StandardAttributes.h
    mlir/include/mlir/Dialect/Async/IR/AsyncOps.td
    mlir/include/mlir/IR/OpBase.td
    mlir/include/mlir/Reducer/Passes/OpReducer.h
    mlir/include/mlir/Support/IndentedOstream.h
    mlir/integration_test/Dialect/Vector/CPU/test-create-mask-v4i1.mlir
    mlir/lib/Analysis/Presburger/Simplex.cpp
    mlir/lib/Bindings/Python/IRModules.cpp
    mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
    mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
    mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
    mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
    mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
    mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
    mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    mlir/lib/Dialect/Vector/VectorOps.cpp
    mlir/lib/Dialect/Vector/VectorTransforms.cpp
    mlir/lib/IR/MLIRContext.cpp
    mlir/lib/IR/PatternMatch.cpp
    mlir/lib/Interfaces/ControlFlowInterfaces.cpp
    mlir/lib/Interfaces/VectorInterfaces.cpp
    mlir/lib/Reducer/Tester.cpp
    mlir/lib/TableGen/CMakeLists.txt
    mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    mlir/lib/Transforms/Bufferize.cpp
    mlir/lib/Transforms/SCCP.cpp
    mlir/lib/Transforms/Utils/DialectConversion.cpp
    mlir/lib/Transforms/Utils/LoopUtils.cpp
    mlir/test/CAPI/ir.c
    mlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir
    mlir/test/Transforms/buffer-placement-preparation.mlir
    mlir/test/Transforms/normalize-memrefs-ops.mlir
    mlir/test/mlir-tblgen/typedefs.td
    mlir/tools/mlir-reduce/Passes/OpReducer.cpp
    mlir/tools/mlir-reduce/ReductionNode.cpp
    mlir/tools/mlir-reduce/ReductionTreeUtils.cpp
    mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/docs/OpDefinitions.md b/mlir/docs/OpDefinitions.md
index d24f4711da5f..f82a34dc6c9e 100644
--- a/mlir/docs/OpDefinitions.md
+++ b/mlir/docs/OpDefinitions.md
@@ -797,7 +797,7 @@ A custom directive has two main parts: The `UserDirective` and the `Params`. A
 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<MyDirective>(...)`
-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 @@ def IntegerType : Test_Type<"TestInteger"> {
 
 The name of the C++ class which gets generated defaults to
 `<classParamName>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 @@ The default storage constructor blindly copies fields by value. It does not
 know anything about the types. In this case, the ArrayRef<int> 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
index 40ea6d8c405a..4c0484b90904 100644
--- 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
index 6227c8ae89ed..ab6eca0e94ab 100644
--- a/mlir/include/mlir-c/StandardAttributes.h
+++ b/mlir/include/mlir-c/StandardAttributes.h
@@ -203,7 +203,7 @@ MlirAttribute mlirSymbolRefAttrGet(MlirContext ctx, intptr_t length,
  * 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
index 83f968fa6232..a1e489007f0f 100644
--- a/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td
+++ b/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td
@@ -43,7 +43,7 @@ def Async_ExecuteOp :
     (`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
index 48412e9229a1..11daa8dafdcf 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -913,7 +913,7 @@ class SignlessIntegerAttrBase<I attrValType, string descr> :
   let returnType = [{ ::llvm::APInt }];
 }
 // Base class for signless integer attributes of fixed width that have a
-// correpsonding C++ type.
+// corresponding C++ type.
 class TypedSignlessIntegerAttrBase<I attrValType, string retType, string descr>
     : SignlessIntegerAttrBase<attrValType, descr> {
   let returnType = retType;
@@ -942,7 +942,7 @@ class SignedIntegerAttrBase<SI attrValType, string descr> :
   let returnType = [{ ::llvm::APInt }];
 }
 // Base class for signed integer attributes of fixed width that have a
-// correpsonding C++ type.
+// corresponding C++ type.
 class TypedSignedIntegerAttrBase<SI attrValType, string retType, string descr>
     : SignedIntegerAttrBase<attrValType, descr> {
   let returnType = retType;
@@ -971,7 +971,7 @@ class UnsignedIntegerAttrBase<UI attrValType, string descr> :
   let returnType = [{ ::llvm::APInt }];
 }
 // Base class for unsigned integer attributes of fixed width that have a
-// correpsonding C++ type.
+// corresponding C++ type.
 class TypedUnsignedIntegerAttrBase<UI attrValType, string retType, string descr>
     : UnsignedIntegerAttrBase<attrValType, descr> {
   let returnType = retType;

diff  --git a/mlir/include/mlir/Reducer/Passes/OpReducer.h b/mlir/include/mlir/Reducer/Passes/OpReducer.h
index 5e55f8c84e1c..b16b5c0d763a 100644
--- 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 
diff erent 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
index 20161c1f3898..c901bb6ae2dd 100644
--- a/mlir/include/mlir/Support/IndentedOstream.h
+++ b/mlir/include/mlir/Support/IndentedOstream.h
@@ -51,7 +51,7 @@ class raw_indented_ostream : public raw_ostream {
   }
 
   /// 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
index a7eb14ae484d..8427928fa82f 100644
--- 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 
diff erent 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
index 65a8a689164f..47e199baba2a 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -351,7 +351,7 @@ void Simplex::markEmpty() {
 }
 
 /// 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 @@ void Simplex::addInequality(ArrayRef<int64_t> coeffs) {
 }
 
 /// 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 @@ void Simplex::addEquality(ArrayRef<int64_t> coeffs) {
 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
index 4a46d9161d76..0ec5b566a3b5 100644
--- a/mlir/lib/Bindings/Python/IRModules.cpp
+++ b/mlir/lib/Bindings/Python/IRModules.cpp
@@ -326,7 +326,7 @@ class PyBlockIterator {
 };
 
 /// 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 @@ class PyOperationIterator {
 
 /// 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
index ee1e4131854f..3724879d9329 100644
--- a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
+++ b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
@@ -34,7 +34,7 @@ class LaunchConfigConversion : public SPIRVOpLowering<SourceOp> {
                   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 <typename SourceOp, spirv::BuiltIn builtin>
 class SingleDimLaunchConfigConversion : public SPIRVOpLowering<SourceOp> {

diff  --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
index 6a5ea1bb06c9..db6a2471a8b4 100644
--- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
+++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
@@ -108,7 +108,7 @@ static Value createFPConstant(Location loc, Type srcType, Type dstType,
       loc, dstType, rewriter.getFloatAttr(floatType, value));
 }
 
-/// Utility function for bitfiled ops:
+/// Utility function for bitfield ops:
 ///   - `BitFieldInsert`
 ///   - `BitFieldSExtract`
 ///   - `BitFieldUExtract`
@@ -163,7 +163,7 @@ static Value optionallyBroadcast(Location loc, Value value, Type srcType,
   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 @@ class LoopPattern : public SPIRVToLLVMConversion<spirv::LoopOp> {
 
     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 @@ class SelectionPattern : public SPIRVToLLVMConversion<spirv::SelectionOp> {
 
     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 @@ void mlir::populateSPIRVToLLVMConversionPatterns(
 
       // 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<spirv::EntryPointOp>, ErasePattern<spirv::ExecutionModeOp>,

diff  --git a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
index a63322522e64..0c300c4f9cc5 100644
--- a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
+++ b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
@@ -132,7 +132,7 @@ LogicalResult BroadcastOpConverter::matchAndRewrite(
             },
             [&](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
index 2fcc8eb8f6fe..3932e77ef5e7 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -249,7 +249,7 @@ SmallVector<Type, 2> LLVMTypeConverter::convertUnrankedMemRefSignature() {
 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
index 583f7836ae88..8736ad4f3343 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
+++ b/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
@@ -414,7 +414,7 @@ class CmpFOpPattern final : public SPIRVOpLowering<CmpFOp> {
                   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<CmpIOp> {
 public:
   using SPIRVOpLowering<CmpIOp>::SPIRVOpLowering;

diff  --git a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
index f61f896feae2..317cf322e3e0 100644
--- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
+++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
@@ -100,7 +100,7 @@ class VectorTransferConversion : public ConvertToLLVMPattern {
       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
index 171d50c3e0da..d504530a9ad7 100644
--- a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
@@ -84,7 +84,7 @@ extractBeneficiaryOps(Operation *op,
     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
index 3f2cc13299a4..1d147beafb40 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
+++ b/mlir/lib/Dialect/LLVMIR/IR/TypeDetail.h
@@ -79,7 +79,7 @@ struct LLVMStructTypeStorage : public TypeStorage {
     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 @@ struct LLVMStructTypeStorage : public TypeStorage {
   /// 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<LLVMType> types = key.getTypeList();

diff  --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 5e3ba1f95d9b..121961d7393a 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -711,10 +711,10 @@ static SmallVector<SmallVector<AffineExpr, 2>, 2>
 convertReassociationIndicesToMaps(
     OpBuilder &b, ArrayRef<ReassociationIndices> reassociationIndices) {
   SmallVector<SmallVector<AffineExpr, 2>, 2> reassociationMaps;
-  for (const auto &indicies : reassociationIndices) {
+  for (const auto &indices : reassociationIndices) {
     SmallVector<AffineExpr, 2> 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
index 59e2d4cc5673..d30713d76e36 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
@@ -147,7 +147,7 @@ static void generateFusedTensorOpRegion(PatternRewriter &rewriter,
     }
 
     // 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
index 180fe069b681..ba25eba95234 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
@@ -80,7 +80,7 @@ void mlir::linalg::hoistViewAllocOps(FuncOp func) {
   }
 }
 
-/// 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
index a5323f4b7687..e002336ed1c6 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
@@ -161,7 +161,7 @@ struct LinalgOpInstancePromotionOptions {
   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<unsigned> alignment;

diff  --git a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
index 9b64e7f05b5b..ac6d6150a826 100644
--- a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
+++ b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
@@ -302,7 +302,7 @@ static Type parseArrayType(SPIRVDialect const &dialect,
 }
 
 // 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 @@ static Type parseStructType(SPIRVDialect const &dialect,
 
   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
index c17490c05e6b..470a43596270 100644
--- a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
+++ b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
@@ -217,9 +217,9 @@ static ParseResult parseMemoryAccessAttributes(OpAsmParser &parser,
 }
 
 // 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 @@ static void printMemoryAccessAttribute(
 }
 
 // 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 <typename MemoryOpTy>
 static void printSourceMemoryAccessAttribute(
     MemoryOpTy memoryOp, OpAsmPrinter &printer,
@@ -393,9 +393,9 @@ static LogicalResult verifyMemoryAccessAttribute(MemoryOpTy memoryOp) {
 }
 
 // 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 <typename MemoryOpTy>
 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
index 73e5bb17ec38..6dc5a36ba178 100644
--- a/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
+++ b/mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
@@ -810,7 +810,7 @@ struct spirv::detail::StructTypeStorage : public TypeStorage {
       std::tuple<StringRef, ArrayRef<Type>, ArrayRef<StructType::OffsetInfo>,
                  ArrayRef<StructType::MemberDecorationInfo>>;
 
-  /// 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
index 6dea43452ec7..2f7403cfecd5 100644
--- a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
+++ b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
@@ -1033,7 +1033,7 @@ bool Serializer::isInterfaceStructPtrType(Type type) const {
 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<StringRef> serializationCtx;
   return processTypeImpl(loc, type, typeID, serializationCtx);
 }
@@ -1170,7 +1170,7 @@ LogicalResult Serializer::prepareBasicType(
                             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
index e2dabecea7ab..faae278ad6d4 100644
--- a/mlir/lib/Dialect/Vector/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/VectorOps.cpp
@@ -878,7 +878,7 @@ static Value foldExtractFromShapeCast(ExtractOp extractOp) {
   }
 
   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<int64_t, 4> newStrides;
   int64_t numDimension =

diff  --git a/mlir/lib/Dialect/Vector/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
index 8a9f7374d428..1d8d0c6fc60f 100644
--- a/mlir/lib/Dialect/Vector/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
@@ -2178,7 +2178,7 @@ LogicalResult mlir::vector::splitFullAndPartialTransferPrecondition(
 ///   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
index eec679c771f6..90c43154f27b 100644
--- a/mlir/lib/IR/MLIRContext.cpp
+++ b/mlir/lib/IR/MLIRContext.cpp
@@ -292,8 +292,8 @@ class MLIRContextImpl {
   /// operations.
   llvm::StringMap<AbstractOperation> 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<llvm::BumpPtrAllocator &> identifiers;
   /// A thread local cache of identifiers to reduce lock contention.
   ThreadLocalCache<llvm::StringMap<llvm::StringMapEntry<llvm::NoneType> *>>

diff  --git a/mlir/lib/IR/PatternMatch.cpp b/mlir/lib/IR/PatternMatch.cpp
index 02545e18642e..edd5e7b9d6d7 100644
--- a/mlir/lib/IR/PatternMatch.cpp
+++ b/mlir/lib/IR/PatternMatch.cpp
@@ -140,7 +140,7 @@ void PatternRewriter::mergeBlockBefore(Block *source, Operation *op,
   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
index 498486281c77..194a64576986 100644
--- a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+++ b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp
@@ -167,7 +167,7 @@ LogicalResult detail::verifyTypesAlongControlFlowEdges(Operation *op) {
   for (unsigned regionNo : llvm::seq(0U, op->getNumRegions())) {
     Region &region = op->getRegion(regionNo);
 
-    // Since the interface cannnot distinguish between 
diff erent ReturnLike
+    // Since the interface cannot distinguish between 
diff erent ReturnLike
     // ops within the region branching to 
diff erent 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
index 0f16b885ca2f..c16fad25b642 100644
--- a/mlir/lib/Interfaces/VectorInterfaces.cpp
+++ b/mlir/lib/Interfaces/VectorInterfaces.cpp
@@ -14,5 +14,5 @@ using namespace mlir;
 // 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
index 065c777b9195..3ca0e9393586 100644
--- 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 
diff erent generated
+// used to run the interestingness testing script on the 
diff erent generated
 // reduced variants of the test case.
 //
 //===----------------------------------------------------------------------===//

diff  --git a/mlir/lib/TableGen/CMakeLists.txt b/mlir/lib/TableGen/CMakeLists.txt
index af3900fc7581..a11473b9370c 100644
--- 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
index 3d5e091e58e6..4800d4daeddd 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -487,7 +487,7 @@ ModuleTranslation::convertOmpOperation(Operation &opInst,
         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
index dbfe990676de..d1f91090a62d 100644
--- a/mlir/lib/Transforms/Bufferize.cpp
+++ b/mlir/lib/Transforms/Bufferize.cpp
@@ -148,7 +148,7 @@ class CallOpResultMapping {
   }
 
   /// 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<Value> &values) {
     // Append available values to the list.

diff  --git a/mlir/lib/Transforms/SCCP.cpp b/mlir/lib/Transforms/SCCP.cpp
index 0a8f224f6fdd..effaae4b075b 100644
--- 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 @@ using namespace mlir;
 
 namespace {
 /// This class represents a single lattice value. A lattive value corresponds to
-/// the various 
diff erent states that a value in the SCCP dataflow anaylsis can
+/// the various 
diff erent states that a value in the SCCP dataflow analysis can
 /// take. See 'Kind' below for more details on the 
diff erent states a value can
 /// take.
 class LatticeValue {

diff  --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index d1a42fe0720d..c3f5d7869cc3 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -522,7 +522,7 @@ void ArgConverter::insertConversion(Block *newBlock,
 }
 
 //===----------------------------------------------------------------------===//
-// 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
index 201ba22e2959..0f49439c064b 100644
--- a/mlir/lib/Transforms/Utils/LoopUtils.cpp
+++ b/mlir/lib/Transforms/Utils/LoopUtils.cpp
@@ -694,13 +694,13 @@ static void setInterTileBoundsParametric(OpBuilder &b, AffineForOp origLoop,
                                          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 @@ static void setInterTileBoundsParametric(OpBuilder &b, AffineForOp origLoop,
     // 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
index 87c8b647e6a0..7a19b2dd8f69 100644
--- a/mlir/test/CAPI/ir.c
+++ b/mlir/test/CAPI/ir.c
@@ -981,7 +981,7 @@ int printAffineExpr(MlirContext ctx) {
       !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
index b9b5d8882f9c..dc08e8120f8d 100644
--- 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 @@ func @caller(%arg0: tensor<5xf32>) -> tensor<5xf32> {
 
 // -----
 
-// 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 @@ func @caller(%arg0: tuple<tensor<2xf32>,i1, tensor<5xf32>>) -> tuple<tensor<2xf3
 
 // -----
 
-// 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
index 772cb3b8efd1..2e41e8b26313 100644
--- a/mlir/test/Transforms/buffer-placement-preparation.mlir
+++ b/mlir/test/Transforms/buffer-placement-preparation.mlir
@@ -302,9 +302,9 @@ func @func_with_unranked_arg(%arg0: tensor<*xf32>) {
 
 // -----
 
-// 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 @@ func @caller(%arg0: tuple<tensor<2xf32>,i1, tensor<5xf32>>) -> tuple<tensor<2xf3
 
 // -----
 
-// 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
index b112752edf45..08ff4ce8f200 100644
--- a/mlir/test/Transforms/normalize-memrefs-ops.mlir
+++ b/mlir/test/Transforms/normalize-memrefs-ops.mlir
@@ -26,7 +26,7 @@ func @test_norm(%arg0 : memref<1x16x14x14xf32, #map0>) -> () {
     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
index 4fc7f3282bd7..ae459df4934d 100644
--- a/mlir/test/mlir-tblgen/typedefs.td
+++ b/mlir/test/mlir-tblgen/typedefs.td
@@ -90,7 +90,7 @@ def E_IntegerType : TestType<"Integer"> {
     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
index 0636e38ad886..8455b3831c42 100644
--- 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 
diff erent 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
index 2b2ce6ed0851..bd4ef51786ec 100644
--- a/mlir/tools/mlir-reduce/ReductionNode.cpp
+++ b/mlir/tools/mlir-reduce/ReductionNode.cpp
@@ -39,7 +39,7 @@ void ReductionNode::measureAndTest(const Tester &test) {
   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
index 13d35a258aff..820c19a4f667 100644
--- a/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp
+++ b/mlir/tools/mlir-reduce/ReductionTreeUtils.cpp
@@ -26,7 +26,7 @@ void ReductionTreeUtils::updateGoldenModule(ModuleOp &golden,
                                            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 @@ static std::vector<std::tuple<int, int>> getRanges(std::vector<bool> tSpace,
 }
 
 /// Create the specified number of variants by applying the transform method
-/// to 
diff erent ranges of indices in the parent module. The isDeletion bolean
+/// to 
diff erent 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
index e5cd9f560ddc..737c36f07e46 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -325,7 +325,7 @@ class OpEmitter {
 //   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 @@ void OpEmitter::genAttrGetters() {
         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 @@ void OpEmitter::genSeparateArgParamBuilder() {
     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);


        


More information about the Mlir-commits mailing list