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

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 15:40:04 PDT 2018


pcc added a comment.

In https://reviews.llvm.org/D47842#1142887, @tejohnson wrote:

> 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
>
>
> Are you sure that is the case for Alloc? The BumpPtrAllocatorImpl has a number of data members.


Yes, the purpose of the AlignedCharArrayUnion in OptionalStorage is to be at least as large and aligned as T. And Optional contains a field of type OptionalStorage.


Repository:
  rL LLVM

https://reviews.llvm.org/D47842





More information about the llvm-commits mailing list