>
> > case CILK_SPAWN_STMT:
> > gcc_assert
> > (fn_contains_cilk_spawn_p (cfun)
> > && lang_hooks.cilkplus.cilk_detect_spawn_and_unwrap (expr_p));
> > if (!seen_error ())
> > {
> > ret = (enum gimplify_status)
> > lang_hooks.cilkplus.gimplify_cilk_spawn (expr_p, pre_p,
> > post_p);
> > break;
> > }
> > /* If errors are seen, then just process it as a CALL_EXPR.
> > */
>
> Please remove these langhooks and instead add handling of
> CILK_SPAWN_STMT to c_gimplify_expr and cp_gimplify_expr.
>
Hi Jason,
I really cannot do this because if the spawned function returns a
value, the whole expression must be pushed into the spawn helper. Thus, this
lang_hooks function is called in the gimplify_modify_expr and a couple other
places.
E.g. In:
x = _Cilk_spawn func ()
The spawn helper should contain:
x = func ();
Thanks,
Balaji V. Iyer.