[PATCH] D114141: Allow DataLayout to support arbitrary pointer sizes

Stephen Neuendorffer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 17 23:33:59 PST 2021


stephenneuendorffer created this revision.
Herald added subscribers: dexonsmith, hiraditya.
stephenneuendorffer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, it is impossible to specify a DataLayout with pointer
size and index size that is not a whole number of bytes.
This patch modifies
the DataLayout class to accept arbitrary pointer sizes and to
store the size as a number of bits, rather than as a number of bytes.
Generally speaking, the external interface of the class as used
by in-tree architectures remains the same and shouldn't affect the
behavior of architecures with pointer sizes equal to a whole number
of bytes.

Note the interface of setPointerAlignment has changed and takes
a pointer and index size that is a number of bits, rather than a number
of bytes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114141

Files:
  llvm/include/llvm/IR/DataLayout.h
  llvm/lib/IR/DataLayout.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114141.388116.patch
Type: text/x-patch
Size: 7004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/27e371bb/attachment.bin>


More information about the llvm-commits mailing list