[Mlir-commits] [mlir] [mlir][spirv] Add definition for OpKill (PR #126554)
Igor Wodiany
llvmlistbot at llvm.org
Mon Feb 17 06:25:12 PST 2025
IgWod-IMG wrote:
So, I wasn't aware of the TODO and the issues. Looking at it, it seems that handling it shouldn't be too bad, due to the way SPIR-V MLIR is structured, i.e., we can identify entry, header, continue, merge within `spirv.mlir.loop`. Unless I missed something crucial here.
Nevertheless, there will probably be some details to work out, so I propose in this PR to have a blanket rule disallowing inlining OpKill in any context and then I'll work on a separate PR handling the issue properly. Although this will limit the inliner when OpKill is involved, it will also stop incorrect code being generated. I guess all that needs to be done is to add in `isLegalToInline`:
```c++
if (isa<spirv::KillOp>(op))
return false;
```
Does it sound reasonable?
https://github.com/llvm/llvm-project/pull/126554
More information about the Mlir-commits
mailing list