[llvm] [MachinePipeliner] Add an abstract layer to manipulate Data Dependenc… (PR #109918)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 01:24:34 PDT 2024


kasuga-fj wrote:

Hi, @dpenry 

Thank you for your previous comment. On second thought, I am beginning to think that the code marked "To preserve previous behavior and prevent regression" should be left in place.

My guess remains the same as before. That is, I think the handling of these anti-dependencies looks unintentional to me. If loop-carried physical register dependencies are to be handled correctly, at least the following must also be considered (but are not now).

- Not only anti-dependencies, but also data-dependencies and output-dependencies need to be taken into account
- If there are multiple WAR dependencies of the same physical register, the current checks are insufficient
	- Example: https://godbolt.org/z/6vqKMb5TK
	- There is a loop-carried dependence between SU(3) and SU(0), but it is not handled

However, it is possible that the current implementation just happens to handle loop-carried dependencies correctly and works fine. So, now I agree with you that we should not remove code marked as "To preserve previous behavior and prevent regression". But these are just workarounds and should be fixed to treat other loop-carried dependencies correctly in the future.

What do you think?

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


More information about the llvm-commits mailing list