Add some examples to show the difference between
authorDuncan Sands <baldrick@free.fr>
Fri, 8 May 2009 17:49:48 +0000 (17:49 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 8 May 2009 17:49:48 +0000 (17:49 +0000)
the various notions of type size used in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71230 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetData.h

index 7e7785bb403bfcd7a68cd461f289f7374d16c8cc..8e5c4c34ea9e4b1ee33c7993601c084f73e1182e 100644 (file)
@@ -155,6 +155,23 @@ public:
   /// Target pointer size, in bits
   unsigned char getPointerSizeInBits()   const { return 8*PointerMemSize; }
 
+  /// Size examples:
+  ///
+  /// Type        SizeInBits  StoreSizeInBits  PaddedSizeInBits[*]
+  /// ----        ----------  ---------------  ----------------
+  ///  i1            1           8                8
+  ///  i8            8           8                8
+  ///  i19          19          24               32
+  ///  i32          32          32               32
+  ///  i100        100         104              128
+  ///  i128        128         128              128
+  ///  Float        32          32               32
+  ///  Double       64          64               64
+  ///  X86_FP80     80          80               96
+  ///
+  /// [*] The padded size depends on the alignment, and thus on the target.
+  ///     These values are for x86-32 linux.
+
   /// getTypeSizeInBits - Return the number of bits necessary to hold the
   /// specified type.  For example, returns 36 for i36 and 80 for x86_fp80.
   uint64_t getTypeSizeInBits(const Type* Ty) const;