public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Strager Neds <strager.nds@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 3/3] Improve efficiency of copying section from another tree
Date: Mon, 30 Nov 2020 13:16:54 +0100	[thread overview]
Message-ID: <d2feed78-6e63-d8f1-021c-7bf1534b6402@suse.cz> (raw)
In-Reply-To: <CAC-ggsFbbjwjPruGA9dNezgvPKaPTJUAFYAX1q+EyGP-QPQqhw@mail.gmail.com>

On 11/13/19 7:29 AM, Strager Neds wrote:
> -/* Worker for set_section.  */
> +void
> +symtab_node::set_section_for_node (const symtab_node &other)
> +{
> +  if (x_section == other.x_section)
> +    return;
> +  if (get_section () && other.get_section ())
> +    gcc_checking_assert (strcmp (get_section (), other.get_section ()) != 0);
> +  release_section_hash_entry (x_section);
> +  if (other.x_section)
> +    x_section = retain_section_hash_entry (other.x_section);
> +  else
> +    x_section = NULL;
> +}
> +
> +/* Workers for set_section.  */
> 
>   bool
> -symtab_node::set_section (symtab_node *n, void *s)
> +symtab_node::set_section_from_string (symtab_node *n, void *s)
>   {
>     n->set_section_for_node ((char *)s);
>     return false;
>   }
> 
> +bool
> +symtab_node::set_section_from_node (symtab_node *n, void *o)
> +{
> +  const symtab_node &other = *static_cast<const symtab_node *> (o);
> +  n->set_section_for_node (other);
> +  return false;
> +}
> +
>   /* Set section of symbol and its aliases.  */

Hello.

Apparently, the patch caused the following regression:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98057

I've got a fix for it, but I would appreciate function comments
for the

void
symtab_node::set_section_for_node (const symtab_node &other)

and
bool
symtab_node::set_section_from_node (symtab_node *n, void *o)

Can you please add it?
Thanks,
Martin



  parent reply	other threads:[~2020-11-30 12:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  6:28 [PATCH 1/3] Refactor copying decl section names Strager Neds
2019-11-13  6:29 ` [PATCH 2/3] Refactor section name ref counting Strager Neds
2019-11-13  7:31   ` [PATCH 3/3] Improve efficiency of copying section from another tree Strager Neds
2020-11-11  3:59     ` Jeff Law
2020-11-30 12:16     ` Martin Liška [this message]
2020-11-30 22:27       ` Jeff Law
2020-11-11  3:55   ` [PATCH 2/3] Refactor section name ref counting Jeff Law
2020-01-14 22:09 ` [PATCH 1/3] Refactor copying decl section names Jeff Law
2020-11-10 16:30 ` Jeff Law
2020-11-10 18:45 ` Jeff Law
2020-11-11  3:57   ` Alan Modra
2020-11-11  4:19     ` Jeff Law
2020-11-11  5:11       ` Alan Modra
2020-11-11 18:20         ` Jeff Law

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=d2feed78-6e63-d8f1-021c-7bf1534b6402@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=strager.nds@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).