This is an archive of the discontinued LLVM Phabricator instance.

[MachineScheduler] Reduce reordering due to mem op clustering
ClosedPublic

Authored by foad on Jan 14 2020, 7:49 AM.

Details

Summary

Mem op clustering adds a weak edge in the DAG between two loads or
stores that should be clustered, but the direction of this edge is
pretty arbitrary (it depends on the sort order of MemOpInfo, which
represents the operands of a load or store). This often means that two
loads or stores will get reordered even if they would naturally have
been scheduled together anyway, which leads to test case churn and goes
against the scheduler's "do no harm" philosophy.

The fix makes sure that the direction of the edge always matches the
original code order of the instructions.

Diff Detail

Event Timeline

foad created this revision.Jan 14 2020, 7:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2020, 7:49 AM

Unit tests: pass. 61818 tests passed, 0 failed and 781 were skipped.

clang-tidy: unknown.

clang-format: pass.

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

This revision is now accepted and ready to land.Jan 14 2020, 10:29 AM
This revision was automatically updated to reflect the committed changes.