[Mlir-commits] [mlir] [mlir][gpu] Eliminate redundant gpu.barrier ops (PR #71575)
Guray Ozen
llvmlistbot at llvm.org
Tue Nov 7 23:09:19 PST 2023
grypp wrote:
> @grypp Agreed that we can do better for eliding unnecessary barriers. That can happen as a next step to me; and we'd likely need a dedicated pass to have some complicated analysis.
I want to start by saying that I'm not against this barrier elimination, but at the moment, PR doesn't seem to offer any performance improvements. Additionally, if we were to introduce a dedicated pass, this code might become unnecessary.
I was wondering if we could explore ways to improve the value of this PR. For instance, could we consider checking for arithmetic operations between the barriers and potentially remove those barriers as well to make it more useful?
```
gpu.barriers
arith scalar
arith scalar
gpu.barriers -> remove this
arith scalar
arith scalar
gpu.barriers
```
https://github.com/llvm/llvm-project/pull/71575
More information about the Mlir-commits
mailing list