[PATCH] D69771: [APFloat] Enlarge ExponentType to 32bit integer

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 12:06:11 PST 2019


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/ADT/APFloat.h:146
   /// A signed type to represent a floating point numbers unbiased exponent.
-  typedef signed short ExponentType;
+  typedef int32_t ExponentType;
 
----------------
ekatz wrote:
> efriedma wrote:
> > What's the effect of this on the size of APFloat on a 64-bit target?  On a 32-bit target?
> `APFloat` remains the same size. I added a note about that in the description. Maybe it is not clear enough.
> 
> `detail::IEEEFloat` is the only record that has a field of `ExponentType` type. It remains the size of 24 bytes and alignment of 8 bytes (in both 32 bit and 64 bit targets).
Okay.  I missed the comment in the updated commit message.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69771/new/

https://reviews.llvm.org/D69771





More information about the llvm-commits mailing list