This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>, Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 06 Aug 2013 07:04:15 -1000
- Subject: Re: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C
- References: <BF230D13CA30DD48930C31D4099330003A455EF0 at FMSMSX101 dot amr dot corp dot intel dot com> <52012923 dot 6030409 at redhat dot com>
On 08/06/2013 06:49 AM, Aldy Hernandez wrote:
>> --- gcc/ipa-inline-analysis.c
>> +++ gcc/ipa-inline-analysis.c
>> @@ -1433,6 +1433,9 @@ initialize_inline_failed (struct cgraph_edge *e)
>> e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
>> else if (e->call_stmt_cannot_inline_p)
>> e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
>> + else if (flag_enable_cilkplus && cfun && cfun->calls_spawn)
>> + /* We can't inline if the function is spawing a function. */
>> + e->inline_failed = CIF_BODY_NOT_AVAILABLE;
>
> Hmmm, if we don't have a cfun, perhaps we should be sticking this calls_spawn
> bit in the cgraph node.
>
> Richard? Anyone?
There will always be a function struct. Probably not cfun though.
You can get to the callee through the edge.
"BODY_NOT_AVAILABLE"? Definitely an odd error message to have chosen
for this...
r~