[Mlir-commits] [mlir] [mlir][emitc][cf] add 'cf.switch' support in CppEmitter (PR #101478)

Kirill Chibisov llvmlistbot at llvm.org
Fri Aug 2 05:36:41 PDT 2024


kchibisov wrote:

>Do your cf.switch ops come from a lowering of scf.index_switch ops? Then adding an emitc.switch op and adding a pattern to SCFToEmitC conversion would be easiest, I guess.

Ah, no, we start from `emitc` + our dialect directly, most of the time. We just need a way to declare something that will result in `switch` pattern, whether it'll be through the `cf.switch`, `scf.index_switch` or `emitc.switch` doesn't really matter, though, the version with just `break;` patterns will be preferred.

I just know that we'll need to patch emitter in the end of the day, so it should go upstream.

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


More information about the Mlir-commits mailing list