public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: GCC patches <gcc-patches@gcc.gnu.org>,
	Andrew MacLeod <amacleod@redhat.com>
Subject: Re: [PATCH 2/2] Refactor backward threader registry and profitability code into classes.
Date: Fri, 30 Apr 2021 18:16:53 +0200	[thread overview]
Message-ID: <CAGm3qMXE-bYEAsOy9k3ny98S2pzT4SEqwDsijdjAHMX1P-c-=g@mail.gmail.com> (raw)
In-Reply-To: <e7c824f4-eae9-3c12-cefb-6fea44ff750f@gmail.com>

I may just do that :).

Thanks.
Aldy

On Fri, Apr 30, 2021 at 6:10 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
> On 4/28/2021 11:12 AM, Aldy Hernandez wrote:
> > This refactors the registry and the profitability code from the
> > backwards threader into two separate classes.  It cleans up the code,
> > and makes it easier for alternate implementations to share code.
> >
> > Tested on x86-64 Linux.
> >
> > gcc/ChangeLog:
> >
> >       * tree-ssa-threadbackward.c (class thread_jumps): Split out code
> >       from here...
> >       (class back_threader_registry): ...to here...
> >       (class back_threader_profitability): ...and here...
> >       (thread_jumps::thread_through_all_blocks): Remove argument.
> >       (back_threader_registry::back_threader_registry): New.
> >       (back_threader_registry::~back_threader_registry): New.
> >       (back_threader_registry::thread_through_all_blocks): New.
> >       (thread_jumps::profitable_jump_thread_path): Move from here...
> >       (back_threader_profitability::profitable_path_p): ...to here.
> >       (thread_jumps::find_taken_edge): New.
> >       (thread_jumps::convert_and_register_current_path): Move...
> >       (back_threader_registry::register_path): ...to here.
> >       (thread_jumps::register_jump_thread_path_if_profitable): Move...
> >       (thread_jumps::maybe_register_path): ...to here.
> >       (thread_jumps::handle_phi): Call find_taken_edge and
> >       maybe_register_path.
> >       (thread_jumps::handle_assignment): Same.
> >       (thread_jumps::fsm_find_control_statement_thread_paths): Remove
> >       tree argument to handle_phi and handle_assignment.
> >       (thread_jumps::find_jump_threads_backwards): Set m_name.  Remove
> >       set of m_speed_p and m_max_threaded_paths.
> >       (pass_thread_jumps::execute): Remove second argument from
> >       find_jump_threads_backwards.
> >       (pass_early_thread_jumps::execute): Same.
>
> OK.  And if you wanted to pull any of that code into its own file,
> consider that pre-approved.
>
> jeff
>


      reply	other threads:[~2021-04-30 16:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 17:12 [PATCH 0/2] Jump threader refactor Aldy Hernandez
2021-04-28 17:12 ` [PATCH 1/2] " Aldy Hernandez
2021-04-30 15:53   ` Jeff Law
2021-04-28 17:12 ` [PATCH 2/2] Refactor backward threader registry and profitability code into classes Aldy Hernandez
2021-04-30 16:10   ` Jeff Law
2021-04-30 16:16     ` Aldy Hernandez [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='CAGm3qMXE-bYEAsOy9k3ny98S2pzT4SEqwDsijdjAHMX1P-c-=g@mail.gmail.com' \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@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).