[Mlir-commits] [mlir] Add a structured if operation (PR #67234)

Simon Camphausen llvmlistbot at llvm.org
Tue Sep 26 02:48:09 PDT 2023


================
@@ -402,4 +403,102 @@ def EmitC_VariableOp : EmitC_Op<"variable", []> {
   let hasVerifier = 1;
 }
 
+def EmitC_AssignOp : EmitC_Op<"assign", [MemoryEffects<[MemWrite]>]> {
----------------
simon-camp wrote:

I think we can be a bit more strict with the MemoryEffects, i.e. `var` is written and `value` is read. This kind of resembles the [memref.copy](https://github.com/llvm/llvm-project/blob/7675f541f75baa20e8ec007cd625a837e89fc01f/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td#L518) op.

And I guess the Variable op could get the [MemAlloc effect](https://github.com/llvm/llvm-project/blob/7675f541f75baa20e8ec007cd625a837e89fc01f/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td#L75).

https://github.com/llvm/llvm-project/pull/67234


More information about the Mlir-commits mailing list