3 ms·
Thanks for these pointers. > https://mlir.llvm.org/docs/LangRef/#blocks https://mlir.llvm.org/docs/LangRef/#blocks From the example there it's clear that the
by tom_mellior 7y ago
Thanks for these pointers.
> https://mlir.llvm.org/docs/LangRef/#blocks https://mlir.llvm.org/docs/LangRef/#blocks
From the example there it's clear that the same value can have copies with different names, which would allow one to associate extra infos with the value used under certain names. In ^bb4 the same value can be accessed as %c, %d, or %e. In addition, this example really cannot be represented in the SSA flavor used by LLVM because LLVM does not have a copy instruction.
> Block Arguments vs PHI nodes: https://mlir.llvm.org/docs/Rationale/#block-arguments-vs-phi.. https://mlir.llvm.org/docs/Rationale/#block-arguments-vs-phi....
That contradicts itself: "This choice is representationally identical (the same constructs can be represented in either form) [...] LLVM has no way to represent values that are available only in one successor but not the other".
I'm still not convinced that these are just different syntaxes for the same thing.
- chrislattner 7y agoYou're right - BB arguments are more general than LLVM-style PHI nodes. They are a strict superset, but are otherwise isomorphic for the cases they both support. The talk we gave at CGO yesterday includes a few slides talking about the tradeoffs here. Those slides should be public in the next day or three.
- tom_mellior 7y agoI will be sure to check those out, thank you!