[PATCH] D47842: [ThinLTO] Add string saver onto index for value names

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 15:44:41 PDT 2018


dexonsmith added a comment.

In https://reviews.llvm.org/D47842#1142784, @pcc wrote:

> What is the goal of making Saver and Alloc optional? Is it to reduce the size of the structure? If that's the case, it doesn't look like it will help, in fact it will increase the size because sizeof(Optional<T>) > sizeof(T).
>  http://llvm-cs.pcc.me.uk/include/llvm/ADT/Optional.h#114


My recollection is that BumpPtrAllocator does its first heap allocation on construction.  The point was to avoid that allocation when it was unnecessary.  Have I remembered incorrectly?


Repository:
  rL LLVM

https://reviews.llvm.org/D47842





More information about the llvm-commits mailing list