[PATCH] D104386: [PowerPC][Builtins] Added a number of builtins for compatibility with XL.

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 21 18:23:31 PDT 2021


nemanjai added a comment.

In D104386#2979830 <https://reviews.llvm.org/D104386#2979830>, @dim wrote:

> In D104386#2977302 <https://reviews.llvm.org/D104386#2977302>, @nemanjai wrote:
>
>> The idea with putting all of these in a separate function was to:
>>
>> 1. Make it easy to limit it to specific targets as I suggested above
>> 2. Have them all in one place to easily identify which ones are added for this compatibility so we can eventually pull this support once they are no longer needed
>> 3. Just kind of isolate this to keep it out of the way
>>
>> I really think the best way forward might be to limit this to Linux and AIX. I don't think IBM provided XLC/C++ on FreeBSD.
>
> Well, glibc also uses at least some of these `__` aliases, e.g. for `__bcopy`:
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/powerpc64/power7/memmove.S;h=f61949d30fa317ec487deb81b20e67ed3df05e32;hb=HEAD#l829
>
> and
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/powerpc64/le/power10/memmove.S;h=7dfd57edeb37e8e47a31fe6e19f254bc1fcd312b;hb=HEAD#l312
>
> but there might be more collisions...

I think it is reasonable for the GLIBC build to undef these macros in the build system. Patch to restrict this to AIX/Linux in https://reviews.llvm.org/D110213


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104386



More information about the cfe-commits mailing list