This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin LiÅka <mliska at suse dot cz>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 May 2016 16:46:24 +0200
- Subject: Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope
- Authentication-results: sourceware.org; auth=none
- References: <572C7A3E dot 4000905 at suse dot cz> <572C848E dot 9020705 at samsung dot com> <572C9963 dot 9020207 at suse dot cz> <20160506132528 dot GK26501 at tucnak dot zalov dot cz> <572CAD25 dot 2040804 at suse dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 06, 2016 at 04:41:41PM +0200, Martin LiÅka wrote:
> On 05/06/2016 03:25 PM, Jakub Jelinek wrote:
> > Well, we already have the gimple poisoning/unpoisoning code on RTL (emitted
> > after the prologue and before the epilogue), so it shouldn't be that hard.
> > I'd only do the most common/easy cases inline though, like 1/2/4/8/16/32
> > bytes long variables.
> >
> > Jakub
>
> You are right, I didn't realize it earlier.
> As I've collected statistics for tramp3d, poisoning code has following distribution:
>
> 4:1.62%
> 8:3.53%
> 12:94.76%
>
> which is quite interesting that 12B are such a common size :)
> Probably due to a lot of time spent in ::evaluate (MultiArgEvaluator and MultiArgEvaluator).
> Considering just variables which needs_to_live_in_memory, tramp3d is still ~15x slower.
Please look at other testcases, not just tramp3d - we in the end don't want
to tune it to just tramp3d. Pick up some 3-4 C/C++ benchmarks, tramp3d can
be one of them ;)
Jakub