[PATCH] D41297: [ThinLTO] Implement summary visualizer

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 11:03:36 PST 2018


mehdi_amini added a comment.

In https://reviews.llvm.org/D41297#974754, @evgeny777 wrote:

> > At which point of the API is this guarantee?
>
>
>
> 1. `ThinLTO.ModuleMap` stores `BitcodeModule` objects and uses them during entire thin link phase (until backend threads are launched)
> 2. BitcodeModule contains pointers to BC data, so this data should be actual for module to be parsed)
> 3. Module summary is exported to .dot in CombinedIndexHook which is invoked in the beginning of thin link phase


None of these seems like API guarantee to me, it sounds like "this is what actually happens in practice today in this particular workflow".

Can I write a tool that is using the ModuleSummaryIndexBitcodeReader (or the other entry point) to create the index and release the memory buffer that contains the bitcode?



================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:71
 
 struct GlobalValueSummaryInfo {
   /// The GlobalValue corresponding to this summary. This is only used in
----------------
Are we size-sensitive here @tejohnson ?
Since the GV field is only used in per-module and and name only in combined summary, we could have some sort of union (variant if available).


https://reviews.llvm.org/D41297





More information about the llvm-commits mailing list