cda-group / arc

Programming Language for Continuous Deep Analytics
https://cda-group.github.io/arc/
44 stars 6 forks source link

Annihilate the `unit` type from MLIR codegen #254

Closed segeljakt closed 3 years ago

segeljakt commented 3 years ago

MLIR does not like unit types and therefore this commit rewrites all unit types and values into the void type (i.e., ()). If a function takes parameters which are unit, those parameters are also removed.

frej commented 3 years ago

The failing test is due to arc.enum_access "crate_Foo_Bar" in (%x_1 : !arc.enum<crate_Foo_Bar : none>) : () it has to be arc.enum_access "crate_Foo_Bar" in (%x_1 : !arc.enum<crate_Foo_Bar : none>) : none.

But instead of fixing that, I think you should change the test as it doesn't make sense to first check arc.enum_check (%x_1 : !arc.enum<crate_Foo_Bar : none>) is "crate_Foo_Bar" : i1 and then do an access of the same variant.