This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GOOGLE] Fix new tests
- From: Teresa Johnson <tejohnson at google dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Sep 2014 08:29:56 -0700
- Subject: Re: [GOOGLE] Fix new tests
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+XNJ3uO-vgHmkUzQ5ndVbzbYU=Gt=o0FGQr1hAt9+m4wg at mail dot gmail dot com> <CAAkRFZLuN+V=UkrC57LCj1Uedw3e-7VBzA3Mem0yJ68K7yuO_A at mail dot gmail dot com>
On Wed, Sep 24, 2014 at 8:23 AM, Xinliang David Li <davidxl@google.com> wrote:
> not sure if there is a better way, but ok.
I looked through the documentation and other tests last night, but
couldn't come up with a better way unfortunately.
Teresa
>
> 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
--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413