This is an archive of the discontinued LLVM Phabricator instance.

[MachineScheduler] Don't swap when we can't cluster
ClosedPublic

Authored by jsji on Jan 15 2020, 12:49 PM.

Details

Summary

https://reviews.llvm.org/D72706 tried to reduce reordering due to mem op
clustering. This patch avoid doing the swap when we can't cluster.

Diff Detail

Event Timeline

jsji created this revision.Jan 15 2020, 12:49 PM
rampitec accepted this revision.Jan 15 2020, 1:03 PM

LGTM.

This revision is now accepted and ready to land.Jan 15 2020, 1:03 PM

Unit tests: pass. 61905 tests passed, 0 failed and 782 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

jsji added a comment.Jan 15 2020, 1:51 PM

Thanks for review and accepting.

However, after further investigation, looks like our downstream additional reordering is NOT only due to this.
I will commit this as a NFC patch first.

jsji retitled this revision from [MachineScheduler] Don't reorder when we can't cluster to [MachineScheduler] Don't swap when we can't cluster.Jan 15 2020, 1:53 PM
jsji edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.
foad added a comment.Jan 16 2020, 1:22 AM

This patch would only change behaviour if the target's shouldClusterMemOps(SUa, SUb) might return a different answer from shouldClusterMemOps(SUb, SUa).

jsji added a comment.Jan 16 2020, 7:44 AM

This patch would only change behaviour if the target's shouldClusterMemOps(SUa, SUb) might return a different answer from shouldClusterMemOps(SUb, SUa).

Yes, agree. Thanks.