[PATCH] D31364: LTO: Reduce memory consumption by creating an in-memory symbol table for InputFiles. NFCI.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 15:26:41 PDT 2017


pcc added inline comments.


================
Comment at: llvm/include/llvm/Object/IRSymtab.h:123
+/// Fills in Symtab and Strtab with a valid symbol and string table for Mods.
+Error write(ArrayRef<Module *> Mods, SmallVector<char, 0> &Symtab,
+            SmallVector<char, 0> &Strtab);
----------------
pcc wrote:
> tejohnson wrote:
> > The name "write" here seems unexpected to me, since we aren't writing to disk e.g.. The client does a "write" which involves a Writer class, followed by a Reader, when together both are needed to essentially "read" the symbols from Modules. Maybe "buildSymbolTable" or something like that. The Writer is more like a Builder.
> Renamed to "build" (likewise to "Builder").
Every time I go into this code it bugs me a little that we have a reader and a builder (as opposed to a writer). I hate to bring up a bikeshedding topic, and it's not a big deal I guess, but would you mind if I rename this back to write/Writer? In support of my position I point to the many Writer classes we have in LLVM [1] that are not necessarily writing to disk.

[1] http://llvm-cs.pcc.me.uk/?q=writer


Repository:
  rL LLVM

https://reviews.llvm.org/D31364





More information about the llvm-commits mailing list