From: Jeff Law <law@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>,
Richard Biener <rguenther@suse.de>,
Eric Botcazou <ebotcazou@adacore.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Don't DCE const/pure calls that can throw if cfg can't be altered (PR rtl-optimization/88870)
Date: Wed, 16 Jan 2019 22:48:00 -0000 [thread overview]
Message-ID: <d9e0f616-181c-9010-f23d-9c17645b3ebe@redhat.com> (raw)
In-Reply-To: <20190116224311.GA30353@tucnak>
On 1/16/19 3:43 PM, Jakub Jelinek wrote:
> Hi!
>
> For normal instructions, deletable_insn_p has:
> /* Don't delete insns that may throw if we cannot do so. */
> if (!(cfun->can_delete_dead_exceptions && can_alter_cfg)
> && !insn_nothrow_p (insn))
> return false;
>
> The following patch adds that for the const/pure non-looping calls
> that are handled earlier in the function as well (I haven't moved this test
> earlier so we don't check insn_nothrow_p on jump insns etc.).
>
> The other change is just to handle those calls the same as non-const/pure,
> if we never consider them to be deletable, there is no point in
> find_call_stack_args for them, like we don't do that for normal calls.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2019-01-16 Jakub Jelinek <jakub@redhat.com>
>
> PR rtl-optimization/88870
> * dce.c (deletable_insn_p): Never delete const/pure calls that can
> throw if we can't alter the cfg or delete dead exceptions.
> (mark_insn): Don't call find_call_stack_args for such calls.
>
> * gcc.dg/pr88870.c: New test.
OK. Though I wonder if we want to continue to support
-fnon-call-exceptions. With GCJ gone is there any value left in that
capability? There's little doubt in my mind other parts of GCC are not
-fnon-call-exception safe.
jeff
next prev parent reply other threads:[~2019-01-16 22:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 22:43 Jakub Jelinek
2019-01-16 22:48 ` Jeff Law [this message]
2019-01-16 22:51 ` Jakub Jelinek
2019-01-17 7:59 ` Arnaud Charlet
2019-01-17 11:27 ` Eric Botcazou
2019-01-17 11:33 ` Jakub Jelinek
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=d9e0f616-181c-9010-f23d-9c17645b3ebe@redhat.com \
--to=law@redhat.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=rguenther@suse.de \
/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).