On 04/28/2017 09:20 PM, Xi Ruoyao wrote:
On 2017-04-28 08:42 -0600, Jeff Law wrote:
On 04/28/2017 08:31 AM, Xi Ruoyao wrote:
Should I prepare (re-diff) a patch for current trunk?
If you want for the trunk, yes.
Rediff for current GCC trunk.
-- Xi Ruoyao <r...@stu.xidian.edu.cn> School of Aerospace Science and
Technology, Xidian University
pr80038-v2.patch
From aa16cfe3b8f949abc0bb2da4e09f7f61bd01a05d Mon Sep 17 00:00:00 2001
From: Xi Ruoyao<xry...@stu.xidian.edu.cn>
Date: Fri, 24 Mar 2017 04:35:23 +0800
Subject: [PATCH] Destroy temps for _Cilk_spawn calling in the child (PR
c++/80038)
Revert r227423, and re-fix PR60586 without breaking cilk specs.
2017-03-24 Xi Ruoyao<r...@stu.xidian.edu.cn>
PR c++/80038
* c-family/c-common.h (cilk_gimplify_call_params_in_spawned_fn,
cilk_install_body_pedigree_operations): Remove prototypes.
* c-family/c-gimplify.c (c_gimplify_expr): Remove the calls to
the function cilk_gimplify_call_params_in_spawned_fn.
* c-family/cilk.c: (cilk_set_spawn_marker): Mark the function
calls which should be detached.
(cilk_gimplify_call_params_in_spawned_fn,
cilk_install_body_pedigree_operations): Remove function.
(gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
unwrapping.
* c/c-typeck.c (cilk_install_body_with_frame_cleanup):
Don't add pedigree operation and detach call here.
* cp/cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Ditto.
* cp/cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn):
Remove function.
(cp_gimplify_expr): Remove the calls to the function
cilk_cp_gimplify_call_params_in_spawned_fn.
* cp/semantics.c: Preserve the flag of function calls should
be detached.
* cilk_common.c (expand_builtin_cilk_detach): Move pedigree
operations here.
* gimplify.c (gimplify_cilk_detach): New static function.
(gimplify_call_expr, gimplify_modify_expr): Call it for the
function calls should be detached.
* lto/lto-lang.c (lto_init): Set in_lto_p earlier.
* tree-core.h: Document new macro EXPR_CILK_SPAWN.
* tree.h: Add new macro EXPR_CILK_SPAWN.
* testsuite/g++.dg/cilk-plus/CK/pr80038.cc: New test.
Thanks. I fixed up the ChangeLog and installed this on the trunk.
jeff