[PATCH] D63547: [AIX]Global Address Lowering
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 09:59:17 PDT 2019
sfertile added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp:118
+ const bool isAIXABI = Subtarget.isAIXABI();
+ assert(((isPPC64 && isSVR4ABI) || isAIXABI) &&
+ "Only supported for 64-bit SVR4 ABI and AIX ABI under large code "
----------------
Xiangling_L wrote:
> sfertile wrote:
> > Does it help readability if we add some extra helpers to the subtarget combining ABI and pointer width checks?
> > eg `is64BitELF()`, `is32BitAIX()` etc?
> or we can do?:
>
> ```
> assert(((isPPC64 && isTargetELF()) || isAIXABI) &&...
> ```
> and
> ```
> const bool is32BitAIX = !isPPC64 && isAIXABI;
> const unsigned TOCReg = (is32BitAIX) ? PPC::X2 : PPC::R2;
> ```
Sure that works as well, stick with that for now. I think we already do a lot of checks like `isPPC64() && isSVR4ABI()` and with the addition of an AIX target we are going to end up with many more of these. I can post an NFC patch adding my suggestions and we evaluate if it helps or not in that context.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63547/new/
https://reviews.llvm.org/D63547
More information about the llvm-commits
mailing list