[PATCH] D28920: DAG: Allow targets to override stack temp alignment

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 23:52:03 PST 2017


arsenm added a comment.

> Makes sense ;)
> 
> To come back to your original question, I'd think that you'd want to extend DataLayout to support per-address-space alignments in that case, just like we have per-address-space pointer sizes. You'd want this  at the IR-level too.

I've written the patches to allow a lower preferred alignment which wasn't difficult. I think the per-address space alignment is overkill particularly for the amount of benefit. Globals/allocass are assigned the correct ABI alignment, and it would always possible to write an optimization pass to reduce the alignment when valid to do so. The one advantage I think the hook here has is that it allows handling of perverse cases that won't be explicitly listed in the datalayout (e.g. a 513 element vector).


https://reviews.llvm.org/D28920





More information about the llvm-commits mailing list