[PATCH] D17212: [ThinLTO] Support for call graph in per-module and combined summary.

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 19:58:42 PST 2016


davidxl added inline comments.

================
Comment at: include/llvm/IR/FunctionInfo.h:97
@@ +96,3 @@
+
+  /// Record a call graph edge from this function to the function identified
+  /// by \p CalleeGUID, with cumulative profile count (across all calls from
----------------
davidxl wrote:
> tejohnson wrote:
> > davidxl wrote:
> > > Without profile data, it might be useful to record the number of static callsites from a function to the callee.  This can help compiler backend to make better global decisions later (e.g. better inlining and enable more function GC).
> > I could do that by overloading the count field to hold the static number of callsites. Alternatively, for statically-generated profile information is it useful to record the block frequency sums or something like that?
> Regarding static # of callsites -- another way is to build a multi-graph -- basically do not collapse all edges from one caller to the same callee. How much space do we save there?  
> 
> If we want to save space, there is a better way to do this -- we can build a graph with edges from module to the callee.  Such a module->function edge contains the following information :
> { Aggregate call count,  max call count, static # of sites }
> 
> It is probably not useful to record static block frequency.
My suggestion regarding using module->function edge can not replace the aggregate function->function call edge here -- but it can be emitted as additional information to track static callsite info -- but that is independent of what this patch does.


http://reviews.llvm.org/D17212





More information about the llvm-commits mailing list