Skip to content

[NFC] Fix some typos #108355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class RestrictedIncludesPPCallbacks
public:
explicit RestrictedIncludesPPCallbacks(
RestrictSystemLibcHeadersCheck &Check, const SourceManager &SM,
const SmallString<128> CompilerIncudeDir)
const SmallString<128> CompilerIncludeDir)
: portability::RestrictedIncludesPPCallbacks(Check, SM),
CompilerIncudeDir(CompilerIncudeDir) {}
CompilerIncludeDir(CompilerIncludeDir) {}

void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
StringRef FileName, bool IsAngled,
Expand All @@ -38,7 +38,7 @@ class RestrictedIncludesPPCallbacks
SrcMgr::CharacteristicKind FileType) override;

private:
const SmallString<128> CompilerIncudeDir;
const SmallString<128> CompilerIncludeDir;
};

} // namespace
Expand All @@ -49,7 +49,7 @@ void RestrictedIncludesPPCallbacks::InclusionDirective(
StringRef SearchPath, StringRef RelativePath, const Module *SuggestedModule,
bool ModuleImported, SrcMgr::CharacteristicKind FileType) {
// Compiler provided headers are allowed (e.g stddef.h).
if (SrcMgr::isSystem(FileType) && SearchPath == CompilerIncudeDir)
if (SrcMgr::isSystem(FileType) && SearchPath == CompilerIncludeDir)
return;
portability::RestrictedIncludesPPCallbacks::InclusionDirective(
HashLoc, IncludeTok, FileName, IsAngled, FilenameRange, File, SearchPath,
Expand All @@ -58,11 +58,11 @@ void RestrictedIncludesPPCallbacks::InclusionDirective(

void RestrictSystemLibcHeadersCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
SmallString<128> CompilerIncudeDir =
SmallString<128> CompilerIncludeDir =
StringRef(PP->getHeaderSearchInfo().getHeaderSearchOpts().ResourceDir);
llvm::sys::path::append(CompilerIncudeDir, "include");
llvm::sys::path::append(CompilerIncludeDir, "include");
PP->addPPCallbacks(std::make_unique<RestrictedIncludesPPCallbacks>(
*this, SM, CompilerIncudeDir));
*this, SM, CompilerIncludeDir));
}

} // namespace clang::tidy::llvm_libc
2 changes: 1 addition & 1 deletion mlir/docs/Dialects/Linalg/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ The key implication is that this conversion to deep predication needs to be
undone once we are done with Linalg transformations. After iterators and
induction variables are materialized (i.e. after lowering out of
`linalg.generic` occurred), the overall performance will be greatly influenced
by the quality of canonicalizations, foldings and *Loop Independent Code Motion*
by the quality of canonicalization, foldings and *Loop Independent Code Motion*
(LICM).

In the grander scheme, the reliance on late LICM was deemed a necessary risk.
Expand Down
2 changes: 1 addition & 1 deletion mlir/docs/PDLL.md
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ Pattern {
}
```

Below are the set of contexts in which result type inferrence is supported:
Below are the set of contexts in which result type inference is supported:

##### Inferred Results of Replacement Operation

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class MultiAffineFunction {
/// The space of this function. The domain variables are considered as the
/// input variables of the function. The range variables are considered as
/// the outputs. The symbols parametrize the function and locals are used to
/// represent divisions. Each local variable has a corressponding division
/// represent divisions. Each local variable has a corresponding division
/// representation stored in `divs`.
PresburgerSpace space;

Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/AsmParser/AsmParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ parseAsmSourceFile(const llvm::SourceMgr &sourceMgr, Block *block,
/// not, an error diagnostic is emitted to the context and a null value is
/// returned.
/// If `numRead` is provided, it is set to the number of consumed characters on
/// succesful parse. Otherwise, parsing fails if the entire string is not
/// successful parse. Otherwise, parsing fails if the entire string is not
/// consumed.
/// Some internal copying can be skipped if the source string is known to be
/// null terminated.
Expand All @@ -58,7 +58,7 @@ Attribute parseAttribute(llvm::StringRef attrStr, MLIRContext *context,
/// This parses a single MLIR type to an MLIR context if it was valid. If not,
/// an error diagnostic is emitted to the context.
/// If `numRead` is provided, it is set to the number of consumed characters on
/// succesful parse. Otherwise, parsing fails if the entire string is not
/// successful parse. Otherwise, parsing fails if the entire string is not
/// consumed.
/// Some internal copying can be skipped if the source string is known to be
/// null terminated.
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Bytecode/BytecodeImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class BytecodeDialectInterface

/// Read a type belonging to this dialect from the given reader. This method
/// should return null in the case of failure. Optionally, the dialect version
/// can be accessed thorugh the reader.
/// can be accessed through the reader.
virtual Type readType(DialectBytecodeReader &reader) const {
reader.emitError() << "dialect " << getDialect()->getNamespace()
<< " does not support reading types from bytecode";
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Bytecode/BytecodeReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BytecodeReader {
/// The lazyOps call back is invoked for every ops that can be lazy-loaded.
/// This let the client decide if the op should be materialized immediately or
/// delayed.
/// !! Using this materialize withing an IR walk() can be confusing: make sure
/// !! Using this materialize within an IR walk() can be confusing: make sure
/// to use a PreOrder traversal !!
LogicalResult materialize(
Operation *op, llvm::function_ref<bool(Operation *)> lazyOpsCallback =
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void populatePrepareVectorToMMAPatterns(RewritePatternSet &patterns,
/// The rest of the vector operations are left untouched.
LogicalResult convertVectorToMMAOps(RewriterBase &rewriter, Operation *rootOp);

/// Convert vector ops ops nested under `rootOp` to vector and GPU operaitons
/// Convert vector ops ops nested under `rootOp` to vector and GPU operations
/// compatible with the `nvvm.mma.sync` lowering path. This will convert a slice
/// of operations that can be legally lowered on this path while the rest of
/// the vector operations are left untouched.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace mlir {
namespace tracing {

/// This breakpoing intends to match a FileLineColLocation, that is a tuple of
/// This breakpoint intends to match a FileLineColLocation, that is a tuple of
/// file name, line number, and column number. Using -1 for the column and the
/// line number will match any column and line number respectively.
class FileLineColLocBreakpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// Defines SPIR-V transforms used when targetting WebGPU.
// Defines SPIR-V transforms used when targeting WebGPU.
//
//===----------------------------------------------------------------------===//

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/AttrTypeBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class AttrOrTypeDef<string valueType, string name, list<Trait> defTraits,
// Name of storage class to generate or use.
string storageClass = name # valueType # "Storage";

// Namespace (withing dialect c++ namespace) in which the storage class
// Namespace (within dialect c++ namespace) in which the storage class
// resides.
string storageNamespace = "detail";

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/OpImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ class AsmParser {
/// least one element will be parsed.
///
/// contextMessage is an optional message appended to "expected '('" sorts of
/// diagnostics when parsing the delimeters.
/// diagnostics when parsing the delimiters.
virtual ParseResult
parseCommaSeparatedList(Delimiter delimiter,
function_ref<ParseResult()> parseElementFn,
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/Threading.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file defines various utilies for multithreaded processing within MLIR.
// This file defines various utilities for multithreaded processing within MLIR.
// These utilities automatically handle many of the necessary threading
// conditions, such as properly ordering diagnostics, observing if threading is
// disabled, etc. These utilities should be used over other threading utilities
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Interfaces/Utils/InferIntRangeCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace intrange {
using InferRangeFn =
std::function<ConstantIntRanges(ArrayRef<ConstantIntRanges>)>;

/// Function that performs inferrence on an array of `IntegerValueRange`.
/// Function that performs inference on an array of `IntegerValueRange`.
using InferIntegerValueRangeFn =
std::function<IntegerValueRange(ArrayRef<IntegerValueRange>)>;

Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/TableGen/Class.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MethodSignature {

/// Determine whether a method with this signature makes a method with
/// `other` signature redundant. This occurs if the signatures have the same
/// name and this signature's parameteres subsume the other's.
/// name and this signature's parameters subsume the other's.
///
/// A method that makes another method redundant with a different return type
/// can replace the other, the assumption being that the subsuming method
Expand Down Expand Up @@ -325,7 +325,7 @@ class Method : public ClassDeclarationBase<ClassDeclaration::Method> {
};

/// Create a method with a return type, a name, method properties, and a some
/// parameters. The parameteres may be passed as a list or as a variadic pack.
/// parameters. The parameters may be passed as a list or as a variadic pack.
template <typename RetTypeT, typename NameT, typename... Args>
Method(RetTypeT &&retType, NameT &&name, Properties properties,
Args &&...args)
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/TableGen/Constraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ class Constraint {
// not provided, returns an empty string.
StringRef getDescription() const;

/// Returns the name of the TablGen def of this constraint. In some cases
/// Returns the name of the TableGen def of this constraint. In some cases
/// where the current def is anonymous, the name of the base def is used (e.g.
/// `std::optional<>`/`Variadic<>` type constraints).
StringRef getDefName() const;

/// Returns a unique name for the TablGen def of this constraint. This is
/// Returns a unique name for the TableGen def of this constraint. This is
/// generally just the name of the def, but in some cases where the current
/// def is anonymous, the name of the base def is attached (to provide more
/// context on the def).
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Tools/PDLL/AST/Nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class DeclScope {
/// nodes.
class Node {
public:
/// This CRTP class provides several utilies when defining new AST nodes.
/// This CRTP class provides several utilities when defining new AST nodes.
template <typename T, typename BaseT>
class NodeBase : public BaseT {
public:
Expand Down Expand Up @@ -1312,7 +1312,7 @@ class Module final : public Node::NodeBase<Module, Node>,
};

//===----------------------------------------------------------------------===//
// Defered Method Definitions
// Deferred Method Definitions
//===----------------------------------------------------------------------===//

inline bool Decl::classof(const Node *node) {
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Tools/PDLL/AST/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class AttributeType : public Type::TypeBase<detail::AttributeTypeStorage> {
//===----------------------------------------------------------------------===//

/// This class represents a PDLL type that corresponds to a constraint. This
/// type has no MLIR C++ API correspondance.
/// type has no MLIR C++ API correspondence.
class ConstraintType : public Type::TypeBase<detail::ConstraintTypeStorage> {
public:
using Base::Base;
Expand Down Expand Up @@ -231,7 +231,7 @@ class ValueRangeType : public RangeType {
//===----------------------------------------------------------------------===//

/// This class represents a PDLL type that corresponds to a rewrite reference.
/// This type has no MLIR C++ API correspondance.
/// This type has no MLIR C++ API correspondence.
class RewriteType : public Type::TypeBase<detail::RewriteTypeStorage> {
public:
using Base::Base;
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/PDLL/ODS/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Context {
/// operation already existed).
std::pair<Operation *, bool>
insertOperation(StringRef name, StringRef summary, StringRef desc,
StringRef nativeClassName, bool supportsResultTypeInferrence,
StringRef nativeClassName, bool supportsResultTypeInference,
SMLoc loc);

/// Lookup an operation registered with the given name, or null if no
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/PDLL/ODS/Dialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Dialect {
/// operation already existed).
std::pair<Operation *, bool>
insertOperation(StringRef name, StringRef summary, StringRef desc,
StringRef nativeClassName, bool supportsResultTypeInferrence,
StringRef nativeClassName, bool supportsResultTypeInference,
SMLoc loc);

/// Lookup an operation registered with the given name, or null if no
Expand Down
10 changes: 5 additions & 5 deletions mlir/include/mlir/Tools/PDLL/ODS/Operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ class Operation {
/// Returns the results of this operation.
ArrayRef<OperandOrResult> getResults() const { return results; }

/// Return if the operation is known to support result type inferrence.
bool hasResultTypeInferrence() const { return supportsTypeInferrence; }
/// Return if the operation is known to support result type inference.
bool hasResultTypeInference() const { return supportsTypeInference; }

private:
Operation(StringRef name, StringRef summary, StringRef desc,
StringRef nativeClassName, bool supportsTypeInferrence, SMLoc loc);
StringRef nativeClassName, bool supportsTypeInference, SMLoc loc);

/// The name of the operation.
std::string name;
Expand All @@ -184,8 +184,8 @@ class Operation {
/// The native class name of the operation, used when generating native code.
std::string nativeClassName;

/// Flag indicating if the operation is known to support type inferrence.
bool supportsTypeInferrence;
/// Flag indicating if the operation is known to support type inference.
bool supportsTypeInference;

/// The source location of this operation.
SMRange location;
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/ParseUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file containts common utilities for implementing the file-parsing
// This file contains common utilities for implementing the file-parsing
// behaviour for MLIR tools.
//
//===----------------------------------------------------------------------===//
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/lsp-server-support/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ struct ParameterInformation {
/// The label of this parameter. Ignored when labelOffsets is set.
std::string labelString;

/// Inclusive start and exclusive end offsets withing the containing signature
/// Inclusive start and exclusive end offsets within the containing signature
/// label.
std::optional<std::pair<unsigned, unsigned>> labelOffsets;

Expand Down
17 changes: 9 additions & 8 deletions mlir/include/mlir/Transforms/DialectConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,15 @@ class TypeConverter {
///
/// The conversion functions take a non-null Type or subclass of Type and a
/// non-null Attribute (or subclass of Attribute), and returns a
/// `AttributeConversionResult`. This result can either contan an `Attribute`,
/// which may be `nullptr`, representing the conversion's success,
/// `AttributeConversionResult::na()` (the default empty value), indicating
/// that the conversion function did not apply and that further conversion
/// functions should be checked, or `AttributeConversionResult::abort()`
/// indicating that the conversion process should be aborted.
/// `AttributeConversionResult`. This result can either contain an
/// `Attribute`, which may be `nullptr`, representing the conversion's
/// success, `AttributeConversionResult::na()` (the default empty value),
/// indicating that the conversion function did not apply and that further
/// conversion functions should be checked, or
/// `AttributeConversionResult::abort()` indicating that the conversion
/// process should be aborted.
///
/// Registered conversion functions are callled in the reverse of the order in
/// Registered conversion functions are called in the reverse of the order in
/// which they were registered.
template <
typename FnT,
Expand Down Expand Up @@ -673,7 +674,7 @@ class ConversionPatternRewriter final : public PatternRewriter {
/// If no block argument types are changing, the original block will be
/// left in place and returned.
///
/// A signature converison must be provided. (Type converters can construct
/// A signature conversion must be provided. (Type converters can construct
/// a signature conversion with `convertBlockSignature`.)
///
/// Optionally, a type converter can be provided to build materializations.
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Transforms/Inliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class InlinerConfig {
/// This is an implementation of the inliner
/// that operates bottom up over the Strongly Connected Components(SCCs)
/// of the CallGraph. This enables a more incremental propagation
/// of inlining decisions from the leafs to the roots of the callgraph.
/// of inlining decisions from the leaves to the roots of the callgraph.
class Inliner {
public:
/// This struct represents a resolved call to a given callgraph node. Given
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Transforms/OneToNTypeConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// unrealized casts by user-provided materializations. For this to work, the
// main function requires a special `TypeConverter`, a special
// `PatternRewriter`, and special RewritePattern`s, which extend their
// respective base classes for 1:N type converions.
// respective base classes for 1:N type conversions.
//
// Note that this is much more simple-minded than the "real" dialect conversion,
// which checks for legality before applying patterns and does probably many
Expand Down Expand Up @@ -179,7 +179,7 @@ class OneToNPatternRewriter : public PatternRewriter {
};

/// Base class for patterns with 1:N type conversions. Derived classes have to
/// overwrite the `matchAndRewrite` overlaod that provides additional
/// overwrite the `matchAndRewrite` overload that provides additional
/// information for 1:N type conversions.
class OneToNConversionPattern : public RewritePatternWithConverter {
public:
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def RemoveDeadValues : Pass<"remove-dead-values"> {
(A) Removes function arguments that are not live,
(B) Removes function return values that are not live across all callers of
the function,
(C) Removes unneccesary operands, results, region arguments, and region
(C) Removes unnecessary operands, results, region arguments, and region
terminator operands of region branch ops, and,
(D) Removes simple and region branch ops that have all non-live results and
don't affect memory in any way,
Expand Down Expand Up @@ -412,7 +412,7 @@ def SROA : Pass<"sroa"> {
let summary = "Scalar Replacement of Aggregates";
let description = [{
Scalar Replacement of Aggregates. Replaces allocations of aggregates into
independant allocations of its elements.
independent allocations of its elements.

Allocators must implement `DestructurableAllocationOpInterface` to provide
the list of memory slots for which destructuring should be attempted.
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Transforms/RegionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void getUsedValuesDefinedAbove(MutableArrayRef<Region> regions,
/// - `cloneOperationIntoRegion` is a callback that allows caller to specify
/// if the operation defining an `OpOperand` needs to be cloned into the
/// region. Then the operands of this operation become part of the captured
/// values set (unless the operations that define the operands themeselves
/// values set (unless the operations that define the operands themselves
/// are to be cloned). The cloned operations are added to the entry block
/// of the region.
/// Return the set of captured values for the operation.
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Analysis/Presburger/PWMAFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static void addDivisionConstraints(IntegerRelation &rel,
}

IntegerRelation MultiAffineFunction::getAsRelation() const {
// Create a relation corressponding to the input space plus the divisions
// Create a relation corresponding to the input space plus the divisions
// used in outputs.
IntegerRelation result(PresburgerSpace::getRelationSpace(
space.getNumDomainVars(), 0, space.getNumSymbolVars(),
Expand Down
Loading