[PATCH] D27970: [ThinLTO] Save 8B per summary entry by rearranging the fields (NFC)

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 20:49:36 PST 2016


mehdi_amini created this revision.
mehdi_amini added reviewers: tejohnson, pcc.
mehdi_amini added a subscriber: llvm-commits.

Size goes from 72B to 64B per entry.


https://reviews.llvm.org/D27970

Files:
  llvm/include/llvm/IR/ModuleSummaryIndex.h


Index: llvm/include/llvm/IR/ModuleSummaryIndex.h
===================================================================
--- llvm/include/llvm/IR/ModuleSummaryIndex.h
+++ llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -84,7 +84,7 @@
 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 {
@@ -136,6 +136,8 @@
   /// 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.
@@ -150,8 +152,6 @@
   /// 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27970.82062.patch
Type: text/x-patch
Size: 1202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/c1a0103d/attachment.bin>


More information about the llvm-commits mailing list