This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sysdeps/arm/armv7/multiarch/memcpy_impl.S: Improve performance.


On Wed, 4 Sep 2013, Ryan S. Arnold wrote:

> Simply testing for alignment (not presuming aligned data) itself slows
> down the processing of aligned-data, but that's an unavoidable
> reality.  I've chatted with some compiler folks about the possibility
> of branching directly to aligned case labels in string routines if the
> compiler is able to detect aligned data.. but was informed that this
> suggestion might get me burned at the stake.

See the ARM EABI __aeabi_mem* functions.  At present the glibc versions 
just wrap or alias the generic ones, so don't take advantage of the extra 
alignment information (and the constraints on register clobbers also mean 
plain ARM memcpy gets used for them rather than the NEON version).  And 
GCC doesn't detect alignment and generate calls to those functions (which 
would be a pessimization anyway without glibc implementing these 
functions more optimally).  But the principle makes sense, subject to not 
pessimizing real use cases by expanding libc code size unduly (different 
entry points to functions may be better than duplicating large amounts of 
code for each alignment case).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]