Re: [patch] Restore cross-language inlining into Ada

2016-01-23 Thread Duncan Sands
Hi Eric, On 23/01/16 10:25, Eric Botcazou wrote: I think we was inlining them with LTO until I installed the patch. Most of time DECL_STRUCT_FUNCTION == NULL for WPA and thus the original check testing the flags was disabled. We did not update the EH coddegen during inlining, so probably we ju

Re: [patch] Restore cross-language inlining into Ada

2016-01-23 Thread Arnaud Charlet
> OK, we may have inlined them after all... My understanding of the new code is > that we will still inline them if the Ada callee doesn't use EH, which is good > enough in my opinion. Agreed.

Re: [patch] Restore cross-language inlining into Ada

2016-01-23 Thread Eric Botcazou
> I think we was inlining them with LTO until I installed the patch. Most of > time DECL_STRUCT_FUNCTION == NULL for WPA and thus the original check > testing the flags was disabled. We did not update the EH coddegen during > inlining, so probably we just did not produce non-call EH for these. O

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Jan Hubicka
> > Why do you say so? There are C->Ada calls as there are Ada->C calls in > > plenty of existing software. > > But what percentage of the C->Ada ones are performance critical? Note that, > unlike the Ada->C or Ada/C++ ones, these have never been inlined and I can I think we was inlining them

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Eric Botcazou
> Why do you say so? There are C->Ada calls as there are Ada->C calls in > plenty of existing software. But what percentage of the C->Ada ones are performance critical? Note that, unlike the Ada->C or Ada/C++ ones, these have never been inlined and I can imagine the kind of trouble this would i

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Richard Biener
On Fri, Jan 22, 2016 at 1:00 PM, Jan Hubicka wrote: >> > I only updated >> > - /* Don't inline if the callee can throw non-call exceptions but the >> > - caller cannot. >> > - FIXME: this is obviously wrong for LTO where STRUCT_FUNCTION is >> > missing. - Move the flag into cgraph nod

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Arnaud Charlet
> > Hmm, I see now. I wonder if we can also inline > > can_thorw_non_call_exceptions to !can_throw_non_call_exceptions > > provied > > that we set the flag in ipa-inline-transform. That way we can inline Ada to > > C and the observation about no EH regions should still hold. > > I'd say you're t

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Eric Botcazou
> Hmm, I see now. I wonder if we can also inline > can_thorw_non_call_exceptions to !can_throw_non_call_exceptions provied > that we set the flag in ipa-inline-transform. That way we can inline Ada to > C and the observation about no EH regions should still hold. I'd say you're the only one cari

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Jan Hubicka
> > I only updated > > - /* Don't inline if the callee can throw non-call exceptions but the > > - caller cannot. > > - FIXME: this is obviously wrong for LTO where STRUCT_FUNCTION is > > missing. - Move the flag into cgraph node or mirror it in the inline > > summary. */ - else if (

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Richard Biener
On Fri, Jan 22, 2016 at 12:06 PM, Eric Botcazou wrote: >> I am fine with it being relaxed and permitting inlining !non_call_exceptions >> to non_call_exceptions functions.. It would be also cool to have a >> testcases. > > Thanks, patch installed with check_match changed to check_maybe_up, I'll w

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Eric Botcazou
> I am fine with it being relaxed and permitting inlining !non_call_exceptions > to non_call_exceptions functions.. It would be also cool to have a > testcases. Thanks, patch installed with check_match changed to check_maybe_up, I'll work towards adding an Ada+C LTO test but this will require fi

Re: [patch] Restore cross-language inlining into Ada

2016-01-22 Thread Eric Botcazou
> I only updated > - /* Don't inline if the callee can throw non-call exceptions but the > - caller cannot. > - FIXME: this is obviously wrong for LTO where STRUCT_FUNCTION is > missing. - Move the flag into cgraph node or mirror it in the inline > summary. */ - else if (callee_fun &

Re: [patch] Restore cross-language inlining into Ada

2016-01-21 Thread Jan Hubicka
> > > > Well, it is a while since I looked deeper into EH code, but if I remember > > correctly we have EH region associated with statements and the non-call > > exceptions do not have EH region that is taken by EH code as an information > > that the statement was proved to not throw? In that case

Re: [patch] Restore cross-language inlining into Ada

2016-01-21 Thread Richard Biener
On Thu, Jan 21, 2016 at 3:13 PM, Jan Hubicka wrote: >> On Wed, Jan 20, 2016 at 9:32 AM, Eric Botcazou wrote: >> > Hi, >> > >> > this patch from Jan: >> > https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01388.html >> > totally disabled cross-language inlining into Ada without notice, by >> > addi

Re: [patch] Restore cross-language inlining into Ada

2016-01-21 Thread Jan Hubicka
> On Wed, Jan 20, 2016 at 9:32 AM, Eric Botcazou wrote: > > Hi, > > > > this patch from Jan: > > https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01388.html > > totally disabled cross-language inlining into Ada without notice, by adding > > a > > check that always fails when the language of the ca

Re: [patch] Restore cross-language inlining into Ada

2016-01-20 Thread Richard Biener
On Wed, Jan 20, 2016 at 9:32 AM, Eric Botcazou wrote: > Hi, > > this patch from Jan: > https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01388.html > totally disabled cross-language inlining into Ada without notice, by adding a > check that always fails when the language of the callee is not Ada...

[patch] Restore cross-language inlining into Ada

2016-01-20 Thread Eric Botcazou
Hi, this patch from Jan: https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01388.html totally disabled cross-language inlining into Ada without notice, by adding a check that always fails when the language of the callee is not Ada... The attached patch simply deletes this new check to restore the i