diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-13 17:31:30 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-13 17:31:30 +0000 |
commit | 3dd775fb895cffb77ac74098a74e9fca28edaf79 (patch) | |
tree | f68062e9cfe09046337dc976767a5f7938462868 /gcc/cp/cp-gimplify.c | |
parent | 84014c53e113ab540befd1eceb8598d28a323ab3 (diff) | |
parent | 34a5d2a56d4b0a0ea74339c985c919aabfc530a4 (diff) | |
download | gcc-3dd775fb895cffb77ac74098a74e9fca28edaf79.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205966 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r-- | gcc/cp/cp-gimplify.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index b1270a187f1..5fa564c57d1 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "splay-tree.h" #include "target.h" #include "c-family/c-ubsan.h" +#include "cilk.h" /* Forward declarations. */ @@ -584,12 +585,21 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) LHS of an assignment might also be involved in the RHS, as in bug 25979. */ case INIT_EXPR: + if (fn_contains_cilk_spawn_p (cfun) + && cilk_detect_spawn_and_unwrap (expr_p) + && !seen_error ()) + return (enum gimplify_status) gimplify_cilk_spawn (expr_p); cp_gimplify_init_expr (expr_p); if (TREE_CODE (*expr_p) != INIT_EXPR) return GS_OK; /* Otherwise fall through. */ case MODIFY_EXPR: { + if (fn_contains_cilk_spawn_p (cfun) + && cilk_detect_spawn_and_unwrap (expr_p) + && !seen_error ()) + return (enum gimplify_status) gimplify_cilk_spawn (expr_p); + /* If the back end isn't clever enough to know that the lhs and rhs types are the same, add an explicit conversion. */ tree op0 = TREE_OPERAND (*expr_p, 0); @@ -698,6 +708,21 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) } break; + case CILK_SPAWN_STMT: + gcc_assert + (fn_contains_cilk_spawn_p (cfun) + && cilk_detect_spawn_and_unwrap (expr_p)); + + /* If errors are seen, then just process it as a CALL_EXPR. */ + if (!seen_error ()) + return (enum gimplify_status) gimplify_cilk_spawn (expr_p); + + case CALL_EXPR: + if (fn_contains_cilk_spawn_p (cfun) + && cilk_detect_spawn_and_unwrap (expr_p) + && !seen_error ()) + return (enum gimplify_status) gimplify_cilk_spawn (expr_p); + default: ret = (enum gimplify_status) c_gimplify_expr (expr_p, pre_p, post_p); break; |