[llvm-commits] representing the alignment of a function argument
Dan Gohman
djg at cray.com
Fri Aug 31 14:28:37 PDT 2007
> To handle calls to functions with byval arguments, the code generator
> must create copies of those arguments. To do that efficiently, it
> needs to know the alignment.
>
> On x86-64, all stack arguments are 8 byte aligned. I am trying to find
> out how to represent that on LLVM.
>
> The GCC way would be to add another method to the subtarget that given
> a type returns the assured stack alignment of arguments.
>
> Another way would be to make the FE handle the stack and issue
> llvm.memcpy with the correct alignment :-)
Where do you need the representation? Loads and stores in the LLVM IR and
the target-independent load and store nodes in the SelectionDAG IR have an
alignment attribute; are either of those sufficient?
Dan
--
Dan Gohman, Cray Inc.
More information about the llvm-commits
mailing list