Skip to content

Commit 2edcaa6

Browse files
committed
Fix more
1 parent cd4dec1 commit 2edcaa6

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

mlir/include/mlir/Transforms/Passes.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def RemoveDeadValues : Pass<"remove-dead-values"> {
106106
(A) Removes function arguments that are not live,
107107
(B) Removes function return values that are not live across all callers of
108108
the function,
109-
(C) Removes unneccesary operands, results, region arguments, and region
109+
(C) Removes unnecessary operands, results, region arguments, and region
110110
terminator operands of region branch ops, and,
111111
(D) Removes simple and region branch ops that have all non-live results and
112112
don't affect memory in any way,
@@ -412,7 +412,7 @@ def SROA : Pass<"sroa"> {
412412
let summary = "Scalar Replacement of Aggregates";
413413
let description = [{
414414
Scalar Replacement of Aggregates. Replaces allocations of aggregates into
415-
independant allocations of its elements.
415+
independent allocations of its elements.
416416

417417
Allocators must implement `DestructurableAllocationOpInterface` to provide
418418
the list of memory slots for which destructuring should be attempted.

mlir/lib/Dialect/LLVMIR/IR/LLVMMemorySlot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static bool areConversionCompatible(const DataLayout &layout, Type targetType,
174174

175175
/// Checks if `dataLayout` describes a little endian layout.
176176
static bool isBigEndian(const DataLayout &dataLayout) {
177-
auto endiannessStr = dyn_cast_or_null<StringAttr>(dataLayout.getEndiannesss());
177+
auto endiannessStr = dyn_cast_or_null<StringAttr>(dataLayout.getEndianness());
178178
return endiannessStr && endiannessStr == "big";
179179
}
180180

mlir/lib/Interfaces/DataLayoutInterfaces.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ std::optional<uint64_t> mlir::detail::getDefaultIndexBitwidth(
239239

240240
// Returns the endianness if specified in the given entry. If the entry is empty
241241
// the default endianness represented by an empty attribute is returned.
242-
Attribute mlir::detail::getDefaultEndiannesss(DataLayoutEntryInterface entry) {
242+
Attribute mlir::detail::getDefaultEndianness(DataLayoutEntryInterface entry) {
243243
if (entry == DataLayoutEntryInterface())
244244
return Attribute();
245245

@@ -580,19 +580,19 @@ std::optional<uint64_t> mlir::DataLayout::getTypeIndexBitwidth(Type t) const {
580580
});
581581
}
582582

583-
mlir::Attribute mlir::DataLayout::getEndiannesss() const {
583+
mlir::Attribute mlir::DataLayout::getEndianness() const {
584584
checkValid();
585585
if (endianness)
586586
return *endianness;
587587
DataLayoutEntryInterface entry;
588588
if (originalLayout)
589589
entry = originalLayout.getSpecForIdentifier(
590-
originalLayout.getEndiannesssIdentifier(originalLayout.getContext()));
590+
originalLayout.getEndiannessIdentifier(originalLayout.getContext()));
591591

592592
if (auto iface = dyn_cast_or_null<DataLayoutOpInterface>(scope))
593-
endianness = iface.getEndiannesss(entry);
593+
endianness = iface.getEndianness(entry);
594594
else
595-
endianness = detail::getDefaultEndiannesss(entry);
595+
endianness = detail::getDefaultEndianness(entry);
596596
return *endianness;
597597
}
598598

mlir/lib/Target/LLVMIR/DataLayoutImporter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ DataLayoutImporter::tryToEmplacePointerAlignmentEntry(LLVMPointerType type,
149149
}
150150

151151
LogicalResult
152-
DataLayoutImporter::tryToEmplaceEndiannesssEntry(StringRef endianness,
152+
DataLayoutImporter::tryToEmplaceEndiannessEntry(StringRef endianness,
153153
StringRef token) {
154-
auto key = StringAttr::get(context, DLTIDialect::kDataLayoutEndiannesssKey);
154+
auto key = StringAttr::get(context, DLTIDialect::kDataLayoutEndiannessKey);
155155
if (keyEntries.count(key))
156156
return success();
157157

@@ -236,14 +236,14 @@ void DataLayoutImporter::translateDataLayout(
236236

237237
// Parse the endianness.
238238
if (*prefix == "e") {
239-
if (failed(tryToEmplaceEndiannesssEntry(
240-
DLTIDialect::kDataLayoutEndiannesssLittle, token)))
239+
if (failed(tryToEmplaceEndiannessEntry(
240+
DLTIDialect::kDataLayoutEndiannessLittle, token)))
241241
return;
242242
continue;
243243
}
244244
if (*prefix == "E") {
245-
if (failed(tryToEmplaceEndiannesssEntry(
246-
DLTIDialect::kDataLayoutEndiannesssBig, token)))
245+
if (failed(tryToEmplaceEndiannessEntry(
246+
DLTIDialect::kDataLayoutEndiannessBig, token)))
247247
return;
248248
continue;
249249
}

mlir/lib/Target/LLVMIR/DataLayoutImporter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class DataLayoutImporter {
9393
StringRef token);
9494

9595
/// Adds an endianness entry if there is none yet.
96-
LogicalResult tryToEmplaceEndiannesssEntry(StringRef endianness,
96+
LogicalResult tryToEmplaceEndiannessEntry(StringRef endianness,
9797
StringRef token);
9898

9999
/// Adds an alloca address space entry if there is none yet.

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ translateDataLayout(DataLayoutSpecInterface attribute,
190190
auto key = llvm::dyn_cast_if_present<StringAttr>(entry.getKey());
191191
if (!key)
192192
continue;
193-
if (key.getValue() == DLTIDialect::kDataLayoutEndiannesssKey) {
193+
if (key.getValue() == DLTIDialect::kDataLayoutEndiannessKey) {
194194
auto value = cast<StringAttr>(entry.getValue());
195195
bool isLittleEndian =
196-
value.getValue() == DLTIDialect::kDataLayoutEndiannesssLittle;
196+
value.getValue() == DLTIDialect::kDataLayoutEndiannessLittle;
197197
layoutStream << "-" << (isLittleEndian ? "e" : "E");
198198
layoutStream.flush();
199199
continue;

mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct TestDataLayoutQuery
4141
uint64_t alignment = layout.getTypeABIAlignment(op.getType());
4242
uint64_t preferred = layout.getTypePreferredAlignment(op.getType());
4343
uint64_t index = layout.getTypeIndexBitwidth(op.getType()).value_or(0);
44-
Attribute endianness = layout.getEndiannesss();
44+
Attribute endianness = layout.getEndianness();
4545
Attribute allocaMemorySpace = layout.getAllocaMemorySpace();
4646
Attribute programMemorySpace = layout.getProgramMemorySpace();
4747
Attribute globalMemorySpace = layout.getGlobalMemorySpace();

mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct CustomDataLayoutSpec
7777
}
7878
DataLayoutEntryListRef getEntries() const { return getImpl()->entries; }
7979
LogicalResult verifySpec(Location loc) { return success(); }
80-
StringAttr getEndiannesssIdentifier(MLIRContext *context) const {
80+
StringAttr getEndiannessIdentifier(MLIRContext *context) const {
8181
return Builder(context).getStringAttr(kEndiannessKeyName);
8282
}
8383
StringAttr getAllocaMemorySpaceIdentifier(MLIRContext *context) const {
@@ -189,7 +189,7 @@ struct SingleQueryType
189189
return 4;
190190
}
191191

192-
Attribute getEndiannesss(DataLayoutEntryInterface entry) {
192+
Attribute getEndianness(DataLayoutEntryInterface entry) {
193193
static bool executed = false;
194194
if (executed)
195195
llvm::report_fatal_error("repeated call");
@@ -463,7 +463,7 @@ module {}
463463
EXPECT_EQ(layout.getTypePreferredAlignment(IntegerType::get(&ctx, 42)), 8u);
464464
EXPECT_EQ(layout.getTypePreferredAlignment(Float16Type::get(&ctx)), 2u);
465465

466-
EXPECT_EQ(layout.getEndiannesss(), Attribute());
466+
EXPECT_EQ(layout.getEndianness(), Attribute());
467467
EXPECT_EQ(layout.getAllocaMemorySpace(), Attribute());
468468
EXPECT_EQ(layout.getProgramMemorySpace(), Attribute());
469469
EXPECT_EQ(layout.getGlobalMemorySpace(), Attribute());
@@ -495,7 +495,7 @@ TEST(DataLayout, NullSpec) {
495495
EXPECT_EQ(layout.getTypeIndexBitwidth(Float16Type::get(&ctx)), std::nullopt);
496496
EXPECT_EQ(layout.getTypeIndexBitwidth(IndexType::get(&ctx)), 64u);
497497

498-
EXPECT_EQ(layout.getEndiannesss(), Attribute());
498+
EXPECT_EQ(layout.getEndianness(), Attribute());
499499
EXPECT_EQ(layout.getAllocaMemorySpace(), Attribute());
500500
EXPECT_EQ(layout.getProgramMemorySpace(), Attribute());
501501
EXPECT_EQ(layout.getGlobalMemorySpace(), Attribute());
@@ -535,7 +535,7 @@ TEST(DataLayout, EmptySpec) {
535535
EXPECT_EQ(layout.getTypeIndexBitwidth(Float16Type::get(&ctx)), std::nullopt);
536536
EXPECT_EQ(layout.getTypeIndexBitwidth(IndexType::get(&ctx)), 64u);
537537

538-
EXPECT_EQ(layout.getEndiannesss(), Attribute());
538+
EXPECT_EQ(layout.getEndianness(), Attribute());
539539
EXPECT_EQ(layout.getAllocaMemorySpace(), Attribute());
540540
EXPECT_EQ(layout.getProgramMemorySpace(), Attribute());
541541
EXPECT_EQ(layout.getGlobalMemorySpace(), Attribute());
@@ -593,7 +593,7 @@ TEST(DataLayout, SpecWithEntries) {
593593
EXPECT_EQ(layout.getTypePreferredAlignment(IntegerType::get(&ctx, 32)), 64u);
594594
EXPECT_EQ(layout.getTypePreferredAlignment(Float32Type::get(&ctx)), 64u);
595595

596-
EXPECT_EQ(layout.getEndiannesss(), Builder(&ctx).getStringAttr("little"));
596+
EXPECT_EQ(layout.getEndianness(), Builder(&ctx).getStringAttr("little"));
597597
EXPECT_EQ(layout.getAllocaMemorySpace(), Builder(&ctx).getI32IntegerAttr(5));
598598
EXPECT_EQ(layout.getProgramMemorySpace(), Builder(&ctx).getI32IntegerAttr(3));
599599
EXPECT_EQ(layout.getGlobalMemorySpace(), Builder(&ctx).getI32IntegerAttr(2));

0 commit comments

Comments
 (0)