The new builders get a list of additional attrs, a lambda to build the region
body and infer return types from init.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td | ||
---|---|---|
271 | I personally find it very confusing to have something named init that is just ignored.. As an analogy, consider how one would write c = a + b vs c += a + b. This is part of the bigger discussion in https://reviews.llvm.org/D136875. |
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td | ||
---|---|---|
271 | Technically, it is init for the DPS interface, but we can rename to $out in the MapOp definition in TableGen. Would it be fine? I commented in the bigger discussion in the https://reviews.llvm.org/D136875. |
I personally find it very confusing to have something named init that is just ignored..
Init suggests it must be initialized properly, out does not have that baggage (but has other problems).
As an analogy, consider how one would write c = a + b vs c += a + b.
I am yet unaware the best way to proceed as it has implications on the dependence chains for bufferization.
The tradeoff goes relatively deep and also impacts how higher levels (or IR programmers) should target this, it is not just a trivial bikeshedding thing.
This is part of the bigger discussion in https://reviews.llvm.org/D136875.
This commit may need to be reverted depending on what the discussion above yields.