[PINGv2][PATCH] Asan optimization for aligned accesses.

Jakub Jelinek jakub@redhat.com
Tue Sep 16 15:19:00 GMT 2014


On Tue, Sep 16, 2014 at 06:59:57PM +0400, Marat Zakirov wrote:
> --- a/gcc/asan.c
> +++ b/gcc/asan.c
> @@ -1639,9 +1639,11 @@ build_check_stmt (location_t loc, tree base, tree len,
>    if (end_instrumented)
>      flags |= ASAN_CHECK_END_INSTRUMENTED;
>  
> -  g = gimple_build_call_internal (IFN_ASAN_CHECK, 3,
> +  g = gimple_build_call_internal (IFN_ASAN_CHECK, 4,
>  				  build_int_cst (integer_type_node, flags),
> -				  base, len);
> +				  base, len,
> +				  build_int_cst (integer_type_node,
> +						 align/BITS_PER_UNIT));

Formatting.  Spaces should be around / (both before and after).

> --- /dev/null
> +++ b/gcc/testsuite/c-c++-common/asan/red-align-1.c
> @@ -0,0 +1,20 @@
> +/* This tests aligment propagation to structure elem and
> +   abcense of redudant & 7.  */

absence of redundant

> --- /dev/null
> +++ b/gcc/testsuite/c-c++-common/asan/red-align-2.c
> @@ -0,0 +1,20 @@
> +/* This tests aligment propagation to structure elem and
> +   abcense of redudant & 7.  */

Likewise.

Otherwise, LGTM.

	Jakub



More information about the Gcc-patches mailing list