[PATCH] D25073: [DebugInfo]: preparation to implement DW_AT_alignment

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 13:57:11 PDT 2016

aprantl added inline comments.

Comment at: include/llvm/IR/DebugInfoMetadata.h:1829
   unsigned Line;
+  uint64_t AlignInBits;
vleschuk wrote:
> aprantl wrote:
> > Sorry for noticing this so late:
> > Does this really need to be a 64bit integer, or would a 32-bit unsigned be sufficient?
> > A 32-bit unsigned could immediately follow the previous unsigned field und thus save 8 bytes.
> SizeInBits and OffsetInBits in DebugInfoMetadata scope are 64bit. If we change this to 32bit for efficiency I'd suggest to make it as separate commit and change all of them.
I don't see how that follows: SizeInBits may legitimately have values larger than 2^32, but the alignment should rarely be anything larger than fits in one byte?


More information about the llvm-commits mailing list