[PATCH] D28920: DAG: Allow targets to override stack temp alignment
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 13:17:11 PST 2017
hfinkel added a comment.
In https://reviews.llvm.org/D28920#656682, @arsenm wrote:
> In https://reviews.llvm.org/D28920#656679, @hfinkel wrote:
>
> > > The DataLayout's preferred alignment cannot be lower than the ABI required alignment, which defaults to the type size
> >
> > Why not change that?
>
>
> I thought about that, but it seems like a risky, IR breaking change. I assume most places using this are using this to get a bigger alignment than required and assuming it is a legal ABI alignment. In codegen there is more freedom to decide what the ABI really means. I can try changing this and see what breaks.
Yea; I figured that we'd end up replacing many uses of preferred alignment with some min-of-preferred-or-abi-alignment utility function if we did that.
> Another issue is this would also vary per address space to some degree. For AMDGPU we would like 8 byte alignment, but only in addrspace(3)
Unless you'd like to extend stack temps to be put in other address spaces, isn't that a frontend issue (i.e. applies only to globals)?
https://reviews.llvm.org/D28920
More information about the llvm-commits
mailing list