From: Jan Hubicka <hubicka@ucw.cz>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
gcc-patches@gcc.gnu.org,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [patch] Restore cross-language inlining into Ada
Date: Fri, 22 Jan 2016 12:00:00 -0000 [thread overview]
Message-ID: <20160122120036.GB98233@kam.mff.cuni.cz> (raw)
In-Reply-To: <1712344.lljgTvaZVQ@polaris>
> > 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 &&
> > callee_fun->can_throw_non_call_exceptions - && !(caller_fun &&
> > caller_fun->can_throw_non_call_exceptions)) - {
> > - e->inline_failed = CIF_NON_CALL_EXCEPTIONS;
> > - inlinable = false;
> > - }
> > to actually work with LTO where callee_fun/caller_fun is not always
> > available (but sometimes, like when ICF requested the body or when we
> > merged profiles, it is).
>
> No, that's not true. Let's consider an Ada caller and a C callee. With the
> old code (mine as you remarked): caller_fun->can_throw_non_call_exceptions is
> true and callee_fun->can_throw_non_call_exceptions is false, so the above test
> is false and we can inline. With the new code (yours): check_match is true
> and opt_for_fn (callee->decl, flag_non_call_exceptions) is false, so we cannot
> inline.
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.
Honza
>
> --
> Eric Botcazou
next prev parent reply other threads:[~2016-01-22 12:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 8:32 Eric Botcazou
2016-01-20 11:34 ` Richard Biener
2016-01-21 14:13 ` Jan Hubicka
2016-01-21 14:14 ` Richard Biener
2016-01-21 14:20 ` Jan Hubicka
2016-01-22 11:06 ` Eric Botcazou
2016-01-22 11:30 ` Richard Biener
2016-01-22 10:53 ` Eric Botcazou
2016-01-22 12:00 ` Jan Hubicka [this message]
2016-01-22 12:06 ` Eric Botcazou
2016-01-22 12:12 ` Arnaud Charlet
2016-01-22 12:40 ` Eric Botcazou
2016-01-22 18:22 ` Jan Hubicka
2016-01-23 9:25 ` Eric Botcazou
2016-01-23 9:51 ` Arnaud Charlet
2016-01-23 12:34 ` Duncan Sands
2016-01-22 12:33 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160122120036.GB98233@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).