Skip to content

Commit c04e41a

Browse files
committed
Use getMixedValues
1 parent 9b7e059 commit c04e41a

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,30 +1361,16 @@ def AMDGPU_MakeDmaDescriptorOp :
13611361
return getBase().getType().getElementType().getIntOrFloatBitWidth();
13621362
}
13631363

1364-
SmallVector<OpFoldResult> getMixedList(SmallVector<Value> dynamics, ArrayRef<int64_t> statics) {
1365-
SmallVector<OpFoldResult> result;
1366-
unsigned ctr = 0;
1367-
OpBuilder b(getContext());
1368-
for (int64_t static_elem : statics) {
1369-
if (ShapedType::isDynamic(static_elem)) {
1370-
result.push_back(dynamics[ctr++]);
1371-
} else {
1372-
result.push_back(b.getIndexAttr(static_elem));
1373-
}
1374-
}
1375-
return result;
1376-
}
1377-
13781364
SmallVector<OpFoldResult> getMixedGlobalSizes() {
1379-
return getMixedList(getGlobalDynamicSizes(), getGlobalStaticSizes());
1365+
return getMixedValues(getGlobalStaticSizes(), getGlobalDynamicSizes(), getContext());
13801366
}
13811367

13821368
SmallVector<OpFoldResult> getMixedGlobalStrides() {
1383-
return getMixedList(getGlobalDynamicStrides(), getGlobalStaticStrides());
1369+
return getMixedValues(getGlobalStaticStrides(), getGlobalDynamicStrides(), getContext());
13841370
}
13851371

13861372
SmallVector<OpFoldResult> getMixedSharedSizes() {
1387-
return getMixedList(getSharedDynamicSizes(), getSharedStaticSizes());
1373+
return getMixedValues(getSharedStaticSizes(), getSharedDynamicSizes(), getContext());
13881374
}
13891375
}];
13901376

0 commit comments

Comments
 (0)