[llvm-dev] Allowing arbitrary pointer sizes in data layout

Stephen Neuendorffer via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 2 12:23:01 PST 2021


Hi all,

LLVM has long had a restriction that pointer data types in the LLVM backend
must be powers of two.  While this works for many architectures, in some
cases it is two restrictive.  Because this is such a long-standing
assumption, I'd like to get wider review on a patch here:
https://reviews.llvm.org/D114141 that starts to relax this constraint.  The
patch allows DataLayouts to be parsed correctly with pointer types that are
arbitrary values.  Note that this does not change the alignment
requirements for pointers, only the types that are permissible and used
when InstructionSelection lowers pointers.  We have so far used this
effectively on out of tree targets and feel it is reasonably general to
live upstream.

Steve Neuendorffer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211202/8e4a6e3e/attachment.html>


More information about the llvm-dev mailing list