[PATCH] D52895: [TailCallElim] Enable marking of calls with byval as tails

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 13:35:41 PDT 2018


rnk added a comment.

Nice!

In https://reviews.llvm.org/D52895#1255602, @nicholas wrote:

> I don't understand the logical model behind byval, but I'll review the change to TRE under the assumption that the goal of the patch is correct.


You have to hallucinate an implicit memcpy into the call sequence. Its destination is some stack memory allocated during the call sequence not visible from LLVM IR.



================
Comment at: test/Transforms/Inline/byval-tail-call.ll:63
+  ret void
+}
----------------
I'd throw in a test case where %x is a local alloca, since that should also work.


Repository:
  rL LLVM

https://reviews.llvm.org/D52895





More information about the llvm-commits mailing list