This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Enable clustering memory accesses to fixed stack objects
ClosedPublic

Authored by foad on Dec 11 2019, 2:44 AM.

Details

Summary

r347747 added support for clustering mem ops with FI base operands
including support for fixed stack objects in shouldClusterFI, but
apparently this was never tested.

This patch fixes shouldClusterFI to work with scaled as well as
unscaled load/store instructions, and fixes the ordering of memory ops
in MemOpInfo::operator< to ensure that memory addresses always
increase, regardless of which direction the stack grows.

Diff Detail

Event Timeline

foad created this revision.Dec 11 2019, 2:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 11 2019, 2:44 AM

Build result: pass - 60705 tests passed, 0 failed and 726 were skipped.

Log files: console-log.txt, CMakeCache.txt

foad updated this revision to Diff 233308.Dec 11 2019, 3:24 AM

Tighten up an assertion.

Build result: pass - 60705 tests passed, 0 failed and 726 were skipped.

Log files: console-log.txt, CMakeCache.txt

thegameg accepted this revision.Dec 17 2019, 1:09 PM

LGTM. Thanks for fixing this.

The usage of TII->getMemScale is a bit weird since it makes it look like it's a non-static member function. No need to change it unless you think it would help.

This revision is now accepted and ready to land.Dec 17 2019, 1:09 PM
This revision was automatically updated to reflect the committed changes.
foad added a comment.Jan 6 2020, 7:11 AM

The usage of TII->getMemScale is a bit weird since it makes it look like it's a non-static member function. No need to change it unless you think it would help.

It's a bit weird, but much shorter than AArch64InstrInfo::getMemScale! I don't have strong opinions about which is better so I'll leave it as-is.