[PATCH] D22491: Added ThinLTO inlining statistics

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 14:27:00 PDT 2016


mehdi_amini added inline comments.

================
Comment at: include/llvm/Transforms/IPO/InlinerStats.h:22
@@ +21,3 @@
+/// Then starting from non external functions that have some inlined calls
+/// inside, it walks to every inlined function and increment counter.
+///
----------------
Prazek wrote:
> tejohnson wrote:
> > mehdi_amini wrote:
> > > It is not clear to me why you need a graph and can't just increment counters as the inlined moves on?
> > This is to distinguish between inlines that eventually make it into a non-imported function (i.e. what Piotr refers to as a "real inline" and I am suggesting something like "inline to importing module"). I.e. if we have call chain A->B->C where A was originally in the module (non-imported) and B/C were imported, when we inline C into B we don't know if they will ultimately be inlined into A. Presumably there could be another SCC that we perform inlines on in between the B->C and A->BC inlines so we can't easily track this without some side structure.
> indeed. I am gonna change that comment to be more clear
OK for a side structure, does it need to build a graph? I'm not sure if a map `F -> { real, unreal }` + the global counters would not suffice?

I mean, it depends on the semantics of these counters, and I'm still not sure about this. For example:

`A->B->C` and `D->B->C`, with C and B the only imported functions. If we import entirely (C into B, and B into A and D), what is expected to be computed?



https://reviews.llvm.org/D22491





More information about the llvm-commits mailing list