[PATCH] D71504: [PowerPC] Enable sret arguments.

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 14:26:58 PST 2019


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-sret-param.ll:35
+; MIR:      stack:
+; MIR-NEXT:  - { id: 0, name: s, type: default, offset: 0, size: 1, alignment: 8,
+
----------------
sfertile wrote:
> sfertile wrote:
> > hubert.reinterpretcast wrote:
> > > What is the cause of this alignment value?
> > Frame object alignment smaller then 8 gets promoted  ... but I'm not exactly sure why 8 as opposed to 4 or 16. I'll figure out where the 8 comes from.
> When determining the alignment of the frame object we consider 3 different alignments and take the maximum of those. The three alignments are
> 1) The preferred aggregate alignment which is 8 by default: [[ https://github.com/llvm/llvm-project/blob/2c8e22d25c2091764ccde67812a3f707277052b2/llvm/lib/IR/DataLayout.cpp#L171 | here]]
> 2) The alignment from the StructLayout object.
> 3) The alignment on the alloca instruction.
> 
> So any alignment less then 8 will get promoted to 8 when creating the frame object.
> 
Got it. Thanks for looking into this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71504/new/

https://reviews.llvm.org/D71504





More information about the llvm-commits mailing list