Skip to content

Commit 7de2e49

Browse files
authored
[mlir][NFC] Use Builder for getReassociationIndicesAttribute method. (llvm#137251)
The method does not need to create any operation, so we can use Builder. It can be reused by any attribute getter implementation, so it does not need to declare OpBuilder in the implementation. Signed-off-by: hanhanW <[email protected]>
1 parent 851f7c7 commit 7de2e49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ getSymbolLessAffineMaps(ArrayRef<ReassociationExprs> reassociation);
5757

5858
/// Wraps a list of reassociations in an ArrayAttr.
5959
ArrayAttr
60-
getReassociationIndicesAttribute(OpBuilder &b,
60+
getReassociationIndicesAttribute(Builder &b,
6161
ArrayRef<ReassociationIndices> reassociation);
6262

6363
/// Convert Array<Array<AffineExpr>> to Array<Array<int64_t>>.

mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ unsigned getMaxPosOfType(ArrayRef<ReassociationExprs> exprArrays) {
158158
}
159159

160160
ArrayAttr mlir::getReassociationIndicesAttribute(
161-
OpBuilder &b, ArrayRef<ReassociationIndices> reassociation) {
161+
Builder &b, ArrayRef<ReassociationIndices> reassociation) {
162162
SmallVector<Attribute, 4> reassociationAttr =
163163
llvm::to_vector<4>(llvm::map_range(
164164
reassociation, [&](const ReassociationIndices &indices) -> Attribute {

0 commit comments

Comments
 (0)