This trait results in PDL ops being erroneously CSE'd. These ops are side-effect free in the rewriter but not in the matcher (where unused values aren't allowed anyways). These ops should have a more nuanced side-effect modeling, this is fixing a bug introduced by a previous change.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This isn't what we want though. These ops are no side effecting in some cases, and we want to preserve that.
The commit description is also only assuming the use of the ops inside of the the match portion of a pattern.
Oh, yeah. I was just reversing https://reviews.llvm.org/D117826 because that's what introduced the bug...
But we can probably have more nuanced side-effects, like these are allocating only inside matchers.
Right, I'm fine with reverting the ones that are conservatively broken, just want to make sure the description holds and we aren't treating this as what the ideal end state should be.
mlir/include/mlir/Dialect/PDL/IR/PDLOps.td | ||
---|---|---|
503 | Are Result operations ever side effecting? AFAICT they always produce the same result based on the given input. |
mlir/include/mlir/Dialect/PDL/IR/PDLOps.td | ||
---|---|---|
503 | Oh yeah they aren't. |
Are Result operations ever side effecting? AFAICT they always produce the same result based on the given input.