This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]