[llvm] [NewGVN] Prevent cyclic reference when building phiofops (PR #69418)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 04:00:48 PDT 2023


https://github.com/ManuelJBrito commented:

Thanks for working on this. This is the same issue as in #60439. 
I am not sure this patch covers all cases, here we only check if the leader is an operand of the original instruction, direct dependence, but the leader might, for example, be an operand of one of the operands of the original instruction. 
Or an even more contrived case would be if one of the operands of the leader was the leader of one of the operands of the original instruction. 
I don't have any concrete examples of this happening and causing NewGVN to not terminate, but it should be possible.
I think this requires performing SCC finding on a dependence graph with both user and leader dependencies.

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


More information about the llvm-commits mailing list