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: [GOOGLE] Fix new tests


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


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