[PATCH] D39700: [Builtins] Do not use tailcall for Thumb1

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 15:15:34 PST 2017


rengolin added a subscriber: joerg.
rengolin added a comment.

In https://reviews.llvm.org/D39700#918119, @peter.smith wrote:

> Given that compiler-rt will need to support more than one C-library (Musl, libc, newlib etc.) it probably has to assume that none of the __aeabi_ specialisations of memcpy, memset etc. are implemented by the C-library.


We probably still have to provided them in freestanding environments (at least that's true for standard memset/cpy/cmp). @joerg / @compnerd know better, though.

> Looking again at the default library search order, the C-library will be searched before compiler-rt so if the C-library does define an optimised __aeabi_ implementation it will get used in preference to the one in compiler-rt so I don't think it hurts to have these in compiler-rt.

As Rich said, most C-libraries have them for compatibility purposes, not specialisation.

The fact that mem*4/8 redirect here is yet another indication that the original half-baked implementation we did to "make things work" has been grossly overlooked for 5 years.

It's a bit silly that we make such a bad effort in something so crucial to every program out there. Or maybe this is a side-effect of how RT is used by people (either from downstream patched copies or not at all).

This patch "makes things work" for Thumb1, sure, but I wouldn't use this in production for anything...


https://reviews.llvm.org/D39700





More information about the llvm-commits mailing list