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

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 06:54:06 PST 2017


hfinkel added a comment.

In https://reviews.llvm.org/D28920#657029, @arsenm wrote:

> In https://reviews.llvm.org/D28920#656702, @hfinkel wrote:
>
> > 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)?
>
>
> This is something I would like to be able to do someday (but I think this would be purely a codegen problem, so wouldn't need to be seen the in the IR).


Does your backend maintain multiple stacks (e.g. some kind of "global stack" and a "local stack")? Does this depend on some non-recursion analysis? [I'm really curious what you're thinking here - not only does it affect this patch, but it also potentially affects discussions I've been having about OpenMP accelerator semantics].

> I'm not sure it's a frontend issue? The LangRef doesn't really define what the ABI alignment of a type really means. It seems of the few uses in clang of getPrefTypeAlignment (and all the ones I've looked at so far in llvm) are all used to create allocas and loads/stores from them.
> 
> The DataLayout has getPreferredAlignment(const Global Variable *GV), which appear to return the preferred type alignment only if it has no explicit alignment set. This is only used by a handful of places.




https://reviews.llvm.org/D28920





More information about the llvm-commits mailing list