[Mlir-commits] [mlir] Remove Pure attribute from Linalg::IndexOp. (PR #68894)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Dec 11 17:15:21 PST 2023


MaheshRavishankar wrote:

> @joker-eph @MaheshRavishankar "constant within a region instance" (as opposed to "constant within a block") makes sense to me.  Ideally we'd be able to express that `linalg.index` is constant within the innermost `linalg.generic` it's a part of.

Yup. Also there shouldn't be nested linalg.generics anyway. They aren't explicitly illegal today cause it could be a  way of expressing programs, but it's not the "preferred way" afaik. So there are two issues here
1) Having a trait that says an op is constant within a region. This seems generally useful, but I don't know of any other op apart from linalg.index for which this applies.
2) if we make nested linalg ops illegal then the above issue is potentially mute cause you would never have case where it would be illegal to cse linalg.index ops. This issue came about because someone tried to use nested linalg ops.

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


More information about the Mlir-commits mailing list