[llvm] [llvm][CodeGen] Fix failure in window scheduler caused by weak dependencies (PR #95636)
Hua Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 23:52:31 PDT 2024
huaatian wrote:
The issue arises because the predecessor of SU(1) is SU(3), which is a weak dependency. However, weak dependencies do not affect the result of list scheduling, so SU(1) is scheduled before SU(3). When calculating the cycle of SU(1), the cycle of SU(3) is not available, leading to the assertion error.
We referred to the swing algorithm, which ignores this kind of weak dependencies, and provided a corresponding solution. It should be noted that list scheduling does not adjust the order of instructions based on weak dependencies ; otherwise, this error would not have occurred since window scheduler use list scheduling result.
Swing scheduler DAG:

Window scheduler DAG:

List scheduler result:

https://github.com/llvm/llvm-project/pull/95636
More information about the llvm-commits
mailing list