[PATCH] D73257: [AST] Compress the FixedPointSemantics type better.

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 23 00:30:50 PST 2020


ebevhan created this revision.
ebevhan added reviewers: rjmccall, leonardchan, bjope.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73257

Files:
  clang/include/clang/Basic/FixedPoint.h


Index: clang/include/clang/Basic/FixedPoint.h
===================================================================
--- clang/include/clang/Basic/FixedPoint.h
+++ clang/include/clang/Basic/FixedPoint.h
@@ -75,11 +75,11 @@
   }
 
 private:
-  unsigned Width;
-  unsigned Scale;
-  bool IsSigned;
-  bool IsSaturated;
-  bool HasUnsignedPadding;
+  unsigned Width          : 16;
+  unsigned Scale          : 13;
+  unsigned IsSigned       : 1;
+  unsigned IsSaturated    : 1;
+  unsigned HasUnsignedPadding : 1;
 };
 
 /// The APFixedPoint class works similarly to APInt/APSInt in that it is a


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73257.239790.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200123/787d67f1/attachment-0001.bin>


More information about the cfe-commits mailing list