[PATCH] D62091: [CommandLine] Reduce size of Option class by moving more members into bit field

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 18 08:19:20 PDT 2019


hintonda added a comment.

In D62091#1507424 <https://reviews.llvm.org/D62091#1507424>, @beanz wrote:

> This is pretty cool. Since these are usually allocated as globals, this is saving pages of dirtied memory.
>
> One implementation thought. What if we group the 16-bit fields together and make them uint16_t then use a uint16_t as the bitfield type for the remaining 15 bits. The performance of the 16-bit fields should be better if they are aligned (not that cl::opt perf really matters).


I tried to keep the relative order as close to the original as possible, but after rereading your comment, I'm unsure if you wanted me to group the non-bit field unit16_t's together as well.  Please let me know...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62091/new/

https://reviews.llvm.org/D62091





More information about the llvm-commits mailing list