[PATCH] D24315: [CGP] Be less conservative about tail-duplicating a ret to allow tail calls

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 16:50:55 PDT 2016


mkuper added inline comments.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2008
@@ -2013,2 +2007,3 @@
   SmallVector<CallInst*, 4> TailCalls;
+  bool AllowDifferingSizes;
   if (PN) {
----------------
iteratee wrote:
> It's kind of awkward to pass this as an output parameter and not use it.
> Would it be better to make it a pointer argument with a default value of nullptr?
I agree it's awkward, I'm just not sure the other way around (having a temporary in the callee, and then setting after a null check) is less awkward, overall. Same goes for other possible solutions (returning a pair, say).

In any case, I don't feel strongly about this, and I don't think the LLVM coding standards say anything concrete about this. So if you significantly prefer a pointer, let me know, and I'll change it.


https://reviews.llvm.org/D24315





More information about the llvm-commits mailing list