From: Mehdi Amini Date: Thu, 22 Dec 2016 04:09:29 +0000 (+0000) Subject: [ThinLTO] Save 8B per summary entry by rearranging the fields (NFC) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b78d89e96edf4b69d051a86a672b2a7fdfbd9179;p=llvm [ThinLTO] Save 8B per summary entry by rearranging the fields (NFC) Size goes from 72B to 64B per entry. Differential Revision: https://reviews.llvm.org/D27970 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290314 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/ModuleSummaryIndex.h b/include/llvm/IR/ModuleSummaryIndex.h index 53df1bdb40c..2cfe673d970 100644 --- a/include/llvm/IR/ModuleSummaryIndex.h +++ b/include/llvm/IR/ModuleSummaryIndex.h @@ -100,7 +100,7 @@ template <> struct DenseMapInfo { class GlobalValueSummary { public: /// \brief Sububclass discriminator (for dyn_cast<> et al.) - enum SummaryKind { AliasKind, FunctionKind, GlobalVarKind }; + enum SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }; /// Group flags (Linkage, noRename, isOptSize, etc.) as a bitfield. struct GVFlags { @@ -152,6 +152,8 @@ private: /// Kind of summary for use in dyn_cast<> et al. SummaryKind Kind; + GVFlags Flags; + /// This is the hash of the name of the symbol in the original file. It is /// identical to the GUID for global symbols, but differs for local since the /// GUID includes the module level id in the hash. @@ -166,8 +168,6 @@ private: /// module path string table. StringRef ModulePath; - GVFlags Flags; - /// List of values referenced by this global value's definition /// (either by the initializer of a global variable, or referenced /// from within a function). This does not include functions called, which