[clang] [llvm] Global string alignment (PR #142346)

Dominik Steenken via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 03:16:11 PDT 2025


dominik-steenken wrote:

> I'm not sure this is the right fix for the issue. Just like for allocas, the global variable alignment is a _minimum_ required alignment, which can and should be raised by targets if it improves code generation. (The exception to this is if the global has a section.)
> 
> It looks like CGP has a shouldAlignPointerArgs hook for this purpose, but that seems overly specific for what is desired here. I'm surprised we don't seem have something more generic for this...

Like i said, i'm very open to moving this to someplace different, just lacking the background knowledge of where to put it :)

https://github.com/llvm/llvm-project/pull/142346


More information about the llvm-commits mailing list