[PATCH] D42006: AArch64: Omit callframe setup/destroy when not necessary
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 12:07:27 PST 2018
MatzeB created this revision.
MatzeB added reviewers: t.p.northover, aemerson, eli.friedman, qcolombet, gberry.
Herald added subscribers: kristof.beyls, javed.absar, mcrosier, rengolin.
Do not create CALLSEQ_START/CALLSEQ_END when there is no callframe to
setup and the callframe size is 0.
- Fixes an invalid callframe nesting for byval arguments. This would fail the machine verifier as it looked like this before this patch (as in `big-byval.ll`):
...
ADJCALLSTACKDOWN 32768, 0, ... # Setup for extfunc
...
ADJCALLSTACKDOWN 0, 0, ... # setup for memcpy
...
BL &memcpy ...
ADJCALLSTACKUP 0, 0, ... # destroy for memcpy
...
BL &extfunc
ADJCALLSTACKUP 32768, 0, ... # destroy for extfunc
- Saves us two instructions in the common case of zero-sized stackframes.
- Remove an unnecessary scheduling barrier (hence the small unittest changes).
Repository:
rL LLVM
https://reviews.llvm.org/D42006
Files:
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/arm64-hello.ll
test/CodeGen/AArch64/arm64-shrink-wrapping.ll
test/CodeGen/AArch64/big-byval.ll
test/CodeGen/AArch64/func-calls.ll
test/CodeGen/AArch64/nontemporal.ll
test/CodeGen/AArch64/swifterror.ll
test/CodeGen/AArch64/tailcall-explicit-sret.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42006.129679.patch
Type: text/x-patch
Size: 15070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180112/98310e00/attachment.bin>
More information about the llvm-commits
mailing list