This is the mail archive of the
mailing list for the GCC project.
Re: Improving Asan code on ARM targets
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>, Konstantin Serebryany <kcc at gcc dot gnu dot org>, Richard Earnshaw <rearnsha at arm dot com>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Tue, 29 Apr 2014 09:00:27 +0200
- Subject: Re: Improving Asan code on ARM targets
- Authentication-results: sourceware.org; auth=none
- References: <535F3DC0 dot 4070207 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Apr 29, 2014 at 09:50:56AM +0400, Yury Gribov wrote:
> I've recently noticed that GCC generates suboptimal code for Asan on
> ARM targets. E.g. for a 4-byte memory access check
> (shadow_val != 0) & (last_byte >= shadow_val)
I guess the important question is, if you write the same in user code,
do you get the better sequence with both variants or just one?
If the latter, then changing this spot is not the right thing to do,
you want to optimize it for everything, not just for asan.
If you get the same code for everything but not in asan (supposedly it could
be folded somewhere), then this patch can be considered, but it would be
good to double check it on all other architectures supported by asan,
improving arm at the expense of slowing down x86_64 or i686 is something we