Memrefs with affine_map in the results of normalizable operation were
not normalized by --normalize-memrefs option. This patch normalizes
@bondhugula @avarmapml I found the results(returend memref) of normalizable operation were not normalized by --normalize-memrefs.
In test case, %1 was not normalized. This patch fixes it.
%1 = "test.op_norm_ret"(%arg0, %arg1) : (memref<1x32768xf32>, memref<1x16x14x14xf32, #map1>) -> (memref<1x16x14x14xf32, #map1>)
Could you review this patch?
Hi @imaihal, thank you for this patch.
The function normalizeFuncOpMemRefs has become quite long and I believe it'd be better to split the logic into modular sub-functions.
AllocOps, function arguments, result types, and external functions are being addressed within and maybe we can have separate functions for each of them.
Not sure if this change should go into this patch, maybe @bondhugula can say better.
Comment should be terminated with a full stop.
Thanks for adding this support. Some minor comments. I'll be able to review post the refactoring.
You don't need dyn_cast here - !isa<CallOp>(op) will do.
Nit: consider using map_tile.
-> ... of an op that has normalizable memref results.
I moved part of the code to newly created function in Util.cpp. So, I think the lambda is not so long now. Also, I wrote comments about the outline at the top.
I wrote comments more in newly created function in Util.cpp.