summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2019-03-20 19:40:45 +0000
committerEli Friedman <efriedma@quicinc.com>2019-03-20 19:40:45 +0000
commit638be660d732b0913869b0ede3f18e4d97e59dd1 (patch)
tree2cf94f4628bdfcf4a79194d78bcc8136c5afc708 /libcxx/test/std/utilities
parent8ca6ab33b7d2bd10e885124405d6f26406256b9b (diff)
downloadbcm5719-llvm-638be660d732b0913869b0ede3f18e4d97e59dd1.tar.gz
bcm5719-llvm-638be660d732b0913869b0ede3f18e4d97e59dd1.zip
[ARM] Eliminate redundant "mov rN, sp" instructions in Thumb1.
This takes sequences like "mov r4, sp; str r0, [r4]", and optimizes them to something like "str r0, [sp]". For regular stack variables, this optimization was already implemented: we lower loads and stores using frame indexes, which are expanded later. However, when constructing a call frame for a call with more than four arguments, the existing optimization doesn't apply. We need to use stores which are actually relative to the current value of sp, and don't have an associated frame index. This patch adds a special case to handle that construct. At the DAG level, this is an ISD::STORE where the address is a CopyFromReg from SP (plus a small constant offset). This applies only to Thumb1: in Thumb2 or ARM mode, a regular store instruction can access SP directly, so the COPY gets eliminated by existing code. The change to ARMDAGToDAGISel::SelectThumbAddrModeSP is a related cleanup: we shouldn't pretend that it can select anything other than frame indexes. Differential Revision: https://reviews.llvm.org/D59568 llvm-svn: 356601
Diffstat (limited to 'libcxx/test/std/utilities')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud