[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

Jason Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 13:28:53 PDT 2020


jasonliu created this revision.
jasonliu added reviewers: Xiangling_L, sfertile, hubert.reinterpretcast, cebowleratibm, ZarkoCA.
Herald added subscribers: kbarton, nemanjai.
Herald added a project: clang.

Created AIXABIInfo and AIXTargetCodeGenInfo for AIX ABI.

Some investigation and FAQ on why we created AIXABIInfo:

Use or derive PPC32/PPC64 ABIInfo for AIX: 
There are a lot of subtle differences between PPC32 and PPC64 variation. For AIX we do not have a huge differences between 32 bit and 64 bit for the ABI rules. Which means if we decide to use PPC32 for 32 bit on AIX and PPC64 for 64 bit on AIX, we will need to add in a lot of target check to make them symmetric. The code flow will be really hard to follow and verify for every target that is trying to use them. And it’s easy for us to take a lot of unwanted change that really is meant for SVR targets. 
Use one ABIInfo class for both 32 bit and 64 bit on AIX will make the code much clear and easier to follow through. And that was one of the reason for us to create LowerCall_AIX/LowerFormalArgument_AIX instead of just rename and use the existing SVR4/Darwin one.

Derive from DefaultABIInfo:
We are going to override most of the methods in DefaultABIInfo anyway if we look at the analysis below.

Derive from SwiftABIInfo:
I don't think we want to claim Swift support on AIX right now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79035

Files:
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGen/aix-complex.c
  clang/test/CodeGen/aix-return.c
  clang/test/CodeGen/aix-struct-arg.c
  clang/test/CodeGen/aix-vaargs.c
  clang/test/CodeGen/aix-vector.c
  clang/test/CodeGen/ppc32-and-aix-struct-return.c
  clang/test/CodeGen/ppc32-dwarf.c
  clang/test/CodeGen/ppc64-dwarf.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79035.260737.patch
Type: text/x-patch
Size: 42275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200428/e2516d2f/attachment-0001.bin>


More information about the cfe-commits mailing list