[llvm] 4bee0dc - [NFC] Use the same type for bit fields in MCSchedClassDesc

Andrew Savonichev via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 04:59:41 PST 2021


Author: Andrew Savonichev
Date: 2021-02-17T15:54:22+03:00
New Revision: 4bee0dc918d20a52be9d1766c82a642268b5e1ee

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

LOG: [NFC] Use the same type for bit fields in MCSchedClassDesc

Otherwise they are not allocated as a single bit field and take 4
bytes instead of 2.

Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D95954

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCSchedule.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/MC/MCSchedule.h b/llvm/include/llvm/MC/MCSchedule.h
index ee0e5b4df9f0..8f9cd5604fa6 100644
--- a/llvm/include/llvm/MC/MCSchedule.h
+++ b/llvm/include/llvm/MC/MCSchedule.h
@@ -115,8 +115,8 @@ struct MCSchedClassDesc {
   const char* Name;
 #endif
   uint16_t NumMicroOps : 14;
-  bool     BeginGroup : 1;
-  bool     EndGroup : 1;
+  uint16_t BeginGroup : 1;
+  uint16_t EndGroup : 1;
   uint16_t WriteProcResIdx; // First index into WriteProcResTable.
   uint16_t NumWriteProcResEntries;
   uint16_t WriteLatencyIdx; // First index into WriteLatencyTable.


        


More information about the llvm-commits mailing list