[PATCH] D22491: Added ThinLTO inlining statistics

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 13:47:38 PDT 2016


Prazek added inline comments.

================
Comment at: include/llvm/Transforms/IPO/InlinerStats.h:2
@@ +1,3 @@
+#ifndef LLVM_TRANSFORMS_IPO_INLINERSTATS_H
+#define LLVM_TRANSFORMS_IPO_INLINERSTATS_H
+
----------------
actually not right now, because I call member functions.
I may change it to have addInlineStatistic and dumpStats functions that would call the members.

If this is good and nobody will disagree then I can change it like that.

================
Comment at: lib/Transforms/IPO/InlinerStats.cpp:73
@@ +72,3 @@
+  for (auto *const InlinedFunctionNode : GraphNode->InlinedFunctions) {
+    InlinedFunctionNode->NumberOfRealInlines++;
+    dfs(InlinedFunctionNode);
----------------
eraman wrote:
> Let's say A and B are local functions (functions in the importing module) and C is an imported function and there is a call chain A->B->C. Let's say C first gets inlined into B and then B gets inlined into A. You'll have nodes for A, B and C and A and B are in the NonExternalFunctions. You'll dfs from both A and B. NumberofRealInlines of B will be 2 which not what you want. 
yes, I am fixing it right now.


https://reviews.llvm.org/D22491





More information about the llvm-commits mailing list