[PATCH] D28149: [GlobalValue] Move HasLLVMReservedName into existing bitfield. NFC

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 16:41:26 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL290696: [GlobalValue] Move HasLLVMReservedName into existing bitfield. NFC (authored by jlebar).

Changed prior to commit:
  https://reviews.llvm.org/D28149?vs=82629&id=82631#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28149

Files:
  llvm/trunk/include/llvm/IR/GlobalValue.h


Index: llvm/trunk/include/llvm/IR/GlobalValue.h
===================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h
+++ llvm/trunk/include/llvm/IR/GlobalValue.h
@@ -80,7 +80,7 @@
         ValueType(Ty), Linkage(Linkage), Visibility(DefaultVisibility),
         UnnamedAddrVal(unsigned(UnnamedAddr::None)),
         DllStorageClass(DefaultStorageClass), ThreadLocal(NotThreadLocal),
-        IntID((Intrinsic::ID)0U), HasLLVMReservedName(false), Parent(nullptr) {
+        HasLLVMReservedName(false), IntID((Intrinsic::ID)0U), Parent(nullptr) {
     setName(Name);
   }
 
@@ -94,13 +94,19 @@
 
   unsigned ThreadLocal : 3; // Is this symbol "Thread Local", if so, what is
                             // the desired model?
-  static const unsigned GlobalValueSubClassDataBits = 19;
+
+  /// True if the function's name starts with "llvm.".  This corresponds to the
+  /// value of Function::isIntrinsic(), which may be true even if
+  /// Function::intrinsicID() returns Intrinsic::not_intrinsic.
+  unsigned HasLLVMReservedName : 1;
+
+  static const unsigned GlobalValueSubClassDataBits = 18;
 
 private:
   friend class Constant;
 
   // Give subclasses access to what otherwise would be wasted padding.
-  // (19 + 4 + 2 + 2 + 2 + 3) == 32.
+  // (18 + 4 + 2 + 2 + 2 + 3 + 1) == 32.
   unsigned SubClassData : GlobalValueSubClassDataBits;
 
   void destroyConstantImpl();
@@ -137,12 +143,7 @@
   /// Subclasses can use it to store their intrinsic ID, if they have one.
   ///
   /// This is stored here to save space in Function on 64-bit hosts.
-  Intrinsic::ID IntID : 31;
-
-  /// True if the function's name starts with "llvm.".  This corresponds to the
-  /// value of Function::isIntrinsic(), which may be true even if
-  /// Function::intrinsicID() returns Intrinsic::not_intrinsic.
-  bool HasLLVMReservedName : 1;
+  Intrinsic::ID IntID;
 
   unsigned getGlobalValueSubClassData() const {
     return SubClassData;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28149.82631.patch
Type: text/x-patch
Size: 1972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161229/13b43b49/attachment.bin>


More information about the llvm-commits mailing list