[PATCH] D39607: [PartialInliner] Inline vararg functions that forward varargs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 06:21:20 PST 2017


fhahn added inline comments.


================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:153
+    // Do function outlining.
+    // NOTE: For vararg functions that do the vararg handling in the outlined
+    //       function, we temporarily generate IR that does not properly
----------------
davidxl wrote:
> This looks like stale comment.
It still applies, the outliner will generate a call to outlined vararg function, but no varargs will be passed. When we do the inlining, the varargs from the original call site will be forwarded to the outlined function. Maybe that comment needs re-phrasing to make it more clear? Or maybe the comment should be at a different place?


================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:82
+bool CodeExtractor::isBlockValidForExtraction(const BasicBlock &BB,
+                                              bool AllowVarArgs) {
   // Landing pads must be in the function where they were inserted for cleanup.
----------------
davidxl wrote:
> Is there a need for this parameter? 
Unfortunately `isBlockValidForExtraction` is a static member function, so I think we need this one.


https://reviews.llvm.org/D39607





More information about the llvm-commits mailing list