iree-org / iree-llvm-sandbox

A sandbox for quick iteration and experimentation on projects related to IREE, MLIR, and LLVM
Apache License 2.0
54 stars 31 forks source link

[Substrait] Implement `project` operation. #833

Closed ingomueller-net closed 3 months ago

ingomueller-net commented 5 months ago

The design takes the decision to encode all Expression messages of the expressions field of the ProjectRel message as a single, combined region, where each expression corresponds to one of the yielded values. A possible alternative would be to have one region per expression. However, the current design not only seems more readable and more idiomatic MLIR but, in particular, allows for out-of-the-box CSE within a single project op.

Since the yield op only supported a single operand, this PR also changes that op plus a few usages to a variadic value operand.