public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hanke Zhang <hkzhang455@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: How to enable DCE during late_ipa_passes?
Date: Mon, 18 Sep 2023 16:08:09 +0800	[thread overview]
Message-ID: <CAM_DAs9XmjTdykRS9SK4qLTbpvzMTPEdeAgtm4J53AxAtnT-BQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc0JJz77itbk421829b15Hhug__X_9zm-8VxBnWq7wAgHQ@mail.gmail.com>

Thanks! That works!

Richard Biener <richard.guenther@gmail.com> 于2023年9月18日周一 15:56写道:
>
> On Mon, Sep 18, 2023 at 9:17 AM Hanke Zhang via Gcc <gcc@gcc.gnu.org> wrote:
> >
> > Hi, I am currently developing a new pass in the late_ipa_passes phase,
> > located behind the pass_ipa_pta and in front of the
> > pass_omp_simd_clone. I now hope that after the pass I developed, the
> > code can be vectorized, that is, the code that can be vectorized
> > during the pass_omp_simd_clone.
> >
> > But not yet, I'm guessing that maybe it's because I added some dead
> > code during the pass I developed, so I want to be followed by a DCE
> > pass right after my pass, hoping that this will allow
> > pass_omp_simd_clone to vectorize the code after my pass.
> >
> > But I've found that adding NEXT_PASS(pass_dce) directly after my pass
> > results in a runtime error, so I would like to ask if there is any
> > good way to get pass_dce to work in the late_ipa_passes phase?
>
> You could try doing
>
>   NEXT_PASS (pass_your_ipa_pass)
>   PUSH_INSERT_PASSES_WITHIN (pass_your_ipa_pass)
>     NEXT_PASS (pass_dce);
>   POP_INSERT_PASES ()
>   NEXT_PASS (pass_omp_simd_clone)
>
>
> > Hanke Zhang.

      reply	other threads:[~2023-09-18  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18  7:16 Hanke Zhang
2023-09-18  7:56 ` Richard Biener
2023-09-18  8:08   ` Hanke Zhang [this message]

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=CAM_DAs9XmjTdykRS9SK4qLTbpvzMTPEdeAgtm4J53AxAtnT-BQ@mail.gmail.com \
    --to=hkzhang455@gmail.com \
    --cc=gcc@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).