[Mlir-commits] [mlir] Check linalg.generic arguments to prevent crashing when they are deleted (PR #119110)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Dec 12 07:09:47 PST 2024
banach-space wrote:
Hi @parsifal-47 ,
I'm not that familiar with this area, but will try to help.
> other operations are unlike linalg.generic they provide "safe" isMemoryEffectFree function which does not break when args are null.
Do you have links? I'm curious where the discrepancy is coming from.
> What would you recommend, precompute this function for all nodes in IR and then use it when walking?
IIUC, the suggestion is to pre-compute things to delete, then remove the operation and then the arguments. Perhaps the latter won't be needed if the only consumer is deleted.
> Another approach to propose is to remove simple operation if at least one of its arguments is already removed
Is this valid though: "if one argument of Op has been deleted --> Op can be deleted"?
https://github.com/llvm/llvm-project/pull/119110
More information about the Mlir-commits
mailing list