This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PINGv2][PATCH] Asan optimization for aligned accesses.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marat Zakirov <m dot zakirov at samsung dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, kcc at google dot com, Yury Gribov <y dot gribov at samsung dot com>
- Date: Tue, 16 Sep 2014 17:19:38 +0200
- Subject: Re: [PINGv2][PATCH] Asan optimization for aligned accesses.
- Authentication-results: sourceware.org; auth=none
- References: <540495BD dot 20303 at samsung dot com> <54059420 dot 9070907 at samsung dot com> <5405A74E dot 2070001 at samsung dot com> <5405B5E5 dot 9030904 at samsung dot com> <5405BC13 dot 5070504 at samsung dot com> <5405CBBF dot 5010202 at samsung dot com> <5405DC2A dot 7050503 at samsung dot com> <5405DDBE dot 10703 at samsung dot com> <54104471 dot 8010005 at samsung dot com> <5418506D dot 6050806 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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