3 Commits

Author SHA1 Message Date
Kirill Chibisov
5344a370fe
[mlir][emitc] Fix form-expressions inside expression (#86081)
Make form-expressions not create `emitc.expression`s for operations
inside the `emitc.expression`s, since they are invalid.
2024-03-21 14:35:00 +01:00
Marius Brehler
7c63431cc2
[mlir][EmitC] Introduce a CExpression trait (#84177)
This adds a `CExpression` trait and replaces the `isCExpression()`
function.
2024-03-07 08:37:47 +01:00
Gil Rapaport
d9803841f2
[mlir][emitc] Add op modelling C expressions (#71631)
Add an emitc.expression operation that models C expressions, and provide
transforms to form and fold expressions. The translator emits the body
of
emitc.expression ops as a single C expression.
This expression is emitted by default as the RHS of an EmitC SSA value,
but if
possible, expressions with a single use that is not another expression
are
instead inlined. Specific expression's inlining can be fine tuned by
lowering
passes and transforms.
2023-12-20 15:04:46 +02:00