[llvm] r290314 - [ThinLTO] Save 8B per summary entry by rearranging the fields (NFC)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 20:09:29 PST 2016


Author: mehdi_amini
Date: Wed Dec 21 22:09:29 2016
New Revision: 290314

URL: http://llvm.org/viewvc/llvm-project?rev=290314&view=rev
Log:
[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

Modified:
    llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h

Modified: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h?rev=290314&r1=290313&r2=290314&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h (original)
+++ llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h Wed Dec 21 22:09:29 2016
@@ -100,7 +100,7 @@ template <> struct DenseMapInfo<ValueInf
 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




More information about the llvm-commits mailing list