llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
327 stars 86 forks source link

[CIR][CodeGen] Adds SwitchOp flattening #549

Closed gitoleg closed 3 months ago

gitoleg commented 4 months ago

This PR adds flattening for SwitchOp. Despite of the previous PRs, here we have to introduce an operation for the flattening, since later we'll need to create llvm.switch in the lowering. So cir.flat.switch is a new operation, which barely copied from the dialect. I added several tests as well.

gitoleg commented 4 months ago

@bcardosolopes done!