HomePhabricator

ARM: support mandatory tail calls for tailcc & swifttailcc

Authored by t.p.northover on Feb 1 2021, 2:08 AM.

Description

ARM: support mandatory tail calls for tailcc & swifttailcc

This adds support for callee-pop conventions to the ARM backend so that it can
ensure a call marked "tail" is actually a tail call.

Details

Committed
t.p.northoverMay 28 2021, 3:10 AM
Parents
rG66ff1cbd71d2: [NFC][Transforms][Utils] remove useless variable in CloneBasicBlock
Branches
Unknown
Tags
Unknown

Event Timeline

Herald added a subscriber: Restricted Project. · View Herald TranscriptMay 28 2021, 3:12 AM
uabelho added inline comments.
/llvm/lib/Target/ARM/ARMFrameLowering.cpp
1014

Compiling with gcc 9.3.0 I get a warning on this line:

./lib/Target/ARM/ARMFrameLowering.cpp:1014:57: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
 1014 |     assert(ReservedArgStack + IncomingArgStackToRestore >= 0 &&
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

so perhaps it's not testing what it aims at?

uabelho added inline comments.Jun 16 2021, 1:31 AM
/llvm/lib/Target/ARM/ARMFrameLowering.cpp
1014

Sorry about the late reply, I’m on a pretty remote holiday in the Outer
Hebrides. Thanks for pointing out the issue, it’s clearly a wrong
assertion. I’ll make sure the underlying code is right and update it first
thing when I get back to civilization.

Cheers.

Tim.

Hi,

Great!
No worries, enjoy your holiday!
Mikael

Should be fixed now by c82957e79236. Thanks for your patience.

Should be fixed now by c82957e79236. Thanks for your patience.

Thanks and welcome back to civilization :)