[PATCH] D49465: [ARM] Enable tail calls for all Thumb1 targets.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 19:14:40 PDT 2018
efriedma created this revision.
efriedma added reviewers: chill, rengolin, SjoerdMeijer.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls.
It isn't really profitable in general, but it's profitable in cases where there we don't need to spill LR and the callee is a function pointer.
This also implements reversing the transform after isel if it isn't profitable; it's hard to tell during isel whether we'll be forced to spill LR. Based off the old implementation in r294000, with a hacky fix for the problem of arguments on the stack. I'm not completely happy with the check for this, but it seems like the least-bad alternative.
Depends on https://reviews.llvm.org/D49459.
Repository:
rL LLVM
https://reviews.llvm.org/D49465
Files:
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/Thumb1FrameLowering.cpp
test/CodeGen/ARM/thumb_indirect_calls.ll
test/CodeGen/ARM/v8m-tail-call.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49465.156001.patch
Type: text/x-patch
Size: 14888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/aff9bbe4/attachment.bin>
More information about the llvm-commits
mailing list