[AArch64] Enable clustering memory accesses to fixed stack objects
authorJay Foad <jay.foad@amd.com>
Wed, 11 Dec 2019 10:29:23 +0000 (10:29 +0000)
committerJay Foad <jay.foad@amd.com>
Wed, 18 Dec 2019 09:46:11 +0000 (09:46 +0000)
commit97ca7c2cc9083ebde681b0e11f7a8ccae1966d64
treeb619d6f8413aa57e27a897b7d0650836f1d0133c
parent862a60241687a2f718d2c4f554afd9d520da8952
[AArch64] Enable clustering memory accesses to fixed stack objects

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.

Subscribers: MatzeB, kristof.beyls, hiraditya, javed.absar, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71334
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
llvm/test/CodeGen/AArch64/arm64-memset-inline.ll
llvm/test/CodeGen/AArch64/cluster-frame-index.mir
llvm/test/CodeGen/AArch64/expand-select.ll
llvm/test/CodeGen/AArch64/tailcall_misched_graph.ll