[llvm] d57d8f3 - CodeGen: Reorder MachinePointerInfo fields

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 14 07:06:52 PDT 2021


Author: Matt Arsenault
Date: 2021-03-14T10:06:39-04:00
New Revision: d57d8f364f25edeac9c8a7a2a7c54f8a7d2440dd

URL: https://github.com/llvm/llvm-project/commit/d57d8f364f25edeac9c8a7a2a7c54f8a7d2440dd
DIFF: https://github.com/llvm/llvm-project/commit/d57d8f364f25edeac9c8a7a2a7c54f8a7d2440dd.diff

LOG: CodeGen: Reorder MachinePointerInfo fields

This saves a little bit of padding.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineMemOperand.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineMemOperand.h b/llvm/include/llvm/CodeGen/MachineMemOperand.h
index 1befe93def7d..fe33fb5f4283 100644
--- a/llvm/include/llvm/CodeGen/MachineMemOperand.h
+++ b/llvm/include/llvm/CodeGen/MachineMemOperand.h
@@ -43,10 +43,10 @@ struct MachinePointerInfo {
   /// Offset - This is an offset from the base Value*.
   int64_t Offset;
 
-  uint8_t StackID;
-
   unsigned AddrSpace = 0;
 
+  uint8_t StackID;
+
   explicit MachinePointerInfo(const Value *v, int64_t offset = 0,
                               uint8_t ID = 0)
       : V(v), Offset(offset), StackID(ID) {
@@ -60,8 +60,8 @@ struct MachinePointerInfo {
   }
 
   explicit MachinePointerInfo(unsigned AddressSpace = 0, int64_t offset = 0)
-      : V((const Value *)nullptr), Offset(offset), StackID(0),
-        AddrSpace(AddressSpace) {}
+      : V((const Value *)nullptr), Offset(offset), AddrSpace(AddressSpace),
+        StackID(0) {}
 
   explicit MachinePointerInfo(
     PointerUnion<const Value *, const PseudoSourceValue *> v,


        


More information about the llvm-commits mailing list