[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 16:07:20 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).

Another approach to propose is to remove simple operation if at least one of its arguments is already removed without checking for memory safety because this check has been complete on Liveness analysis stage and since the argument is dead, the simple operation is dead and memory safe.

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


More information about the Mlir-commits mailing list