[Mlir-commits] [mlir] [mlir][emitc] Add op modelling C expressions (PR #71631)
Marius Brehler
llvmlistbot at llvm.org
Mon Dec 18 23:00:35 PST 2023
================
@@ -494,18 +572,24 @@ def EmitC_AssignOp : EmitC_Op<"assign", []> {
}
def EmitC_YieldOp : EmitC_Op<"yield",
- [Pure, Terminator, ParentOneOf<["IfOp", "ForOp"]>]> {
+ [Pure, Terminator, ParentOneOf<["ExpressionOp", "IfOp", "ForOp"]>]> {
let summary = "block termination operation";
let description = [{
- "yield" terminates blocks within EmitC control-flow operations. Since
- control-flow constructs in C do not return values, this operation doesn't
- take any arguments.
+ "yield" terminates its parent EmitC op's region, optionally yielding
+ an SSA value. The semantics of how the values are yielded is defined by the
+ parent operation.
+ If "yield" has an operand, the operand must match the parent operation's
----------------
marbre wrote:
I was wondering (but I am not a native speaker!) if this should be
```suggestion
If "yield" has an operand, the operand must match the parent's operation
```
https://github.com/llvm/llvm-project/pull/71631
More information about the Mlir-commits
mailing list