[all-commits] [llvm/llvm-project] 698d83: DataLayout: Fix latent issues with getMaxIndexSize...

Owen Anderson via All-commits all-commits at lists.llvm.org
Thu Dec 5 13:02:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 698d83218565d60580d7c71e0fce89a38134a5c6
      https://github.com/llvm/llvm-project/commit/698d83218565d60580d7c71e0fce89a38134a5c6
  Author: Owen Anderson <resistor at mac.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

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

  Log Message:
  -----------
  DataLayout: Fix latent issues with getMaxIndexSizeInBits (#118740)

Because it was implemented in terms of getMaxIndexSize, it was always
rounding the values up to a multiple of 8. Additionally, it was using
the PointerSpec's BitWidth rather than its IndexBitWidth, which was
self-evidently incorrect.

Since getMaxIndexSize was only used by getMaxIndexSizeInBits, and its
name and function seem niche and somewhat confusing, go ahead and remove
it until a concrete need for it arises.



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