diff --git a/mlir/docs/Dialects/LLVM.md b/mlir/docs/Dialects/LLVM.md --- a/mlir/docs/Dialects/LLVM.md +++ b/mlir/docs/Dialects/LLVM.md @@ -322,7 +322,7 @@ instructions and are therefore prefixed with `llvm.mlir`. Inline constants can be created by `llvm.mlir.constant`, which currently -supports integer, float, string or elements attributes (constant sturcts are not +supports integer, float, string or elements attributes (constant structs are not currently supported). LLVM IR constant expressions are expected to be constructed as sequences of regular operations on SSA values produced by `llvm.mlir.constant`. Additionally, MLIR provides semantically-charged diff --git a/mlir/docs/SPIRVToLLVMDialectConversion.md b/mlir/docs/SPIRVToLLVMDialectConversion.md --- a/mlir/docs/SPIRVToLLVMDialectConversion.md +++ b/mlir/docs/SPIRVToLLVMDialectConversion.md @@ -2,7 +2,7 @@ This manual describes the conversion from [SPIR-V Dialect](Dialects/SPIR-V.md) to [LLVM Dialect](Dialects/LLVM.md). It assumes familiarity with both, and -describes the design choices behind the modelling of SPIR-V conscepts in LLVM +describes the design choices behind the modelling of SPIR-V concepts in LLVM Dialect. The conversion is an ongoing work, and is expected to grow as more features are implemented. @@ -49,7 +49,7 @@ ### Array types -SPIR-V distiguishes between array type and run-time array type, the length of +SPIR-V distinguishes between array type and run-time array type, the length of which is not known at compile time. In LLVM, it is possible to index beyond the end of the array. Therfore, runtime array can be implemented as a zero length array type. @@ -209,7 +209,7 @@ ``` Also, note that if the bitwidth of `offset` or `count` is greater than the - bitwidth of `base`, truncation is still permitted. This is beacuse the ops have a + bitwidth of `base`, truncation is still permitted. This is because the ops have a defined behaviour with `offset` and `count` being less than the size of `base`. It creates a natural upper bound on what values `offset` and `count` can take, which is 64. This can be expressed in less than 8 bits. @@ -332,13 +332,13 @@ `spv.IEqual` | `llvm.icmp "eq"` `spv.INotEqual` | `llvm.icmp "ne"` `spv.FOrdEqual` | `llvm.fcmp "oeq"` -`spv.FOrdGreaterhan` | `llvm.fcmp "ogt"` +`spv.FOrdGreaterThan` | `llvm.fcmp "ogt"` `spv.FOrdGreaterThanEqual` | `llvm.fcmp "oge"` `spv.FOrdLessThan` | `llvm.fcmp "olt"` `spv.FOrdLessThanEqual` | `llvm.fcmp "ole"` `spv.FOrdNotEqual` | `llvm.fcmp "one"` `spv.FUnordEqual` | `llvm.fcmp "ueq"` -`spv.FUnordGreaterhan` | `llvm.fcmp "ugt"` +`spv.FUnordGreaterThan` | `llvm.fcmp "ugt"` `spv.FUnordGreaterThanEqual` | `llvm.fcmp "uge"` `spv.FUnordLessThan` | `llvm.fcmp "ult"` `spv.FUnordLessThanEqual` | `llvm.fcmp "ule"` @@ -416,13 +416,13 @@ #### Mapping -`spv.constant` is mapped to `llvm.mlir.constant`. This is a strightforward +`spv.constant` is mapped to `llvm.mlir.constant`. This is a straightforward conversion pattern with a special case when the argument is signed or unsigned. #### Special case SPIR-V constant can be a signed or unsigned integer. Since LLVM Dialect does not -have signedness semantics, this case should be handeled separately. +have signedness semantics, this case should be handled separately. The conversion casts constant value attribute to a signless integer or a vector of signless integers. This is correct because in SPIR-V, like in LLVM, how to @@ -481,7 +481,7 @@ **Note: these conversions have not been implemented yet** -## GLSL extended instriction set +## GLSL extended instruction set **Note: these conversions have not been implemented yet** diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp --- a/mlir/lib/Analysis/Presburger/Simplex.cpp +++ b/mlir/lib/Analysis/Presburger/Simplex.cpp @@ -674,7 +674,7 @@ } else { if (simplex.con[i + 1].orientation == Orientation::Row) { unsigned ineqRow = simplex.con[i + 1].pos; - // Since it is an equality, the the sample value must be zero. + // Since it is an equality, the sample value must be zero. assert(simplex.tableau(ineqRow, 1) == 0 && "Equality's sample value must be zero."); for (unsigned col = 2; col < simplex.nCol; ++col) { diff --git a/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp --- a/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp +++ b/mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp @@ -101,7 +101,7 @@ LLVM::LLVMType getInt32Type() { return llvmInt32Type; } LLVM::LLVMType getInt64Type() { return llvmInt64Type; } - /// Creates a LLVM global for the given `name`. + /// Creates an LLVM global for the given `name`. Value createEntryPointNameConstant(StringRef name, Location loc, OpBuilder &builder); diff --git a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp --- a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp +++ b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp @@ -102,7 +102,7 @@ } // Emit to `os` the operator-name driven check and the call to LLVM IRBuilder -// for one definition of a LLVM IR Dialect operation. Return true on success. +// for one definition of an LLVM IR Dialect operation. Return true on success. static bool emitOneBuilder(const Record &record, raw_ostream &os) { auto op = tblgen::Operator(record);