From 38ebdeea7a53f0468b6973a79ed88a9397b7b769 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 11 Apr 2015 18:00:28 +0000 Subject: [PATCH] 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 --- include/llvm/Support/OnDiskHashTable.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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; -- 2.34.1