[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 12:20:04 PDT 2017


tejohnson added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:434
+        [&F](const FunctionSummary::EdgeTy &E) {
+          if (E.first.getGUID() == 0 || !E.first.getSummaryList().size())
+            return true; // might recurse - we can't reason about external
----------------
ncharlie wrote:
> This is currently failing a test case that uses printf. Since printf doesn't have a summary associated with it (i.e. the SummaryList is empty), I can't determine if it recurses and have to fail out early.
> 
> Is there some spot I should add code to create a FunctionSummary for external functions?
How is printf handled in the full LTO case? Does it have attributes indicating that it is no recurse? Otherwise I think treating it conservatively is the only option.


https://reviews.llvm.org/D36850





More information about the llvm-commits mailing list