From: Richard Biener <richard.guenther@gmail.com>
To: Bin Cheng <Bin.Cheng@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH GCC]Rename and make remove_dead_inserted_code a simple dce interface
Date: Wed, 29 Nov 2017 10:11:00 -0000 [thread overview]
Message-ID: <CAFiYyc19HyqKhxV-d-yhYy1cMfZD72qjp6WH8GZehkYy=BR4pQ@mail.gmail.com> (raw)
In-Reply-To: <HE1PR0801MB2746C48168C11B0629CB95B2E73A0@HE1PR0801MB2746.eurprd08.prod.outlook.com>
On Tue, Nov 28, 2017 at 3:48 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> This patch renames remove_dead_inserted_code to simple_dce_from_worklist, moves it to tree-ssa-dce.c
> and makes it a simple public DCE interface. Bootstrap and test along with loop interchange. It's required
> for interchange pass. Is it OK?
+ /* ??? Re-use seeds as worklist not only as initial set. This may end up
+ removing more code as well. If we keep seeds unchanged we could restrict
+ new worklist elements to members of seed. */
Please remove this comment, while it applies to PRE when one takes
remove_dead_inserted_code
literally it doesn't apply to a seeded DCE.
Please also rename 'seeds' to 'worklist' directly and document that
worklist is consumed by the function.
The function has linear complexity in the number of dead stmts, the
constant factor is the number of
SSA use operands in those stmts (so 2 on average I'd say).
Ok with that change.
Thanks,
Richard.
> BTW, I will push this along with interchange to branch: gcc.gnu.org/svn/gcc/branches/gimple-linterchange.
>
> Thanks,
> bin
> 2017-11-27 Bin Cheng <bin.cheng@arm.com>
>
> * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
> tree-ssa-pre.c::remove_dead_inserted_code.
> * tree-ssa-dce.h: New file.
> * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
> (remove_dead_inserted_code): Move and rename to function
> tree-ssa-dce.c::simple_dce_from_worklist.
> (pass_pre::execute): Update use.
next prev parent reply other threads:[~2017-11-29 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 15:08 Bin Cheng
2017-11-29 10:11 ` Richard Biener [this message]
2017-11-29 11:58 ` Bin.Cheng
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='CAFiYyc19HyqKhxV-d-yhYy1cMfZD72qjp6WH8GZehkYy=BR4pQ@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=Bin.Cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.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).