Skip to content

Conversation

@huaatian
Copy link
Contributor

@huaatian huaatian commented Jun 15, 2024

This commit addresses an issue where weak dependencies trigger an
assertion in the window scheduler under certain conditions.

…encies

This commit addresses an issue where weak dependencies trigger an
assertion in the window scheduler under certain conditions.
@huaatian
Copy link
Contributor Author

huaatian commented Jun 15, 2024

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:
image

Window scheduler DAG:
image

List scheduler result:
image

@huaatian
Copy link
Contributor Author

Could you please review this code? Thank you~ @nathanchance @arsenm @dtcxzyw

@huaatian
Copy link
Contributor Author

Currently, this test case fails locally (clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp). Due to this commit (#95298), even without my modifications, the test case still fails on my local machine.

@dtcxzyw dtcxzyw merged commit 355e4a9 into llvm:main Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants