Skip to content

Commit 306efb7

Browse files
committed
Revert changes
Revert "add comment" This reverts commit 502bd1e. Revert "Make bool operator explicit" This reverts commit 1a68ecf. Revert "Style" This reverts commit 3ce76bc. Revert "Add AlignmentBytes class" This reverts commit 8798040.
1 parent b196c71 commit 306efb7

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

mlir/include/mlir/Dialect/Vector/IR/VectorOps.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ struct VectorDim {
7777
int64_t dim;
7878
bool isScalable;
7979
};
80-
81-
// Struct used to denote bytes is the unit of alignment.
82-
struct AlignmentBytes {
83-
uint64_t alignment = 0;
84-
AlignmentBytes() = default;
85-
explicit AlignmentBytes(uint64_t alignment) : alignment(alignment) {};
86-
explicit operator bool() const { return alignment; }
87-
uint64_t getAlignment() const { return alignment; }
88-
};
89-
9080
BroadcastableToResult
9181
isBroadcastableTo(Type srcType, VectorType dstVectorType,
9282
std::pair<VectorDim, VectorDim> *mismatchingDims = nullptr);

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,18 +1729,18 @@ def Vector_LoadOp : Vector_Op<"load", [
17291729
"Value":$base,
17301730
"ValueRange":$indices,
17311731
CArg<"bool", "false">:$nontemporal,
1732-
CArg<"AlignmentBytes", "AlignmentBytes()">: $alignment), [{
1732+
CArg<"uint64_t", "0">:$alignment), [{
17331733
return build($_builder, $_state, resultType, base, indices, nontemporal,
1734-
alignment ? $_builder.getI64IntegerAttr(alignment.getAlignment()) :
1734+
alignment != 0 ? $_builder.getI64IntegerAttr(alignment) :
17351735
nullptr);
17361736
}]>,
17371737
OpBuilder<(ins "TypeRange":$resultTypes,
17381738
"Value":$base,
17391739
"ValueRange":$indices,
17401740
CArg<"bool", "false">:$nontemporal,
1741-
CArg<"AlignmentBytes", "AlignmentBytes()">: $alignment), [{
1741+
CArg<"uint64_t", "0">:$alignment), [{
17421742
return build($_builder, $_state, resultTypes, base, indices, nontemporal,
1743-
alignment ? $_builder.getI64IntegerAttr(alignment.getAlignment()) :
1743+
alignment != 0 ? $_builder.getI64IntegerAttr(alignment) :
17441744
nullptr);
17451745
}]>
17461746
];
@@ -1847,9 +1847,9 @@ def Vector_StoreOp : Vector_Op<"store", [
18471847
"Value":$base,
18481848
"ValueRange":$indices,
18491849
CArg<"bool", "false">:$nontemporal,
1850-
CArg<"AlignmentBytes", "AlignmentBytes()">:$alignment), [{
1850+
CArg<"uint64_t", "0">:$alignment), [{
18511851
return build($_builder, $_state, valueToStore, base, indices, nontemporal,
1852-
alignment ? $_builder.getI64IntegerAttr(alignment.getAlignment()) :
1852+
alignment != 0 ? $_builder.getI64IntegerAttr(alignment) :
18531853
nullptr);
18541854
}]>
18551855
];

0 commit comments

Comments
 (0)