The Memref Prefetch operation has no memory side effects, which is a problem because some MLIR passes requires Memory Sideffects.
E.g. we have an optimization that fails because of OwnershipBasedBufferDeallocation’s
if (!isa<MemoryEffectOpInterface>(op) &&
!op->hasTrait<OpTrait::HasRecursiveMemoryEffects>() &&
!isa<CallOpInterface>(op)) {
Is there any plan to add this interface to prefetch? Memref load/store have memory side effects, e.g. LoadOp
let arguments = (ins Arg<AnyMemRef, "the reference to load from",
[MemRead]>:$memref,
We got good improvement by adding prefetch, so it would be great to continue having this option.
Thanks
ftynse
2
Nobody needed it enough to contribute a patch™
Suggestion on what the patch would look like. Happy to contribute if no expert can quickly whip out a solution
I have a PR implementing a fix, if anyone is interested in reviewing it