Skip to content

[MISched] Compare right next cluster node #116584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

wangpc-pp
Copy link
Contributor

We support bottom-up and bidirectonal postra scheduling now, but we
only compare successive next cluster node as if we are doing topdown
scheduling. This makes load/store clustering and macro fusions wrong.

This patch makes sure that we can get the right cluster node by the
scheduling direction.

@wangpc-pp
Copy link
Contributor Author

Ping.

This fixes wrong macro fusion result when enabling bottom-up/bi-directional post-ra scheduling.

@wangpc-pp
Copy link
Contributor Author

Ping.

@michaelmaitland
Copy link
Contributor

Is there any test case that would should this fixing a regression?

@wangpc-pp
Copy link
Contributor Author

wangpc-pp commented Dec 5, 2024

Is there any test case that would should this fixing a regression?

Yeah, like what I have written in the description, macro fusion and load/store clustering will be wrong if using bidirectional or bottom up postra scheduling. I found this issue when trying to enable postra scheduling.

Please see https://github.com/llvm/llvm-project/pull/115864/commits, without this fix, you will see the wrong result.

@michaelmaitland
Copy link
Contributor

Is there any test case that would should this fixing a regression?

Yeah, like what I have written in the description, macro fusion and load/store clustering will be wrong if using bidirectional or bottom up postra scheduling. I found this issue when trying to enable postra scheduling.

Please see https://github.com/llvm/llvm-project/pull/115864/commits, without this fix, you will see the wrong result.

Can we include a test in this PR that shows how this fixes the behavior that is incorrect prior to this patch?

@wangpc-pp
Copy link
Contributor Author

Is there any test case that would should this fixing a regression?

Yeah, like what I have written in the description, macro fusion and load/store clustering will be wrong if using bidirectional or bottom up postra scheduling. I found this issue when trying to enable postra scheduling.
Please see https://github.com/llvm/llvm-project/pull/115864/commits, without this fix, you will see the wrong result.

Can we include a test in this PR that shows how this fixes the behavior that is incorrect prior to this patch?

Sure, I can add some RUN lines to existing macro fusion tests.

@wangpc-pp wangpc-pp force-pushed the main-postra-sched-cluster branch from 3a4da00 to 4668368 Compare December 10, 2024 03:47
@wangpc-pp
Copy link
Contributor Author

Is there any test case that would should this fixing a regression?

Yeah, like what I have written in the description, macro fusion and load/store clustering will be wrong if using bidirectional or bottom up postra scheduling. I found this issue when trying to enable postra scheduling.
Please see https://github.com/llvm/llvm-project/pull/115864/commits, without this fix, you will see the wrong result.

Can we include a test in this PR that shows how this fixes the behavior that is incorrect prior to this patch?

Sure, I can add some RUN lines to existing macro fusion tests.

Done. You can see the second commit.

Copy link
Contributor

@michaelmaitland michaelmaitland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

wangpc-pp added a commit that referenced this pull request Dec 10, 2024
To `macro-fusion-lui-addi.ll`.

This is the precommit change for #116584.
We support bottom-up and bidirectonal postra scheduling now, but we
only compare successive next cluster node as if we are doing topdown
scheduling. This makes load/store clustering and macro fusions wrong.

This patch makes sure that we can get the right cluster node by the
scheduling direction.
@wangpc-pp wangpc-pp force-pushed the main-postra-sched-cluster branch from 4668368 to 6e04cec Compare December 10, 2024 06:34
@wangpc-pp wangpc-pp merged commit 920495c into llvm:main Dec 10, 2024
5 of 7 checks passed
@wangpc-pp wangpc-pp deleted the main-postra-sched-cluster branch December 10, 2024 06:44
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.

2 participants