[mlir] NFC: fix trivial typos
authorKazuaki Ishizaki <ishizaki@jp.ibm.com>
Wed, 28 Oct 2020 19:03:15 +0000 (04:03 +0900)
committerKazuaki Ishizaki <ishizaki@jp.ibm.com>
Wed, 28 Oct 2020 19:05:22 +0000 (04:05 +0900)
fix typos in comments and documents

Reviewed By: jpienaar

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

48 files changed:
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

index d24f471..f82a34d 100644 (file)
@@ -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
index 40ea6d8..4c0484b 100644 (file)
@@ -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;
index 6227c8a..ab6eca0 100644 (file)
@@ -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);
 
index 83f968f..a1e4890 100644 (file)
@@ -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:
index 48412e9..11daa8d 100644 (file)
@@ -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;
index 5e55f8c..b16b5c0 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
 
index 20161c1..c901bb6 100644 (file)
@@ -51,7 +51,7 @@ public:
   }
 
   /// 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);
 
index a7eb14a..8427928 100644 (file)
@@ -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
index 65a8a68..47e199b 100644 (file)
@@ -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(); }
 
index 4a46d91..0ec5b56 100644 (file)
@@ -326,7 +326,7 @@ private:
 };
 
 /// 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 @@ private:
 
 /// 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:
index ee1e413..3724879 100644 (file)
@@ -34,7 +34,7 @@ public:
                   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> {
index 6a5ea1b..db6a247 100644 (file)
@@ -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 @@ public:
 
     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 @@ public:
 
     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>,
index a633225..0c300c4 100644 (file)
@@ -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.
index 2fcc8eb..3932e77 100644 (file)
@@ -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;
index 583f783..8736ad4 100644 (file)
@@ -414,7 +414,7 @@ public:
                   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;
index f61f896..317cf32 100644 (file)
@@ -100,7 +100,7 @@ public:
       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);
index 171d50c..d504530 100644 (file)
@@ -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
index 3f2cc13..1d147be 100644 (file)
@@ -79,7 +79,7 @@ public:
     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 @@ public:
   /// 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();
index 5e3ba1f..121961d 100644 (file)
@@ -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));
   }
index 59e2d4c..d30713d 100644 (file)
@@ -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(),
index 180fe06..ba25eba 100644 (file)
@@ -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) {
index a5323f4..e002336 100644 (file)
@@ -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;
index 9b64e7f..ac6d615 100644 (file)
@@ -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())) {
index c17490c..470a435 100644 (file)
@@ -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
index 73e5bb1..6dc5a36 100644 (file)
@@ -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
index 6dea434..2f7403c 100644 (file)
@@ -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());
 
index e2dabec..faae278 100644 (file)
@@ -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 =
index 8a9f737..1d8d0c6 100644 (file)
@@ -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))
index eec679c..90c4315 100644 (file)
@@ -292,8 +292,8 @@ public:
   /// 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> *>>
index 02545e1..edd5e7b 100644 (file)
@@ -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();
index 4984862..194a645 100644 (file)
@@ -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 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.
index 0f16b88..c16fad2 100644 (file)
@@ -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"
index 065c777..3ca0e93 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
index af3900f..a11473b 100644 (file)
@@ -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
index 3d5e091..4800d4d 100644 (file)
@@ -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
index dbfe990..d1f9109 100644 (file)
@@ -148,7 +148,7 @@ public:
   }
 
   /// 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.
index 0a8f224..effaae4 100644 (file)
@@ -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 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 {
index d1a42fe..c3f5d78 100644 (file)
@@ -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.
index 201ba22..0f49439 100644 (file)
@@ -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.
index 87c8b64..7a19b2d 100644 (file)
@@ -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;
 
index b9b5d88..dc08e81 100644 (file)
@@ -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.
index 772cb3b..2e41e8b 100644 (file)
@@ -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.
index b112752..08ff4ce 100644 (file)
@@ -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>)
index 4fc7f32..ae459df 100644 (file)
@@ -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
index 0636e38..8455b38 100644 (file)
@@ -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"
index 2b2ce6e..bd4ef51 100644 (file)
@@ -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);
 
index 13d35a2..820c19a 100644 (file)
@@ -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 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,
index e5cd9f5..737c36f 100644 (file)
@@ -325,7 +325,7 @@ private:
 //   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);