This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] implement mayBeEmittedAsTailCall for PPC
ClosedPublic

Authored by sfertile on Nov 7 2017, 6:37 PM.

Details

Summary

Implements TargetLowering callback 'mayBeEmittedAsTailCall ' that enables CodeGenPrepare to duplicate returns when they might enable function to be tail-called.

Diff Detail

Repository
rL LLVM

Event Timeline

sfertile created this revision.Nov 7 2017, 6:37 PM
echristo accepted this revision.Nov 13 2017, 1:42 PM

LGTM.

Couple of comments:

please split the NFC refactoring from the rest of the patch.
One typo I noticed.

Thanks!

-eric

lib/Target/PowerPC/PPCISelLowering.cpp
13800

"guaranteed"

This revision is now accepted and ready to land.Nov 13 2017, 1:42 PM
nemanjai edited edge metadata.Nov 13 2017, 8:36 PM

Just a few other typos I noticed but forgot to click submit. Wanted to make sure I did so before this gets committed. Feel free to fix these on the commit.

lib/Target/PowerPC/PPCISelLowering.cpp
4394

clang-format this - the parameters don't line up.

13807

Elsewhere in this code, the callee is named Callee, why change to CalledFunc?

lib/Target/PowerPC/PPCISelLowering.h
1090

s/duplicate,return/duplicate return

test/CodeGen/PowerPC/duplicate-returns-for-tailcall.ll
21

s/opertunity/opportunity

This revision was automatically updated to reflect the committed changes.