[GOOGLE] Fix new tests

Xinliang David Li davidxl@google.com
Wed Sep 24 15:23:00 GMT 2014


not sure if there is a better way, but ok.

David

On Wed, Sep 24, 2014 at 6:20 AM, Teresa Johnson <tejohnson@google.com> wrote:
> The new tests added for -mpatch-functions-for-instrumentation did not
> correctly restrict themselves to x86_64 since tree-prof.exp doesn't
> support dg-do. Work around this by using target selectors on the
> dg-options. I apply the -mpatch and related options only if it is
> x86_64, otherwise it simply does splitting.
>
> Ok for google branches?
>
> Teresa
>
> 2014-09-24  Teresa Johnson  <tejohnson@google.com>
>
>         * testsuite/gcc.dg/tree-prof/cold_partition_patch.c:
>         * testsuite/g++.dg/tree-prof/partition_patch.C:
>
> Index: testsuite/gcc.dg/tree-prof/cold_partition_patch.c
> ===================================================================
> --- testsuite/gcc.dg/tree-prof/cold_partition_patch.c   (revision 215525)
> +++ testsuite/gcc.dg/tree-prof/cold_partition_patch.c   (working copy)
> @@ -1,8 +1,7 @@
>  /* Check if patching works with function splitting. */
> -/* { dg-do compile { target x86_64-*-* } } */
>  /* { dg-require-effective-target freorder } */
> -/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps
> -mpatch-functions-for-instrumentation -fno-optimize-sibling-calls " }
> */
> -
> +/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps " {
> target { ! x86_64-*-* } } }
> +/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps
> -mpatch-functions-for-instrumentation -fno-optimize-sibling-calls " {
> target x86_64-*-* } } */
>  #define SIZE 10000
>
>  const char *sarr[SIZE];
> Index: testsuite/g++.dg/tree-prof/partition_patch.C
> ===================================================================
> --- testsuite/g++.dg/tree-prof/partition_patch.C        (revision 215525)
> +++ testsuite/g++.dg/tree-prof/partition_patch.C        (working copy)
> @@ -1,7 +1,7 @@
>  // Check if patching works with function splitting.
> -// { dg-do compile { target x86_64-*-* } }
>  // { dg-require-effective-target freorder }
> -// { dg-options "-O2 -fnon-call-exceptions
> -freorder-blocks-and-partition -mpatch-functions-for-instrumentation
> -fno-optimize-sibling-calls " }
> +// { dg-options "-O2 -fnon-call-exceptions
> -freorder-blocks-and-partition " { target { ! x86_64-*-* } } }
> +// { dg-options "-O2 -fnon-call-exceptions
> -freorder-blocks-and-partition -mpatch-functions-for-instrumentation
> -fno-optimize-sibling-calls " { target x86_64-*-* } }
>
>  int k;
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413



More information about the Gcc-patches mailing list