@@ -46,7 +46,7 @@ static bool hasStaticIdentityLayout(MemRefType type) {
4646// / Return the dynamic shapes of the `memref` based on the define op. If the
4747// / complete dynamic shape fails to be captured, return an empty value.
4848// / Currently, only function parameters are supported for capturing.
49- static ValueRange getDynamicSize (Value memref, func::FuncOp funcOp) {
49+ static SmallVector<Value> getDynamicSize (Value memref, func::FuncOp funcOp) {
5050 auto *defOp = memref.getDefiningOp ();
5151 if (!defOp)
5252 return {};
@@ -73,8 +73,9 @@ static ValueRange getDynamicSize(Value memref, func::FuncOp funcOp) {
7373
7474// / Returns the dynamic sizes at the callee, through the call relationship
7575// / between the caller and callee.
76- static ValueRange mapDynamicSizeAtCaller (func::CallOp call, func::FuncOp callee,
77- ValueRange dynamicSizes) {
76+ static SmallVector<Value> mapDynamicSizeAtCaller (func::CallOp call,
77+ func::FuncOp callee,
78+ ValueRange dynamicSizes) {
7879 SmallVector<Value> mapedDynamicSizes;
7980 for (Value size : dynamicSizes) {
8081 auto callOperands = call.getOperands ();
@@ -230,9 +231,9 @@ updateCalls(ModuleOp module,
230231 options.dynamicSizesMap .lookup (callee);
231232 size_t dynamicSizesIndex = 0 ;
232233 for (Value memref : replaceWithOutParams) {
233- ValueRange dynamicSize = dynamicSizes.size () > dynamicSizesIndex
234- ? dynamicSizes[dynamicSizesIndex]
235- : SmallVector<Value>();
234+ SmallVector<Value> dynamicSize = dynamicSizes.size () > dynamicSizesIndex
235+ ? dynamicSizes[dynamicSizesIndex]
236+ : SmallVector<Value>();
236237 bool memrefStaticShape =
237238 cast<MemRefType>(memref.getType ()).hasStaticShape ();
238239 if (!memrefStaticShape && dynamicSize.empty ()) {
0 commit comments