[Mlir-commits] [mlir] 7557530 - [mlir] Fix duplicate word typos; NFC
Fangrui Song
llvmlistbot at llvm.org
Fri Sep 1 20:53:13 PDT 2023
Author: Fangrui Song
Date: 2023-09-01T20:53:08-07:00
New Revision: 7557530f428a2f226d8d925c33d527dfcfdcb0c5
URL: https://github.com/llvm/llvm-project/commit/7557530f428a2f226d8d925c33d527dfcfdcb0c5
DIFF: https://github.com/llvm/llvm-project/commit/7557530f428a2f226d8d925c33d527dfcfdcb0c5.diff
LOG: [mlir] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
Added:
Modified:
mlir/include/mlir-c/AffineMap.h
mlir/include/mlir/Analysis/DataLayoutAnalysis.h
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
mlir/include/mlir/Analysis/SliceAnalysis.h
mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
mlir/include/mlir/Dialect/Affine/Analysis/LoopAnalysis.h
mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
mlir/include/mlir/Dialect/Quant/UniformSupport.h
mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
mlir/include/mlir/IR/AttrTypeBase.td
mlir/include/mlir/IR/BuiltinTypes.h
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
mlir/lib/Analysis/Presburger/Simplex.cpp
mlir/lib/Analysis/Presburger/Utils.cpp
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp
mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/lib/Interfaces/DataLayoutInterfaces.cpp
mlir/test/Dialect/Affine/unroll.mlir
mlir/test/IR/parser.mlir
mlir/test/lib/Reducer/MLIRTestReducer.cpp
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
mlir/unittests/TableGen/OpBuildGen.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir-c/AffineMap.h b/mlir/include/mlir-c/AffineMap.h
index 7359b969127c7b..c24c1ced3cbb65 100644
--- a/mlir/include/mlir-c/AffineMap.h
+++ b/mlir/include/mlir-c/AffineMap.h
@@ -100,7 +100,7 @@ mlirAffineMapMinorIdentityGet(MlirContext ctx, intptr_t dims, intptr_t results);
/// context. The permutation expression is a non-empty vector of integers.
/// The elements of the permutation vector must be continuous from 0 and cannot
/// be repeated (i.e. `[1,2,0]` is a valid permutation. `[2,0]` or `[1,1,2]` is
-/// an invalid invalid permutation.) The affine map is owned by the context.
+/// an invalid permutation.) The affine map is owned by the context.
MLIR_CAPI_EXPORTED MlirAffineMap mlirAffineMapPermutationGet(
MlirContext ctx, intptr_t size, unsigned *permutation);
diff --git a/mlir/include/mlir/Analysis/DataLayoutAnalysis.h b/mlir/include/mlir/Analysis/DataLayoutAnalysis.h
index c190c8006b14d2..cba7ee1b016926 100644
--- a/mlir/include/mlir/Analysis/DataLayoutAnalysis.h
+++ b/mlir/include/mlir/Analysis/DataLayoutAnalysis.h
@@ -26,7 +26,7 @@ class DataLayoutAnalysis {
/// Constructs the data layouts.
explicit DataLayoutAnalysis(Operation *root);
- /// Returns the data layout active active at the given operation, that is the
+ /// Returns the data layout active at the given operation, that is the
/// data layout specified by the closest ancestor that can specify one, or the
/// default layout if there is no such ancestor.
const DataLayout &getAbove(Operation *operation) const;
diff --git a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
index fb1401cfbcf20f..eae866e63d8d12 100644
--- a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+++ b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
@@ -693,7 +693,7 @@ class IntegerRelation {
/// false otherwise.
bool hasInvalidConstraint() const;
- /// Returns the constant lower bound bound if isLower is true, and the upper
+ /// Returns the constant lower bound if isLower is true, and the upper
/// bound if isLower is false.
template <bool isLower>
std::optional<MPInt> computeConstantLowerOrUpperBound(unsigned pos);
diff --git a/mlir/include/mlir/Analysis/SliceAnalysis.h b/mlir/include/mlir/Analysis/SliceAnalysis.h
index b20729d138612e..e64d3ac0271eb9 100644
--- a/mlir/include/mlir/Analysis/SliceAnalysis.h
+++ b/mlir/include/mlir/Analysis/SliceAnalysis.h
@@ -66,7 +66,7 @@ using ForwardSliceOptions = SliceOptions;
///
/// Upon return to the root call, `forwardSlice` is filled with a
/// postorder list of uses (i.e. a reverse topological order). To get a proper
-/// topological order, we just just reverse the order in `forwardSlice` before
+/// topological order, we just reverse the order in `forwardSlice` before
/// returning.
///
/// Example starting from node 0
diff --git a/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h b/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
index bc45fcd84e0982..cc4e17e9527f01 100644
--- a/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
+++ b/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
@@ -36,7 +36,7 @@ class LowerToLLVMOptions {
bool useOpaquePointers = true;
enum class AllocLowering {
- /// Use malloc for for heap allocations.
+ /// Use malloc for heap allocations.
Malloc,
/// Use aligned_alloc for heap allocations.
diff --git a/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h b/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
index c7128b4d233dfb..ed174699314e8d 100644
--- a/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
+++ b/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
@@ -199,7 +199,7 @@ class LLVMTypeConverter : public TypeConverter {
/// Convert a memref type into a list of LLVM IR types that will form the
/// memref descriptor. If `unpackAggregates` is true the `sizes` and `strides`
/// arrays in the descriptors are unpacked to individual index-typed elements,
- /// else they are are kept as rank-sized arrays of index type. In particular,
+ /// else they are kept as rank-sized arrays of index type. In particular,
/// the list will contain:
/// - two pointers to the memref element type, followed by
/// - an index-typed offset, followed by
diff --git a/mlir/include/mlir/Dialect/Affine/Analysis/LoopAnalysis.h b/mlir/include/mlir/Dialect/Affine/Analysis/LoopAnalysis.h
index 0f39f03decdfa6..92f3d5a2c4925b 100644
--- a/mlir/include/mlir/Dialect/Affine/Analysis/LoopAnalysis.h
+++ b/mlir/include/mlir/Dialect/Affine/Analysis/LoopAnalysis.h
@@ -70,7 +70,7 @@ bool isVectorizableLoopBody(AffineForOp loop,
NestedPattern &vectorTransferMatcher);
/// Checks whether the loop is structurally vectorizable and that all the LoadOp
-/// and StoreOp matched have access indexing functions that are are either:
+/// and StoreOp matched have access indexing functions that are either:
/// 1. invariant along the loop induction variable created by 'loop';
/// 2. varying along at most one memory dimension. If such a unique dimension
/// is found, it is written into `memRefDim`.
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
index c2d567f6316663..e87e8b56001074 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
@@ -47,7 +47,7 @@ def Linalg_Dialect : Dialect {
let hasOperationAttrVerify = 1;
let hasConstantMaterializer = 1;
let extraClassDeclaration = [{
- /// Attribute name used to to memoize indexing maps for named ops.
+ /// Attribute name used to memoize indexing maps for named ops.
constexpr const static ::llvm::StringLiteral
kMemoizedIndexingMapsAttrName = "linalg.memoized_indexing_maps";
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
index e735fdc59ec1be..f6ba6586a81a24 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
@@ -30,7 +30,7 @@ class IteratorTypeAttr;
class LinalgOp;
namespace detail {
-/// Implementation of the method that that check if given operands
+/// Implementation of the method that check if given operands
/// can be dropped, i.e. the remaining operands can compute the loop
/// bounds of the op.
bool canOpOperandsBeDroppedImpl(linalg::LinalgOp linalgOp,
diff --git a/mlir/include/mlir/Dialect/Quant/UniformSupport.h b/mlir/include/mlir/Dialect/Quant/UniformSupport.h
index 9ea6d1729e960e..4119aced4c0752 100644
--- a/mlir/include/mlir/Dialect/Quant/UniformSupport.h
+++ b/mlir/include/mlir/Dialect/Quant/UniformSupport.h
@@ -171,7 +171,7 @@ class UniformQuantizedValueConverter {
/// An utility class to quantize an attribute by the per-axis quantization
/// parameters. The size of the quantization dim in the converted elements
-/// attribute should matche the size of of scales/zeroPoints vectors in the
+/// attribute should match the size of scales/zeroPoints vectors in the
/// quantization parameters.
class UniformQuantizedPerAxisValueConverter {
public:
diff --git a/mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h b/mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
index 13e38af8ae906f..040b2a5d413449 100644
--- a/mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
+++ b/mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
@@ -209,7 +209,7 @@ class ExtractSliceFromCollapseHelper {
/// either take the place of the source, allowing for a new, simpler
/// `collapse_shape` op to replace `op`, or the `collapse_shape` op will be
/// completely replaced by the `extract_slice` result. Either way, `op` is
-/// replaced and new new op is returned.
+/// replaced and the new op is returned.
///
/// ### Example:
/// ```
diff --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td
index 5f38f380c229d5..3e356373cbd735 100644
--- a/mlir/include/mlir/IR/AttrTypeBase.td
+++ b/mlir/include/mlir/IR/AttrTypeBase.td
@@ -315,7 +315,7 @@ class AttrOrTypeParameter<string type, string desc, string accessorType = ""> {
string cppType = type;
// The C++ type of the accessor for this parameter.
string cppAccessorType = !if(!empty(accessorType), type, accessorType);
- // The C++ storage type of of this parameter if it is a reference, e.g.
+ // The C++ storage type of this parameter if it is a reference, e.g.
// `std::string` for `StringRef` or `SmallVector` for `ArrayRef`.
string cppStorageType = cppType;
// The C++ code to convert from the storage type to the parameter type.
diff --git a/mlir/include/mlir/IR/BuiltinTypes.h b/mlir/include/mlir/IR/BuiltinTypes.h
index f0b19fe543a5bf..f031eb0a5c30ce 100644
--- a/mlir/include/mlir/IR/BuiltinTypes.h
+++ b/mlir/include/mlir/IR/BuiltinTypes.h
@@ -511,7 +511,7 @@ MemRefType canonicalizeStridedLayout(MemRefType t);
/// canonical "contiguous" strides AffineExpr. Strides are multiplicative and
/// once a dynamic dimension is encountered, all canonical strides become
/// dynamic and need to be encoded with a
diff erent symbol.
-/// For canonical strides expressions, the offset is always 0 and and fastest
+/// For canonical strides expressions, the offset is always 0 and the fastest
/// varying stride is always `1`.
///
/// Examples:
diff --git a/mlir/lib/Analysis/Presburger/PWMAFunction.cpp b/mlir/lib/Analysis/Presburger/PWMAFunction.cpp
index ce9e810069c48d..9061fd3a6db856 100644
--- a/mlir/lib/Analysis/Presburger/PWMAFunction.cpp
+++ b/mlir/lib/Analysis/Presburger/PWMAFunction.cpp
@@ -334,7 +334,7 @@ PWMAFunction PWMAFunction::unionFunction(
// defined.
//
// `dom` here is guranteed to be disjoint from already added pieces
- // because because the pieces added before are either:
+ // because the pieces added before are either:
// - Subsets of the domain of other MAFs in `this`, which are guranteed
// to be disjoint from `dom`, or
// - They are one of the pieces added for `pieceB`, and we have been
diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp
index eff312b69e1de1..59447633e9fc8b 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -188,7 +188,7 @@ Direction flippedDirection(Direction direction) {
/// greater, so A*y + b is always equal to or lexicographically greater than b.
/// Thus, since we can attain x = b, that is the lexicographic minimum.
///
-/// We have that that every column in A is lexicopositive, i.e., has at least
+/// We have that every column in A is lexicopositive, i.e., has at least
/// one non-zero element, with the first such element being positive. Since for
/// the tableau to be consistent we must have non-negative sample values not
/// only for the constraints but also for the variables, we also have x >= 0 and
diff --git a/mlir/lib/Analysis/Presburger/Utils.cpp b/mlir/lib/Analysis/Presburger/Utils.cpp
index 1d2404eeb59cfc..e7fd2843b93a37 100644
--- a/mlir/lib/Analysis/Presburger/Utils.cpp
+++ b/mlir/lib/Analysis/Presburger/Utils.cpp
@@ -83,7 +83,7 @@ static void normalizeDivisionByGCD(MutableArrayRef<MPInt> dividend,
/// 4q - i - j + 2 >= 0 <-- Lower bound for 'q'
/// -4q + i + j >= 0 <-- Tight upper bound for 'q'
///
-/// To extract floor divisions with tighter bounds, we assume that that the
+/// To extract floor divisions with tighter bounds, we assume that the
/// constraints are of the form:
/// c <= expr - divisior * var <= divisor - 1, where 0 <= c <= divisor - 1
/// Rearranging, we have:
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
index 2000f2336a6b7d..e911631a4bc52a 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
@@ -141,7 +141,7 @@ struct PatternLowering {
/// positional value.
DenseMap<Value, Position *> valueToPosition;
- /// The set of operation values whose whose location will be used for newly
+ /// The set of operation values whose location will be used for newly
/// generated operations.
SetVector<Value> locOps;
diff --git a/mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp b/mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp
index 6e4b6774e3003c..86a3d8b7819b39 100644
--- a/mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp
+++ b/mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp
@@ -27,7 +27,7 @@ namespace {
/// For example, the DAGs `A -> B -> C -> B -> A` and `A -> B -> C -> A`
/// represent a noop within the IR, and thus the initial input values can be
/// propagated.
-/// The same does not hold for 'open' chains chains of casts, such as
+/// The same does not hold for 'open' chains of casts, such as
/// `A -> B -> C`. In this last case there is no cycle among the types and thus
/// the conversion is incomplete. The same hold for 'closed' chains like
/// `A -> B -> A`, but with the result of type `B` being used by some non-cast
diff --git a/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp b/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
index 4b3730a4aa3970..47224de1477634 100644
--- a/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
@@ -634,8 +634,8 @@ DependenceResult mlir::affine::checkMemrefAccessDependence(
// Return 'NoDependence' if loopDepth > numCommonLoops and if the ancestor
// operation of 'srcAccess' does not properly dominate the ancestor
// operation of 'dstAccess' in the same common operation block.
- // Note: this check is skipped if 'allowRAR' is true, because because RAR
- // deps can exist irrespective of lexicographic ordering b/w src and dst.
+ // Note: this check is skipped if 'allowRAR' is true, because RAR deps
+ // can exist irrespective of lexicographic ordering b/w src and dst.
unsigned numCommonLoops = getNumCommonLoops(srcDomain, dstDomain);
assert(loopDepth <= numCommonLoops + 1);
if (!allowRAR && loopDepth > numCommonLoops &&
diff --git a/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
index a69bc775fc1b53..742830ec722f17 100644
--- a/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
+++ b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
@@ -146,7 +146,7 @@ bool mlir::isLegalForReturnOpTypeConversionPattern(Operation *op,
TypeConverter &converter,
bool returnOpAlwaysLegal) {
// If this is a `return` and the user pass wants to convert/transform across
- // function boundaries, then `converter` is invoked to check whether the the
+ // function boundaries, then `converter` is invoked to check whether the
// `return` op is legal.
if (isa<ReturnOp>(op) && !returnOpAlwaysLegal)
return converter.isLegal(op);
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
index b94b8f187312e4..30196e207d4a0a 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
@@ -63,7 +63,7 @@ struct LinalgInlinerInterface : public DialectInlinerInterface {
// LinalgDialect
//===----------------------------------------------------------------------===//
-/// Attribute name used to to memoize indexing maps for named ops.
+/// Attribute name used to memoize indexing maps for named ops.
constexpr const ::llvm::StringLiteral
LinalgDialect::kMemoizedIndexingMapsAttrName;
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index fdb697cf1167af..df814d02e0b195 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -2035,7 +2035,7 @@ struct PadOpVectorizationWithTransferWritePattern
/// sizes may turn out to be equal at runtime.
bool hasSameTensorSize(Value beforePadding,
tensor::ExtractSliceOp afterTrimming) const {
- // If the input to tensor::PadOp is a CastOp, try with with both CastOp
+ // If the input to tensor::PadOp is a CastOp, try with both CastOp
// result and CastOp operand.
if (auto castOp = beforePadding.getDefiningOp<tensor::CastOp>())
if (hasSameTensorSize(castOp.getSource(), afterTrimming))
diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index d08da74df47976..42da47a5381e78 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -647,7 +647,7 @@ void CastOp::getAsmResultNames(function_ref<void(Value, StringRef)> setNameFn) {
}
/// Determines whether MemRef_CastOp casts to a more dynamic version of the
-/// source memref. This is useful to to fold a memref.cast into a consuming op
+/// source memref. This is useful to fold a memref.cast into a consuming op
/// and implement canonicalization patterns for ops in
diff erent dialects that
/// may consume the results of memref.cast operations. Such foldable memref.cast
/// operations are typically inserted as `view` and `subview` ops are
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index 5c90e7e7599ef8..42d89cd5a76208 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -2324,7 +2324,7 @@ class InsertSliceOpConstantArgumentFolder final
if (sourceType != insertSliceOp.getSourceType()) {
OpBuilder::InsertionGuard g(rewriter);
// The only
diff erence between InsertSliceOp and ParallelInsertSliceOp
- // is the the insertion point is just before the ParallelCombiningOp in
+ // is that the insertion point is just before the ParallelCombiningOp in
// the parallel case.
if (std::is_same<InsertOpTy, ParallelInsertSliceOp>::value)
rewriter.setInsertionPoint(insertSliceOp->getParentOp());
@@ -2465,7 +2465,7 @@ struct InsertSliceOpSourceCastInserter final
// Insert the cast.
OpBuilder::InsertionGuard g(rewriter);
// The only
diff erence between InsertSliceOp and ParallelInsertSliceOp is
- // the the insertion point is just before the ParallelCombiningOp in the
+ // that the insertion point is just before the ParallelCombiningOp in the
// parallel case.
if (std::is_same<InsertOpTy, ParallelInsertSliceOp>::value)
rewriter.setInsertionPoint(insertSliceOp->getParentOp());
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index a2975ac468c05d..2aaf1cb7e5878e 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -1522,7 +1522,7 @@ static Value foldExtractFromShapeCast(ExtractOp extractOp) {
auto destinationType =
llvm::cast<VectorType>(extractOp.getResult().getType());
for (int64_t i = 0; i < destinationRank; i++) {
- // The lowest dimension of of the destination must match the lowest
+ // The lowest dimension of the destination must match the lowest
// dimension of the shapecast op source.
// TODO: This case could be support in a canonicalization pattern.
if (getDimReverse(shapeCastOp.getSourceVectorType(), i) !=
diff --git a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
index e460fe133379c8..8edd89f5d3a312 100644
--- a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
+++ b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
@@ -536,7 +536,7 @@ LogicalResult mlir::detail::verifyDataLayoutSpec(DataLayoutSpecInterface spec,
return failure();
// Second, dispatch verifications of entry groups to types or dialects they
- // are are associated with.
+ // are associated with.
DenseMap<TypeID, DataLayoutEntryList> types;
DenseMap<StringAttr, DataLayoutEntryInterface> ids;
spec.bucketEntriesByType(types, ids);
diff --git a/mlir/test/Dialect/Affine/unroll.mlir b/mlir/test/Dialect/Affine/unroll.mlir
index 582f6254facc0c..eb90d10362f9b4 100644
--- a/mlir/test/Dialect/Affine/unroll.mlir
+++ b/mlir/test/Dialect/Affine/unroll.mlir
@@ -522,7 +522,7 @@ func.func @loop_nest_symbolic_bound(%N : index) {
// UNROLL-BY-4-NEXT: %2 = "foo"() : () -> i32
// UNROLL-BY-4-NEXT: %3 = "foo"() : () -> i32
// UNROLL-BY-4-NEXT: }
- // A cleanup loop will be be generated here.
+ // A cleanup loop will be generated here.
// UNROLL-BY-4-NEXT: affine.for %arg2 = #map{{[0-9]*}}()[%arg0] to %arg0 {
// UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
// UNROLL-BY-4-NEXT: }
diff --git a/mlir/test/IR/parser.mlir b/mlir/test/IR/parser.mlir
index 0193fae37af7f7..bebbb876391d07 100644
--- a/mlir/test/IR/parser.mlir
+++ b/mlir/test/IR/parser.mlir
@@ -1358,7 +1358,7 @@ func.func @graph_region_kind() -> () {
// CHECK: [[VAL2:%.*]]:3 = "bar"([[VAL3:%.*]]) : (i64) -> (i1, i1, i1)
// CHECK: [[VAL3]] = "baz"([[VAL2]]#0) : (i1) -> i64
test.graph_region {
- // %1 OK here in in graph region.
+ // %1 OK here in graph region.
%2:3 = "bar"(%1) : (i64) -> (i1,i1,i1)
%1 = "baz"(%2#0) : (i1) -> (i64)
}
diff --git a/mlir/test/lib/Reducer/MLIRTestReducer.cpp b/mlir/test/lib/Reducer/MLIRTestReducer.cpp
index ccfae102184417..496facd3125d5c 100644
--- a/mlir/test/lib/Reducer/MLIRTestReducer.cpp
+++ b/mlir/test/lib/Reducer/MLIRTestReducer.cpp
@@ -18,7 +18,7 @@ using namespace mlir;
namespace {
-/// This pass looks for for the presence of an operation with the name
+/// This pass looks for the presence of an operation with the name
/// "crashOp" in the input MLIR file and crashes the mlir-opt tool if the
/// operation is found.
struct TestReducer : public PassWrapper<TestReducer, OperationPass<>> {
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 3d4767d838059d..c0dfce553905a0 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -3084,7 +3084,7 @@ void OpEmitter::genCanonicalizerDecls() {
auto *method = opClass.addMethod("void", "getCanonicalizationPatterns", kind,
std::move(paramList));
- // If synthesizing the method, fill it it.
+ // If synthesizing the method, fill it.
if (hasBody) {
ERROR_IF_PRUNED(method, "getCanonicalizationPatterns", op);
method->body() << " results.add(canonicalize);\n";
diff --git a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
index 25aa63fcaa0444..8e31a8bb2030b6 100644
--- a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
+++ b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
@@ -526,7 +526,7 @@ TEST(SetTest, divisionNonDivLocals) {
// Triangle with vertices (0, 0), (5, 0), (15, 5).
// Projected on x, it becomes [0, 13] U {15} as it becomes too narrow towards
- // the apex and so does not have have any integer point at x = 14.
+ // the apex and so does not have any integer point at x = 14.
// At x = 15, the apex is an integer point.
PresburgerSet triangle2{
parseIntegerPolyhedronAndMakeLocals("(x,y) : (y >= 0, "
diff --git a/mlir/unittests/TableGen/OpBuildGen.cpp b/mlir/unittests/TableGen/OpBuildGen.cpp
index 4f543cb7764fe1..52347dcabe0381 100644
--- a/mlir/unittests/TableGen/OpBuildGen.cpp
+++ b/mlir/unittests/TableGen/OpBuildGen.cpp
@@ -131,7 +131,7 @@ TEST_F(OpBuildGenTest, BasicBuildMethods) {
/// single variadic arg x
/// {single variadic result, non-variadic result, multiple variadic results}
///
-/// Specifically to test that that ODS framework does not generate ambiguous
+/// Specifically to test that ODS framework does not generate ambiguous
/// build() methods that fail to compile.
/// Test build methods for an Op with a single varadic arg and a single
More information about the Mlir-commits
mailing list