This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add combined ELF ABI and 32/64 bit queries to the Subtarget [NFC]
ClosedPublic

Authored by sfertile on Aug 6 2019, 9:17 AM.

Details

Summary

A lot of places in the code combine checks for both ABI (SVR4/Darwin/AIX) and addressing mode (64-bit vs 32-bit). In an attempt to make some of the code more readable I've added a couple functions that combine checking for the ELF abi and 64-bit/32-bit code at once. As we add more AIX support I intend to add similar functions for the AIX ABI.

Diff Detail

Repository
rL LLVM

Event Timeline

sfertile created this revision.Aug 6 2019, 9:17 AM
nemanjai accepted this revision.Aug 21 2019, 12:59 AM

LGTM other than a couple of minor nits. Thanks for cleaning this up.

llvm/lib/Target/PowerPC/PPCISelLowering.cpp
3389 ↗(On Diff #213628)

Yes, this is a temporary situation as we work towards a functioning AIX compiler. It may be more appropriate to convert this comment to a FIXME.

4931 ↗(On Diff #213628)

I think the 64-bit matters here and the name should reflect it. Perhaps is64BitELFv1ABI?

This revision is now accepted and ready to land.Aug 21 2019, 12:59 AM
This revision was automatically updated to reflect the committed changes.