[PATCH] D40893: [PowerPC] fix a bug in TCO eligibility check
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 21:38:59 PST 2017
hfinkel added a comment.
In https://reviews.llvm.org/D40893#952121, @inouehrs wrote:
> > Can you also update the patch description? One inline request as well. You can also handle the inline request as a separate commit.
>
> I updated the description.
>
> About the URL in the comment, it is an example of a case where GCC can do sibling call optimization even with a byval parameter rather tan an additional explanation on why this is a workaround; the example is too large to embed in a comment.
> How about changing `See: https://...` to `GCC can do such sibling call optimization such as https://...` or just remove `See: https://...`? Any preference?
> Anyway I like to touch up this comment later in another patch.
What value is the link adding? Is it just the test case? If so:
1. The test case is actually short enough for a comment, and
2. You could generate IR from that test case and add it (with a FIXME note in the test case that we can do better).
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:4400
CallingConv::ID CalleeCC) {
- // Tail or Sibling call optimization (TCO/SCO) needs callee and caller to
- // have the same calling convention.
- if (CallerCC != CalleeCC)
+ // tail calls are possible with fastcc and ccc.
+ auto isTailCallableCC = [] (CallingConv::ID CC){
----------------
tail -> Tail
https://reviews.llvm.org/D40893
More information about the llvm-commits
mailing list