[PATCH] D115888: [Attributor][Fix] Add default alignment to HeapToStack

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 13:48:47 PST 2021


jhuber6 added a comment.

In D115888#3198696 <https://reviews.llvm.org/D115888#3198696>, @lebedev.ri wrote:

> For which target/architecture? What happens on other target/architectures?

This is from the documentation on the data layout. It defines the default values used when initializing the data layout. It seems these can only be overridden, and I can't imagine a situation where someone would override it to define a 128 bit float to have 64-bit alignment, so the largest alignment we'll have in the data layout will always be at least 16 bytes.

> When constructing the data layout for a given target, LLVM starts with a default set of specifications which are then (possibly) overridden by the specifications in the datalayout keyword. The default specifications are given in this list:
>
>   e - little endian
>   p:64:64:64 - 64-bit pointers with 64-bit alignment.
>   p[n]:64:64:64 - Other address spaces are assumed to be the same as the default address space.
>   S0 - natural stack alignment is unspecified
>   i1:8:8 - i1 is 8-bit (byte) aligned
>   i8:8:8 - i8 is 8-bit (byte) aligned
>   i16:16:16 - i16 is 16-bit aligned
>   i32:32:32 - i32 is 32-bit aligned
>   i64:32:64 - i64 has ABI alignment of 32-bits but preferred alignment of 64-bits
>   f16:16:16 - half is 16-bit aligned
>   f32:32:32 - float is 32-bit aligned
>   f64:64:64 - double is 64-bit aligned
>   f128:128:128 - quad is 128-bit aligned
>   v64:64:64 - 64-bit vector is 64-bit aligned
>   v128:128:128 - 128-bit vector is 128-bit aligned


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115888/new/

https://reviews.llvm.org/D115888



More information about the llvm-commits mailing list