[Mlir-commits] [mlir] [mlir] Handle backedges in --view-op-graph (PR #82002)

Artem Tyurin llvmlistbot at llvm.org
Sat Feb 17 05:12:07 PST 2024


agentcooper wrote:

@joker-eph I gave it another try and it seems that now it can handle cycles as well.

Example from [MLIR Language Reference](https://mlir.llvm.org/docs/LangRef/#graph-regions):

```mlir
"test.graph_region"() ({ // A Graph region
  %1 = "op1"(%1, %3) : (i32, i32) -> (i32)  // OK: %1, %3 allowed here
  %2 = "test.ssacfg_region"() ({
     %5 = "op2"(%1, %2, %3, %4) : (i32, i32, i32, i32) -> (i32) // OK: %1, %2, %3, %4 all defined in the containing region
  }) : () -> (i32)
  %3 = "op2"(%1, %4) : (i32, i32) -> (i32)  // OK: %4 allowed here
  %4 = "op3"(%1) : (i32) -> (i32)
}) : () -> ()
```

![image](https://github.com/llvm/llvm-project/assets/794591/3808946e-b056-461f-a462-32306e45d6e5)


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


More information about the Mlir-commits mailing list