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

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 09:57:36 PST 2019


sfertile marked an inline comment as done.
sfertile added a comment.

In D71504#1786135 <https://reviews.llvm.org/D71504#1786135>, @hubert.reinterpretcast wrote:

> In D71504#1785698 <https://reviews.llvm.org/D71504#1785698>, @ZarkoCA wrote:
>
> > So it doesn't look like we need to add any special handling for struct returns on AIX? I had a quick look and none of the other PPC targets seem to have anything.
>
>
> By the time we get the IR in this form from the front-end, we shouldn't need special handling here. We know the front-end does not represent complex types in an ideal way for AIX here.


We added the fatal_error in the previous patch in order to keep the patch as small and focused as possible. For back-end implementation everything should just work: we allocate a frame index for the object on the stack and pass a pointer to the frame-object as the argument. At that point its simply another pointer argument. As Hubert mentions though there is front-end (clang/CodeGen) work that is needed for generating the correct IR for AIX argument passing.



================
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,
+
----------------
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.


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