[clang] [clang][LoongArch] Align global symbol by size (PR #101309)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 09:10:37 PDT 2024
heiher wrote:
> > > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. ADD: Sorry, I meant DataLayout, of course.
> >
> >
> > Thanks for pointing this out. How does data layout affect the alignment of constant string global variable symbols?
>
> They will be aligned to the preferred alignment specified as Y in the "-a:X:Y" part of the data layout, IIRC.
Thanks for the explanation. I understand that data layout can set default and preferred alignment for all globals. This patch chooses alignment based on the size of global objects. Can data layout do that?
https://github.com/llvm/llvm-project/pull/101309
More information about the cfe-commits
mailing list