[llvm-dev] Controlling parameter alignment

Momchil Velikov via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 10 06:34:56 PST 2021


Just to be clear, the suggestion is to introduce `alignstack` to
affect argument alignment, while retaining
the current semantics for `align`?

Thus, a pointer argument having both `align(A)` and `alignstack(B)`
would itself be allocated at B boundary (if it happens to be passed in
memory),
while it would contain an A-aligned address?

> Using alignstack for byval would also eliminate the special rule (for
> align) there I guess.

So, `byval` arguments adopt the `stackalign` attribute with the same
semantics as the current `align`
and then `align` is invalid for `byval` arguments ?

Looks good to me.

-- 
Compiler scrub, Arm


More information about the llvm-dev mailing list