[llvm] [PowerPC][AIX] Specify pointer info and alignment for stack store (PR #144526)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 09:26:25 PDT 2025


https://github.com/efriedma-quic approved this pull request.

LGTM

getStack() is specifically relative to the stack pointer itself, not a FrameIndex, so it's basically only used for constructing call frames.  Maybe we should consider renaming it for clarity.  For that purpose, the precise alignment of the stack usually doesn't really matter; ABI alignment is good enough.

I guess getStackAlign() is the right alignment here.  In general, we don't guarantee the stack pointer has "stack alignment" at any particular point; it's just the largest alloca alignment that doesn't require realigning the stack.  But I guess the call frame should have stack alignment on normal targets.

The whole notion of "getStack()" is actually a little dubious, when I think about it: if you have dynamic allocation, the actual offsets can vary.  I guess it works out because the call itself is a barrier that prevents any aliasing issues.

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


More information about the llvm-commits mailing list