[Mlir-commits] [mlir] Check linalg.generic arguments to prevent crashing when they are deleted (PR #119110)

Renat Idrisov llvmlistbot at llvm.org
Wed Dec 11 13:32:17 PST 2024


parsifal-47 wrote:

> I'm not sure this fix is correct: seems like working around an issue with the pass: seems like the pass should batch the changes and apply them later instead of eagerly applying the change, breaking the IR, but trying to call functions like `isMemoryEffectFree()` on the broken IR. I'm afraid that this is getting in a rabbit hole of trying to make every IR helper robust to broken IR, which isn't tractable (nor is the way we usually try to tackle this).

I understand, this may be invalid argument, but other operations are unlike `linalg.generic` they provide "safe" isMemoryEffectFree function which does not break when args are null.

What would you recommend, precompute this function for all nodes in IR and then use it when walking?

Thank you!

https://github.com/llvm/llvm-project/pull/119110


More information about the Mlir-commits mailing list