AEABI defines aligned variants of memcpy etc. that can be faster than the default version due to not having to do alignment checks. When emitting target code for these functions make use of these aligned variants if possible. Also convert memset to memclr if possible.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
It may be worth noting that with glibc these functions may be no
better and in some cases slower than the standard ISO C functions.
Trunk glibc aliases aeabi_memcpy4 to aeabi_memcpy (and similarly
with the other functions) so it should be no slower as LLVM already
translates memcpy to __aeabi_memcpy for AEABI targets through the
generic Libcall lowering mechanism.
John
New patch changes the decision of whether to do this to check what getLibcallName says the default function name is instead of duplicating the logic in ARMTargetLowering in case that logic changes.
lib/Target/ARM/ARMSelectionDAGInfo.cpp | ||
---|---|---|
42 ↗ | (On Diff #25483) | Ah, I see. Seems somewhat redundant to me (we would only get an aeabi function if the subtarget is already aapcs), and it's not like this is a time-critical function where avoiding a strncmp may be a good idea. I'll leave it as-is. |