_Cilk_spawn and _Cilk_sync for C++
Iyer, Balaji V
balaji.v.iyer@intel.com
Mon Nov 18 09:02:00 GMT 2013
Hello Jason et al.,
Mike Stump mentioned that my _Cilk_spawn and _Cilk_sync for C++ may have been lost in the email pile. So, attached is an updated _Cilk_spawn and _Cilk_sync for C++ patch. Is this Ok to install?
Here are the ChangeLog entries (they shouldn't have changed since the last submission):
gcc/cp/ChangeLog
2013-11-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-cilk.o.
* cp-cilk.c: New file.
* cp-tree.h (cilk_valid_spawn): New prototype.
(gimplify_cilk_spawn): Likewise.
(cp_cilk_install_body_wframe_cleanup): Likewise.
(cilk_create_lambda_fn_tmp_var): Likewise.
* decl.c (finish_function): Insert Cilk function-calls when a
_Cilk_spawn is used in a function.
* except.c (do_begin_catch): Made the function non-static.
(do_end_catch): Likewise.
* parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and
RID_CILK_SYNC cases.
* parser.h (IN_CILK_SPAWN): New #define.
* cp-objcp-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
(LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
(LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
* pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases.
* semantics.c (potential_constant_expression_1): Likewise.
(finish_call_expr): Stored the lambda function to a variable when Cilk
Plus is enabled.
* typeck.c (cp_build_compound_expr): Reject a spawned function in a
compound expression.
(check_return_expr): Reject a spawned function in a return expression.
gcc/testsuite/ChangeLog
2013-11-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* g++.dg/cilk-plus/CK/catch_exc.cc: New test case.
* g++.dg/cilk-plus/CK/const_spawn.cc: Likewise.
* g++.dg/cilk-plus/CK/fib-opr-overload.cc: Likewise.
* g++.dg/cilk-plus/CK/fib-tplt.cc: Likewise.
* g++.dg/cilk-plus/CK/lambda_spawns.cc: Likewise.
* g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc: Likewise.
* g++.dg/cilk-plus/cilk-plus.exp: Added support to run Cilk Keywords
test stored in c-c++-common. Also, added the Cilk runtime's library
to the ld_library_path.
Thanks,
Balaji V. Iyer.j
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131118/623db193/attachment.txt>
More information about the Gcc-patches
mailing list