[PATCH] D27077: LTO: Port the new LTO API to ModuleSymbolTable.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 20:39:49 PST 2016


mehdi_amini added inline comments.


================
Comment at: llvm/include/llvm/LTO/LTO.h:84
+  ModuleSymbolTable SymTab;
+  std::unique_ptr<Module> Mod;
+  MemoryBufferRef MBRef;
----------------
pcc wrote:
> mehdi_amini wrote:
> > It seems there is not much that still requires us to keep `Mod` here, what is fundamentally the remaining issue? 
> The major ones are:
> - We need something to own the module
> - We need to be able to query the source file name
> - We need it to be able to extract `used` bits in `add*LTO`
> Essentially we need it to access information that will later be stored in the bitcode symbol table. But until that's ready there's no harm in accessing the module directly.
Owning the module is only useful for the two other parts right? Technically we could store the source file name directly and extract the "used" early.
The latter seems overkill to do now considering we're moving to a bitcode symbol table.


https://reviews.llvm.org/D27077





More information about the llvm-commits mailing list