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: [patch, testsuite, cilk] Fix cilk tests for simulators


On 06/04/2013 10:30 AM, Iyer, Balaji V wrote:
-----Original Message-----
From: Steve Ellcey [mailto:sellcey@mips.com]
Sent: Monday, June 03, 2013 6:31 PM
To: Jeff Law
Cc: Iyer, Balaji V; gcc-patches@gcc.gnu.org
Subject: Re: [patch, testsuite, cilk] Fix cilk tests for simulators

On Mon, 2013-06-03 at 13:47 -0600, Jeff Law wrote:
On 06/03/2013 01:27 PM, Iyer, Balaji V wrote:

I am OK with Steve's changes in most cases. In a few cases, I am
using it as a parameter to pass into tests. On a top-level, the main
reason why I used argc, and argv is that, I want to make sure the
compiler will never do things like constant propagation, and it will
pass it as a variable.
So use Jakub's trick, or define non-inlinable functions which return
suitable tables.

We simply can't use argc/argv in the manner in which those tests do
and I'd rather clean up the test to avoid argc/argv than support two
paths through the test, one with argc/argv, one without.

jeff

I'll leave fixing the tests to Balaji then instead of doing it myself since that way
he can be sure that they are testing what he wants to test.

Attached, please find a patch that will remove the cilk plus array notation test's dependency on argc and argv of main function. Here is the changelog entry.

2013-06-04  Balaji V. Iyer  <balaji.v.iyer@intel.com>

         * c-c++-common/cilk-plus/AN/array_test1.c (main): Replaced argc, argv
         parameters with void.
         (main2): Removed argc parameter.
         * c-c++-common/cilk-plus/AN/array_test2.c (main2): Likewise.
         (main): Replaced argc, argv parameters with void.
         * c-c++-common/cilk-plus/AN/array_test_ND.c (main): Likewise.
         (main2): Removed argc parameter.
         * c-c++-common/cilk-plus/AN/builtin_fn_custom.c (main): Replaced argc
         argv parameters with void.  Added __asm volatile to avoid optimization
         on argc, if necessary.
         * c-c++-common/cilk-plus/AN/builtin_fn_mutating (main): Likewise.
         * c-c++-common/cilk-plus/AN/builtin_func_double.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/builtin_func_double2.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/conditional.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/exec-once.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/exec-once2.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/fn_ptr.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/gather-scatter-errors.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/gather_scatter.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/parser_errors4.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/rank_mismatch2.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/sec_implicit_ex.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/sec_reduce_return.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/test_builtin_return.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/vla.c (main): Likewise.
         * c-c++-common/cilk-plus/AN/comma-exp.c (main): Replaced argc, argv
         parameters with void.
         (main2): Removed argc parameter.
         * c-c++-common/cilk-plus/AN/if_test.c (main2): Likewise.
         (main): Replaced argc, argv parameters with void.
         * c-c++-common/cilk-plus/AN/fp_triplet_values (main2): Replace argc,
         argv parameters with void.  Also renamed this function as main, and
         delete the existing main.
         * c-c++-common/cilk-plus/AN/sec_implicit.c (main2): Likewise.
         * c-c++-common/cilk-plus/AN/sec_implicit2.c (main2): Likewise.
         * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c (main2): Likewise.


So, is it Ok for trunk?
Yes.  This is fine for the trunk.

Funny, it looks like we were both waiting on Steve's feedback from your updated test.

Jeff


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