diff options
author | Momchil Velikov <momchil.velikov@arm.com> | 2017-11-14 10:36:52 +0000 |
---|---|---|
committer | Momchil Velikov <momchil.velikov@arm.com> | 2017-11-14 10:36:52 +0000 |
commit | dc86e1444d4291ba414b5a2bf5dee25c3aa1efd8 (patch) | |
tree | d31b83df92bf0fabae72c931b88d7bb145f74a58 /libcxx/include/algorithm | |
parent | 3cc3911cc0b53579b52e34f828155db38fce8d17 (diff) | |
download | bcm5719-llvm-dc86e1444d4291ba414b5a2bf5dee25c3aa1efd8.tar.gz bcm5719-llvm-dc86e1444d4291ba414b5a2bf5dee25c3aa1efd8.zip |
[ARM] Fix incorrect conversion of a tail call to an ordinary call
When we emit a tail call for Armv8-M, but then discover that the caller needs to
save/restore `LR`, we convert the tail call to an ordinary one, since restoring
`LR` takes extra instructions, which may negate the benefits of the tail
call. If the callee, however, takes stack arguments, this conversion is
incorrect, since nothing has been done to pass the stack arguments.
Thus the patch reverts https://reviews.llvm.org/rL294000
Also, we improve the instruction sequence for popping `LR` in the case when we
couldn't immediately find a scratch low register, but we can use as a temporary
one of the callee-saved low registers and restore `LR` before popping other
callee-saves.
Differential Revision: https://reviews.llvm.org/D39599
llvm-svn: 318143
Diffstat (limited to 'libcxx/include/algorithm')
0 files changed, 0 insertions, 0 deletions