This is the mail archive of the
mailing list for the GCC project.
Re: Improving Asan code on ARM targets
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: pinskia at gmail dot com
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Evgeniy Stepanov <eugeni dot stepanov at gmail dot com>, gcc <gcc at gcc dot gnu dot org>, Konstantin Serebryany <kcc at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Richard Earnshaw <rearnsha at arm dot com>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>, Richard Biener <richard dot guenther at gmail dot com>, Zhenqiang Chen <zhenqiang dot chen at linaro dot org>
- Date: Tue, 06 May 2014 12:13:18 +0400
- Subject: Re: Improving Asan code on ARM targets
- Authentication-results: sourceware.org; auth=none
- References: <535F3DC0 dot 4070207 at samsung dot com> <CA+=Sn1nyt8JTV_ZqWXgjW3zRqTJsWd1R5hi20b4Tmd2fCDxxmg at mail dot gmail dot com> <CAGQ9bdwzL+C8OhPjD14KsXNgNx=ANcxPEz=y+yt5CqW2tPFYdA at mail dot gmail dot com> <535F4FDE dot 2080607 at samsung dot com> <1D7AF130-C8DD-4D9E-9A91-EB2EEA14B1CD at gmail dot com> <535F9A1E dot 1060502 at samsung dot com>
Andrew Pinski wrote:
> Yury Gribov wrote:
>> Andrew Pinski wrote:
>>> 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
>>> Does the patch series at located at:
>>> Fix this code generation issue? I suspect it does and improves more
>>> than just the above code.
>> No, they don't help as is.
> I think it would good to figure out how to improve this code gen
> with the above patches rather than changing asan.
> I suspect it might easy to expand them to handle this case too.
I was indeed able to reuse Zhenqiang's work. After updating
select_ccmp_cmp_order hook to also return suggestions on how to change
comparisons to allow better code generation (so it sounds more like
select_ccmp_cmp_layout now) I was able to use this information in
expand_ccmp_expr to generate optimal code.
The patch is still a draft (only supports Asan's case) and I think I'll
wait until Zhenqiang's conditional compare patches get into trunk before
going deeper (not sure when this is going to happen though...).