This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] arm: Enable ARM mode for armv6 strlen
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "pb at pbcl dot net" <pb at pbcl dot net>
- Cc: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>, nd <nd at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "adhemerval dot zanella at linaro dot org" <adhemerval dot zanella at linaro dot org>
- Date: Fri, 13 Apr 2018 15:43:22 +0000
- Subject: Re: [PATCH 4/4] arm: Enable ARM mode for armv6 strlen
- Nodisclaimer: True
- References: <DB6PR0801MB205308296F976C0B8B5A634583B30@DB6PR0801MB2053.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Phil Blundell wrote:
> But here we are, two decades later, and the landscape is a bit
> different. It's not entirely clear that -marm/-mthumb are very useful
> options in an ARMv7 world because the user shouldn't need to care. In
> an ideal world the compiler would be able to predict for any given
> function whether T32 or A32 encoding would give the best results
> (either speed or space according to the selected optimisation settings)
> and proceed accordingly. Unfortunately in practice I don't think
> we're quite there yet and for critical code there's still an element of
> "try building it both ways round and see which one runs quickest" which
> means the compiler flags probably are still necessary. Users might
> even legitimately wish to try that experiment with glibc, so forbidding
> them to compile it under -marm would not obviously be the right thing
> to do.
If there are still cases where GCC generates worse code for Thumb-2,
then those can be addressed easily. Our very first Thumb-2 compiler
had performance within 2% on ARM1156T2 more than 2 decades ago!
Things have improved a lot since then, and system wide effects of code
footprint have become more important, so using only Arm on a modern
core just doesn't make any sense today.
Wilco