From: Benjamin Kramer Date: Sat, 11 Apr 2015 18:00:28 +0000 (+0000) Subject: Make OnDiskChainedHashTableGenerator's Bucket type a POD type and reorder fields... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38ebdeea7a53f0468b6973a79ed88a9397b7b769;p=llvm Make OnDiskChainedHashTableGenerator's Bucket type a POD type and reorder fields to optimize padding For the common case of offset_type=unsigned this brings Bucket from 24 to 16 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234692 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/OnDiskHashTable.h b/include/llvm/Support/OnDiskHashTable.h index 52f133ccff6..0f097f28728 100644 --- a/include/llvm/Support/OnDiskHashTable.h +++ b/include/llvm/Support/OnDiskHashTable.h @@ -75,13 +75,10 @@ template class OnDiskChainedHashTableGenerator { llvm::SpecificBumpPtrAllocator BA; /// \brief A linked list of values in a particular hash bucket. - class Bucket { - public: + struct Bucket { offset_type Off; - Item *Head; unsigned Length; - - Bucket() {} + Item *Head; }; Bucket *Buckets;