diff --git a/mlir/include/mlir-c/Support.h b/mlir/include/mlir-c/Support.h --- a/mlir/include/mlir-c/Support.h +++ b/mlir/include/mlir-c/Support.h @@ -76,7 +76,7 @@ * * This function is called back by the functions that need to return a reference * to the portion of the string with the following arguments: - * - an MlirStringRef represening the current portion of the string + * - an MlirStringRef representing the current portion of the string * - a pointer to user data forwarded from the printing call. */ typedef void (*MlirStringCallback)(MlirStringRef, void *); diff --git a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h --- a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h +++ b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h @@ -24,7 +24,7 @@ /// the host module code to LLVM. /// /// This transformation creates a sequence of global variables that are later -/// linked to the varables in the kernel module, and a series of copies to/from +/// linked to the variables in the kernel module, and a series of copies to/from /// them to emulate the memory transfer from the host or to the device sides. It /// also converts the remaining Standard dialect into LLVM dialect, emitting C /// wrappers. diff --git a/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td b/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td --- a/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td +++ b/mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td @@ -165,7 +165,7 @@ AllTypesMatch<["src1", "src2"]>, AllTypesMatch<["acc", "dst"]>, ]> { - let summary = "Matrix-matrix mutiply and accumulate op"; + let summary = "Matrix-matrix multiply and accumulate op"; let description = [{ SMMLA: Signed integer matrix multiply-accumulate. @@ -228,7 +228,7 @@ AllTypesMatch<["src1", "src2"]>, AllTypesMatch<["acc", "dst"]>, ]> { - let summary = "Matrix-matrix mutiply and accumulate op"; + let summary = "Matrix-matrix multiply and accumulate op"; let description = [{ UMMLA: Unsigned integer matrix multiply-accumulate. 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 @@ -241,7 +241,7 @@ // 1. Operation returns async result (e.g. the result of an `async.execute`). // 2. Async value passed in as a block argument. // -// It is the responsiblity of the async value user to extend the lifetime by +// It is the responsibility of the async value user to extend the lifetime by // adding a +1 reference, if the reference counted value captured by the // asynchronously executed region (`async.execute` operation), and drop it after // the last nested use. diff --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td --- a/mlir/include/mlir/Dialect/SCF/SCFOps.td +++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td @@ -496,7 +496,7 @@ * In a "do-while" loop, this region contains the loop body. */ %next = call @payload(%arg1) : (f32) -> f32 - /* And also evalutes the condition. */ + /* And also evaluates the condition. */ %condition = call @evaluate_condition(%arg1) : (f32) -> i1 /* Loop through the "after" region. */ @@ -525,7 +525,7 @@ * "after" region. */ %shared = call @shared_compute(%arg1) : (f32) -> i64 - /* Evalute the condition. */ + /* Evaluate the condition. */ %condition = call @evaluate_condition(%arg1, %shared) : (f32, i64) -> i1 /* Forward the result of the shared computation to the "after" region. diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td --- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td @@ -932,7 +932,7 @@ ``` uclamp-op ::= ssa-id `=` `spv.GLSL.UClamp` ssa-use, ssa-use, ssa-use `:` - unsgined-signless-scalar-vector-type + unsigned-signless-scalar-vector-type ``` #### Example: diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td @@ -1832,7 +1832,7 @@ // Uninitialized externally visible variable. global_memref @z : memref<3xf16> = uninitialized - // Externally visibile constant variable. + // Externally visible constant variable. global_memref constant @c : memref<2xi32> = dense<1, 4> ``` }]; diff --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td b/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td --- a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td @@ -42,7 +42,7 @@ As this pass rewrites function operations, it also rewrites the corresponding return operations. Other return-like operations that implement the `ReturnLike` trait are not rewritten in general, as they - require that the correspondign parent operation is also rewritten. + require that the corresponding parent operation is also rewritten. Finally, this pass fails for unknown terminators, as we cannot decide whether they need rewriting. }]; diff --git a/mlir/include/mlir/Dialect/Tosa/Utils/QuantUtils.h b/mlir/include/mlir/Dialect/Tosa/Utils/QuantUtils.h --- a/mlir/include/mlir/Dialect/Tosa/Utils/QuantUtils.h +++ b/mlir/include/mlir/Dialect/Tosa/Utils/QuantUtils.h @@ -23,7 +23,7 @@ namespace tosa { //===----------------------------------------------------------------------===// -// Utililty functions to support quantization handling in Tosa. +// Utility functions to support quantization handling in Tosa. //===----------------------------------------------------------------------===// /// From a scale value, computes multiplier and shift values diff --git a/mlir/include/mlir/Dialect/Vector/VectorOps.td b/mlir/include/mlir/Dialect/Vector/VectorOps.td --- a/mlir/include/mlir/Dialect/Vector/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/VectorOps.td @@ -466,7 +466,7 @@ along each dimension. The dimension associated to each element of `ids` used to extract are - implicitly deduced from the the destination type. For each dimension the + implicitly deduced from the destination type. For each dimension the multiplicity is the destination dimension size divided by the source dimension size, each dimension with a multiplicity greater than 1 is associated to the next id, following ids order. diff --git a/mlir/include/mlir/IR/ImplicitLocOpBuilder.h b/mlir/include/mlir/IR/ImplicitLocOpBuilder.h --- a/mlir/include/mlir/IR/ImplicitLocOpBuilder.h +++ b/mlir/include/mlir/IR/ImplicitLocOpBuilder.h @@ -17,7 +17,7 @@ namespace mlir { -/// ImplictLocOpBuilder maintains a 'current location', allowing use of the +/// ImplicitLocOpBuilder maintains a 'current location', allowing use of the /// create<> method without specifying the location. It is otherwise the same /// as OpBuilder. class ImplicitLocOpBuilder : public mlir::OpBuilder { @@ -120,4 +120,4 @@ } // namespace mlir -#endif // MLIR_IR_IMPLICITLOCOPBUILDER_H \ No newline at end of file +#endif // MLIR_IR_IMPLICITLOCOPBUILDER_H diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -897,7 +897,7 @@ /// Ensure that the given region has the terminator required by this trait. /// If OpBuilder is provided, use it to build the terminator and notify the - /// OpBuilder litsteners accordingly. If only a Builder is provided, locally + /// OpBuilder listeners accordingly. If only a Builder is provided, locally /// construct an OpBuilder with no listeners; this should only be used if no /// OpBuilder is available at the call site, e.g., in the parser. static void ensureTerminator(Region ®ion, Builder &builder, diff --git a/mlir/include/mlir/Pass/PassRegistry.h b/mlir/include/mlir/Pass/PassRegistry.h --- a/mlir/include/mlir/Pass/PassRegistry.h +++ b/mlir/include/mlir/Pass/PassRegistry.h @@ -246,9 +246,9 @@ std::unique_ptr impl; }; -/// This class implements a command-line parser spefically for MLIR pass names. -/// It registers a cl option with a given argument and description that accepts -/// a comma delimited list of pass names. +/// This class implements a command-line parser specifically for MLIR pass +/// names. It registers a cl option with a given argument and description that +/// accepts a comma delimited list of pass names. class PassNameCLParser { public: /// Construct a parser with the given command line description. 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 @@ -67,7 +67,7 @@ return *this; } - /// Emits whitespace and sets the indendation for the stream. + /// Emits whitespace and sets the indentation for the stream. raw_indented_ostream &indent(int with) { os.indent(with); atStartOfLine = false; diff --git a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h --- a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h +++ b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h @@ -154,7 +154,7 @@ DenseMap blockMapping; /// A mapping between MLIR LLVM dialect terminators and LLVM IR terminators - /// they are converted to. This allows for conneting PHI nodes to the source + /// they are converted to. This allows for connecting PHI nodes to the source /// values after all operations are converted. DenseMap branchMapping; }; diff --git a/mlir/include/mlir/Target/LLVMIR/TypeTranslation.h b/mlir/include/mlir/Target/LLVMIR/TypeTranslation.h --- a/mlir/include/mlir/Target/LLVMIR/TypeTranslation.h +++ b/mlir/include/mlir/Target/LLVMIR/TypeTranslation.h @@ -42,7 +42,7 @@ TypeToLLVMIRTranslator(llvm::LLVMContext &context); ~TypeToLLVMIRTranslator(); - /// Returns the perferred alignment for the type given the data layout. Note + /// Returns the preferred alignment for the type given the data layout. Note /// that this will perform type conversion and store its results for future /// uses. // TODO: this should be removed when MLIR has proper data layout. diff --git a/mlir/include/mlir/Transforms/Bufferize.h b/mlir/include/mlir/Transforms/Bufferize.h --- a/mlir/include/mlir/Transforms/Bufferize.h +++ b/mlir/include/mlir/Transforms/Bufferize.h @@ -45,7 +45,7 @@ /// "legal" in the given ConversionTarget. /// /// This function should be called by all bufferization passes using -/// BufferizeTypeConverter so that materializations work proprely. One exception +/// BufferizeTypeConverter so that materializations work properly. One exception /// is bufferization passes doing "full" conversions, where it can be desirable /// for even the materializations to remain illegal so that they are eliminated, /// such as via the patterns in diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -1061,7 +1061,7 @@ /// constant term. static int64_t valueAt(ArrayRef expr, ArrayRef point) { assert(expr.size() == 1 + point.size() && - "Dimensionalities of point and expresion don't match!"); + "Dimensionalities of point and expression don't match!"); int64_t value = expr.back(); for (unsigned i = 0; i < point.size(); ++i) value += expr[i] * point[i]; 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 @@ -207,7 +207,7 @@ } static void bind(py::module &m) { - py::class_(m, "ReqionSequence") + py::class_(m, "RegionSequence") .def("__len__", &PyRegionList::dunderLen) .def("__getitem__", &PyRegionList::dunderGetItem); } diff --git a/mlir/lib/CAPI/Transforms/Passes.cpp b/mlir/lib/CAPI/Transforms/Passes.cpp --- a/mlir/lib/CAPI/Transforms/Passes.cpp +++ b/mlir/lib/CAPI/Transforms/Passes.cpp @@ -1,4 +1,4 @@ -//===- CAPIPasses.cpp - C API for Tranformations Passes -------------------===// +//===- CAPIPasses.cpp - C API for Transformations Passes ------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/mlir/lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp b/mlir/lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp --- a/mlir/lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp +++ b/mlir/lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp @@ -131,7 +131,7 @@ targetMachine.reset(target->createTargetMachine(triple.str(), targetChip, features, {}, {})); if (targetMachine == nullptr) { - emitError(loc, "connot initialize target machine"); + emitError(loc, "cannot initialize target machine"); return {}; } } diff --git a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h --- a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h +++ b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h @@ -419,7 +419,7 @@ // PredicateBuilder //===----------------------------------------------------------------------===// -/// This class provides utilties for constructing predicates. +/// This class provides utilities for constructing predicates. class PredicateBuilder { public: PredicateBuilder(PredicateUniquer &uniquer, MLIRContext *ctx) diff --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp --- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp +++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp @@ -200,7 +200,7 @@ auto numKernelOperands = launchOp.getNumKernelOperands(); auto kernelOperands = operands.take_back(numKernelOperands); for (auto operand : llvm::enumerate(kernelOperands)) { - // Check if the kernel's opernad is a ranked memref. + // Check if the kernel's operand is a ranked memref. auto memRefType = launchOp.getKernelOperand(operand.index()) .getType() .dyn_cast(); diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp --- a/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp +++ b/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp @@ -185,7 +185,7 @@ return [&, loopIdx](OpBuilder &b, Location loc, Value iv, ValueRange args) { blockInductionVars[loopIdx] = iv; - // Continute building async loop nest. + // Continue building async loop nest. if (loopIdx < op.getNumLoops() - 1) { b.create( loc, blockLowerBounds[loopIdx + 1], blockUpperBounds[loopIdx + 1], 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 @@ -91,7 +91,7 @@ /// Returns the identifier of a key for identified structs. StringRef getIdentifier() const { assert(isIdentified() && - "non-identified struct key canont have an identifier"); + "non-identified struct key cannot have an identifier"); return name; } @@ -219,7 +219,7 @@ key.isOpaque()); } - /// Hook into the type unquing infrastructure. + /// Hook into the type uniquing infrastructure. bool operator==(const KeyTy &other) const { return getKey() == other; }; static llvm::hash_code hashKey(const KeyTy &key) { return key.hashValue(); } static LLVMStructTypeStorage *construct(TypeStorageAllocator &allocator, diff --git a/mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp b/mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp @@ -698,7 +698,7 @@ // the operation, if the accesses in the producer/consumer are transposes // of each other, the loop bounds for the tiled producer can be // manipulated accordingly. This requires some additional bookkeeping in - // the implementation of tile+fuse that is defered to later. + // the implementation of tile+fuse that is deferred to later. if (doesTransposeAccess(*consumerLoopToProducerLoop, fusableLoops)) { op.emitRemark("unhandled fusion when fusion requires permutation"); return {}; @@ -769,8 +769,7 @@ if (!consumerMap.isProjectedPermutation()) { op.emitRemark( "unhandled case where indexing map for fused view in the consumer " - "is " - "not a projected permuration while fusing at index ") + "is not a projected permutation while fusing at index ") << operandIndex; return FusableOpDependencesTy{}; } diff --git a/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp b/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp @@ -132,7 +132,7 @@ } /// Computes a single conjunction of two lattice points by taking the "union" - /// of loop indices (effectively constucting a larger "intersection" of those + /// of loop indices (effectively constructing a larger "intersection" of those /// indices) with a newly constructed tensor (sub)expression of given kind. /// Returns the index of the new lattice point. unsigned conjLatPoint(Kind kind, unsigned p0, unsigned p1) { diff --git a/mlir/lib/Dialect/PDL/IR/PDL.cpp b/mlir/lib/Dialect/PDL/IR/PDL.cpp --- a/mlir/lib/Dialect/PDL/IR/PDL.cpp +++ b/mlir/lib/Dialect/PDL/IR/PDL.cpp @@ -296,7 +296,7 @@ << resultTypes.size() << " constraints"; } - // If the operation is within a rewrite body and doesn't have type inferrence, + // If the operation is within a rewrite body and doesn't have type inference, // ensure that the result types can be resolved. if (isWithinRewrite && !op.hasTypeInference()) { if (failed(verifyResultTypesAreInferrable(op, opResults, resultTypes))) diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp @@ -752,7 +752,7 @@ /// An identified struct type is uniqued only by the first part (field 0) /// of the key. /// - /// A literal struct type is unqiued only by the second part (fields 1, 2, and + /// A literal struct type is uniqued only by the second part (fields 1, 2, and /// 3) of the key. The identifier field (field 0) must be empty. using KeyTy = std::tuple, ArrayRef, diff --git a/mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp b/mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp --- a/mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp +++ b/mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file implements the the SPIR-V module combiner library. +// This file implements the SPIR-V module combiner library. // //===----------------------------------------------------------------------===// @@ -81,7 +81,7 @@ /// Note: We use the operation's name (not the symbol name) as part of the hash /// computation. This prevents, for example, mistakenly considering a global /// variable and a spec constant as duplicates because their descriptor set + -/// binding and spec_id, repectively, happen to hash to the same value. +/// binding and spec_id, respectively, happen to hash to the same value. static llvm::hash_code computeHash(SymbolOpInterface symbolOp) { llvm::hash_code hashCode(0); hashCode = llvm::hash_combine(symbolOp->getName()); @@ -140,7 +140,7 @@ // renamed in order to maintain the conflicting symbol in the input module // being merged. For example, if the conflict is between a global variable in // the current combined module and a function in the input module, the global - // varaible is renamed. In order to notify listeners of the symbol updates in + // variable is renamed. In order to notify listeners of the symbol updates in // such cases, we need to keep track of the module from which the renamed // symbol in the combined module originated. This map keeps such information. DenseMap symNameToModuleMap; @@ -156,7 +156,7 @@ spirv::ModuleOp moduleClone = module.clone(); // In the combined module, rename all symbols that conflict with symbols - // from the current input module. This renmaing applies to all ops except + // from the current input module. This renaming applies to all ops except // for spv.funcs. This way, if the conflicting op in the input module is // non-spv.func, we rename that symbol instead and maintain the spv.func in // the combined module name as it is. @@ -184,7 +184,7 @@ symRenameListener(originalModule, oldSymName, newSymName); // Since the symbol name is updated, there is no need to maintain the - // entry that assocaites the old symbol name with the original module. + // entry that associates the old symbol name with the original module. symNameToModuleMap.erase(oldSymName); // Instead, add a new entry to map the new symbol name to the original // module in case it gets renamed again later. diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -1461,8 +1461,7 @@ } }; -/// Fold dim of a dim of a cast into the the dim of the source of the tensor -/// cast. +/// Fold dim of a dim of a cast into the dim of the source of the tensor cast. template struct DimOfCastOp : public OpRewritePattern { using OpRewritePattern::OpRewritePattern; diff --git a/mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp --- a/mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp +++ b/mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp @@ -1,4 +1,4 @@ -//===- StdExpandDivs.cpp - Code to prepare Std for lowring Divs 0to LLVM -===// +//===- StdExpandDivs.cpp - Code to prepare Std for lowering Divs to LLVM -===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // // This file Std transformations to expand Divs operation to help for the -// lowering to LLVM. Currently implemented tranformations are Ceil and Floor +// lowering to LLVM. Currently implemented transformations are Ceil and Floor // for Signed Integers. // //===----------------------------------------------------------------------===// diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp --- a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp +++ b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp @@ -46,7 +46,7 @@ static void computeReshapeOutput(ArrayRef higherRankShape, ArrayRef lowerRankShape, SmallVectorImpl &reshapeOutputShape) { - // Intialize new shapes with [1] * higherRank. + // Initialize new shapes with [1] * higherRank. int64_t higherRank = higherRankShape.size(); int64_t lowerRank = lowerRankShape.size(); 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 @@ -1908,7 +1908,7 @@ auto dstVecType = op.getType().cast(); unsigned dstRank = dstVecType.getRank(); unsigned rankDiff = dstRank - srcRrank; - // Check if the most inner dimensions of the source of the broacast are the + // Check if the most inner dimensions of the source of the broadcast are the // same as the destination of the extract. If this is the case we can just // use a broadcast as the original dimensions are untouched. bool lowerDimMatch = true; diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -378,7 +378,7 @@ private: /// Print the given operation in the generic form. void printGenericOp(Operation *op) override { - // Consider nested opertions for aliases. + // Consider nested operations for aliases. if (op->getNumRegions() != 0) { for (Region ®ion : op->getRegions()) printRegion(region, /*printEntryBlockArgs=*/true, @@ -611,7 +611,7 @@ if (succeeded(generateAlias(type, aliasToType))) return; - // Visit several subtypes that contain types or atttributes. + // Visit several subtypes that contain types or attributes. if (auto funcType = type.dyn_cast()) { // Visit input and result types for functions. for (auto input : funcType.getInputs()) diff --git a/mlir/lib/Rewrite/ByteCode.h b/mlir/lib/Rewrite/ByteCode.h --- a/mlir/lib/Rewrite/ByteCode.h +++ b/mlir/lib/Rewrite/ByteCode.h @@ -143,7 +143,7 @@ PDLByteCodeMutableState &state, SmallVectorImpl *matches) const; - /// A vector containing pointers to unqiued data. The storage is intentionally + /// A vector containing pointers to uniqued data. The storage is intentionally /// opaque such that we can store a wide range of data types. The types of /// data stored here include: /// * Attribute, Identifier, OperationName, Type diff --git a/mlir/lib/Target/SPIRV/Serialization.cpp b/mlir/lib/Target/SPIRV/Serialization.cpp --- a/mlir/lib/Target/SPIRV/Serialization.cpp +++ b/mlir/lib/Target/SPIRV/Serialization.cpp @@ -1044,7 +1044,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 serialize resursive references. + // to properly serialize recursive references. llvm::SetVector serializationCtx; return processTypeImpl(loc, type, typeID, serializationCtx); } diff --git a/mlir/lib/Transforms/BufferUtils.cpp b/mlir/lib/Transforms/BufferUtils.cpp --- a/mlir/lib/Transforms/BufferUtils.cpp +++ b/mlir/lib/Transforms/BufferUtils.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file implements utilties for buffer optimization passes. +// This file implements utilities for buffer optimization passes. // //===----------------------------------------------------------------------===// diff --git a/mlir/lib/Transforms/Utils/FoldUtils.cpp b/mlir/lib/Transforms/Utils/FoldUtils.cpp --- a/mlir/lib/Transforms/Utils/FoldUtils.cpp +++ b/mlir/lib/Transforms/Utils/FoldUtils.cpp @@ -61,9 +61,9 @@ return constOp; } - // TODO: To faciliate splitting the std dialect (PR48490), have a special case - // for falling back to std.constant. Eventually, we will have separate ops - // tensor.constant, int.constant, float.constant, etc. that live in their + // TODO: To facilitate splitting the std dialect (PR48490), have a special + // case for falling back to std.constant. Eventually, we will have separate + // ops tensor.constant, int.constant, float.constant, etc. that live in their // respective dialects, which will allow each dialect to implement the // materializeConstant hook above. // 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 @@ -507,7 +507,8 @@ return success(checkTilingLegalityImpl(origLoops)); } -/// Check if the input data is valid and wheter tiled code will be legal or not. +/// Check if the input data is valid and whether tiled code will be legal or +/// not. template void performPreTilingChecks(MutableArrayRef input, ArrayRef tileSizes) { diff --git a/mlir/lib/Transforms/Utils/RegionUtils.cpp b/mlir/lib/Transforms/Utils/RegionUtils.cpp --- a/mlir/lib/Transforms/Utils/RegionUtils.cpp +++ b/mlir/lib/Transforms/Utils/RegionUtils.cpp @@ -516,7 +516,7 @@ // If the lhs or rhs has external uses, the blocks cannot be merged as the // merged version of this operation will not be either the lhs or rhs - // alone (thus semantically incorrect), but some mix dependening on which + // alone (thus semantically incorrect), but some mix dependending on which // block preceeded this. // TODO allow merging of operations when one block does not dominate the // other