Re: [PATCH 3/3] Improve efficiency of copying section from another tree

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 5:16 AM, Martin Liška wrote: > 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_sect

Re: [PATCH 3/3] Improve efficiency of copying section from another tree

2020-11-30 Thread Martin Liška
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.

Re: [PATCH 3/3] Improve efficiency of copying section from another tree

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/12/19 11:29 PM, Strager Neds wrote: > Several parts of GCC need to copy a section name from one tree (or > symtab_node) to another. Currently, this is implemented naively: > > 1. Query the source's section name > 2. Hash the section name string > 3. Find the section_hash_entry in the symbol

[PATCH 3/3] Improve efficiency of copying section from another tree

2019-11-12 Thread Strager Neds
Several parts of GCC need to copy a section name from one tree (or symtab_node) to another. Currently, this is implemented naively: 1. Query the source's section name 2. Hash the section name string 3. Find the section_hash_entry in the symbol table 4. Increment the section_hash_entry's reference