public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: gcc-patches@gcc.gnu.org
Cc: Bernd Schmidt <bernds_cb1@t-online.de>,
	Vladimir Makarov <vmakarov@redhat.com>,
	 Jeff Law <jeffreyalaw@gmail.com>,
	Alexander Monakov <amonakov@ispras.ru>,
	 Richard Guenther <richard.guenther@gmail.com>
Subject: Re: [PATCH v3 6/8] sched_deps.cc: Simplify initialization of dependency contexts
Date: Mon, 15 Jan 2024 17:05:11 +0400	[thread overview]
Message-ID: <CAD0Vn-BnXsMy3J=2XJ9_SqokvOLrEKU9H_a08FT1u9W6n06-xA@mail.gmail.com> (raw)
In-Reply-To: <20231122111415.815147-7-maxim.kuvyrkov@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

Dear scheduler maintainers,

Gentle ping.  This is a trivial cleanup.

On Wed, 22 Nov 2023 at 15:14, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
wrote:

> gcc/ChangeLog:
>
>         * sched-deps.cc (init_deps, init_deps_reg_last): Simplify.
>         (free_deps): Remove useless code.
> ---
>  gcc/sched-deps.cc | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/gcc/sched-deps.cc b/gcc/sched-deps.cc
> index 2a87158ba4b..e0d3c97d935 100644
> --- a/gcc/sched-deps.cc
> +++ b/gcc/sched-deps.cc
> @@ -3927,10 +3927,9 @@ init_deps (class deps_desc *deps, bool
> lazy_reg_last)
>    int max_reg = (reload_completed ? FIRST_PSEUDO_REGISTER : max_reg_num
> ());
>
>    deps->max_reg = max_reg;
> -  if (lazy_reg_last)
> -    deps->reg_last = NULL;
> -  else
> -    deps->reg_last = XCNEWVEC (struct deps_reg, max_reg);
> +  deps->reg_last = NULL;
> +  if (!lazy_reg_last)
> +    init_deps_reg_last (deps);
>    INIT_REG_SET (&deps->reg_last_in_use);
>
>    deps->pending_read_insns = 0;
> @@ -3961,9 +3960,7 @@ init_deps (class deps_desc *deps, bool lazy_reg_last)
>  void
>  init_deps_reg_last (class deps_desc *deps)
>  {
> -  gcc_assert (deps && deps->max_reg > 0);
> -  gcc_assert (deps->reg_last == NULL);
> -
> +  gcc_assert (deps && deps->max_reg > 0 && deps->reg_last == NULL);
>    deps->reg_last = XCNEWVEC (struct deps_reg, deps->max_reg);
>  }
>
> @@ -4013,8 +4010,6 @@ free_deps (class deps_desc *deps)
>       it at all.  */
>    free (deps->reg_last);
>    deps->reg_last = NULL;
> -
> -  deps = NULL;
>  }
>
>  /* Remove INSN from dependence contexts DEPS.  */
> --
> 2.34.1
>
>

-- 
Maxim Kuvyrkov
www.linaro.org

  reply	other threads:[~2024-01-15 13:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 12:06 [PATCH 0/1] Avoid exponential behavior in scheduler and better logging Maxim Kuvyrkov
2023-11-20 12:06 ` [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior Maxim Kuvyrkov
2023-11-20 13:09   ` Richard Biener
2023-11-20 13:42     ` Maxim Kuvyrkov
2023-11-20 13:45       ` Richard Biener
2023-11-20 14:48         ` [PATCH v2] " Maxim Kuvyrkov
2023-11-20 18:59         ` [PATCH 1/1] " Maxim Kuvyrkov
2023-11-20 13:52   ` Alexander Monakov
2023-11-20 14:39     ` Maxim Kuvyrkov
2023-11-20 16:30       ` Alexander Monakov
2023-11-21 10:32         ` Maxim Kuvyrkov
2023-11-21 11:05           ` Alexander Monakov
2023-11-22 11:14 ` [PATCH v3 0/8] Avoid exponential behavior in scheduler and better logging Maxim Kuvyrkov
2023-11-22 11:14 ` [PATCH v3 1/8] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior Maxim Kuvyrkov
2024-01-15 12:56   ` Maxim Kuvyrkov
2024-01-15 18:26     ` Vladimir Makarov
2024-01-16 14:52     ` Jeff Law
2024-01-17  6:51       ` Richard Biener
2024-01-17  7:39         ` Maxim Kuvyrkov
2024-01-17 15:02           ` Richard Biener
2024-01-17 15:05             ` Maxim Kuvyrkov
2024-01-17 15:44               ` Maxim Kuvyrkov
2024-01-17 18:54             ` H.J. Lu
2023-11-22 11:14 ` [PATCH v3 2/8] Unify implementations of print_hard_reg_set() Maxim Kuvyrkov
2023-11-22 15:04   ` Vladimir Makarov
2023-11-22 11:14 ` [PATCH v3 3/8] Simplify handling of INSN_ and EXPR_LISTs in sched-rgn.cc Maxim Kuvyrkov
2024-01-15 12:59   ` Maxim Kuvyrkov
2023-11-22 11:14 ` [PATCH v3 4/8] Improve and fix sched-deps.cc: dump_dep() and dump_lists() Maxim Kuvyrkov
2024-01-15 13:01   ` Maxim Kuvyrkov
2023-11-22 11:14 ` [PATCH v3 5/8] Add a bit more logging scheduler's dependency analysis Maxim Kuvyrkov
2024-01-15 13:04   ` Maxim Kuvyrkov
2023-11-22 11:14 ` [PATCH v3 6/8] sched_deps.cc: Simplify initialization of dependency contexts Maxim Kuvyrkov
2024-01-15 13:05   ` Maxim Kuvyrkov [this message]
2023-11-22 11:14 ` [PATCH v3 7/8] Improve logging of register data in scheduler dependency analysis Maxim Kuvyrkov
2024-01-15 13:06   ` Maxim Kuvyrkov
2023-11-22 11:14 ` [PATCH v3 8/8] Improve logging of scheduler dependency analysis context Maxim Kuvyrkov
2024-01-15 13:08   ` Maxim Kuvyrkov

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='CAD0Vn-BnXsMy3J=2XJ9_SqokvOLrEKU9H_a08FT1u9W6n06-xA@mail.gmail.com' \
    --to=maxim.kuvyrkov@linaro.org \
    --cc=amonakov@ispras.ru \
    --cc=bernds_cb1@t-online.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=vmakarov@redhat.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).