llvm-project
fb2d6709 - [CIR] Support zero-result ops in clangir TableGen lowering (#202273)

Commit
71 days ago
[CIR] Support zero-result ops in clangir TableGen lowering (#202273) ### summary This is follow-up to https://github.com/llvm/llvm-project/pull/199599 A CIR op can set the llvmOp field to have cir-tblgen auto-generate its CIR→LLVM lowering instead of using a hand-written pattern.However, the generated body forwards the result type via op.getType(), which only compiles for single-result ops. As a result, ops with zero results could not use this feature. To fix this, teach CIRLoweringEmitter to emit an empty mlir::TypeRange{} for zero-result ops. Then switch cir.lifetime.start and cir.lifetime.end to use llvmOp (dropping their hand-written lowering). The lifetime.cir test covers the generated path.
Author
Parents
Loading