[all-commits] [llvm/llvm-project] c6008c: [DL] Invert `getTypeStoreSize` bytes/bits relation...

Antonio Frighetto via All-commits all-commits at lists.llvm.org
Sat Aug 31 00:09:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6008cef7a710b3d97e6b9b6fcf8e9661333c5e6
      https://github.com/llvm/llvm-project/commit/c6008cef7a710b3d97e6b9b6fcf8e9661333c5e6
  Author: Antonio Frighetto <me at antoniofrighetto.com>
  Date:   2024-08-31 (Sat, 31 Aug 2024)

  Changed paths:
    M llvm/include/llvm/IR/DataLayout.h

  Log Message:
  -----------
  [DL] Invert `getTypeStoreSize` bytes/bits relationship to avoid ceil div (NFC)

Change how `getTypeStoreSize` and `getTypeStoreSizeInBits` interact
by first aligning the bit size to the nearest power of 2 boundary
and then applying plain division to derive the byte size. This
simplifies the calculation by avoiding possible overflow concerns
in the first place.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list