This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Support -tailcallopt
ClosedPublic

Authored by paquette on Sep 13 2019, 3:53 PM.

Details

Summary

This adds support for -tailcallopt tail calls to CallLowering. This piggy-backs off the changes from D67577, since doing it without a bit of refactoring gets extremely ugly.

Support is basically ported from AArch64ISelLowering. The main difference here is that tail calls in -tailcallopt change the ABI, so there's some extra bookkeeping for the stack.

Show that we are correctly lowering these by updating tail-call.ll.

Also show that we don't do anything strange in general by updating fastcc-reserved.ll, which passes -tailcallopt, but doesn't emit any tail calls.

Diff Detail

Repository
rL LLVM

Event Timeline

paquette created this revision.Sep 13 2019, 3:53 PM

LGTM.

llvm/lib/Target/AArch64/AArch64CallLowering.cpp
203 ↗(On Diff #220188)

Short comment here?

aemerson accepted this revision.Sep 17 2019, 11:57 AM
This revision is now accepted and ready to land.Sep 17 2019, 11:57 AM
This revision was automatically updated to reflect the committed changes.