[PATCH v4] Avoid unnecessarily numbering cloned symbols.

Michael Ploujnikov michael.ploujnikov@oracle.com
Mon Oct 29 18:45:00 GMT 2018


On 2018-10-29 6:49 a.m., Martin Liška wrote:
> On 10/29/18 9:40 AM, Martin Liška wrote:
>> On 10/27/18 6:15 PM, Michael Ploujnikov wrote:
>>> Hi,
>>>
>>> On 2018-10-26 10:25 a.m., Jan Hubicka wrote:
>>>>> From aea94273e7a477a03d1ee10a5d9043d6d13b8e8d Mon Sep 17 00:00:00 2001
>>>>> From: Michael Ploujnikov <michael.ploujnikov@oracle.com>
>>>>> Date: Thu, 25 Oct 2018 13:16:36 -0400
>>>>> Subject: [PATCH] Avoid unnecessarily numbering cloned symbols.
>>>>>
>>>>> gcc/ChangeLog:
>>>>>
>>>>> 2018-10-26  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
>>>>>
>>>>> 	* cgraph.h (clone_function_name_1): Replaced by new
>>>>> 	  clone_function_name_numbered that takes name as string; for
>>>>> 	  privatize_symbol_name_1 use only.
>>>>> 	  (clone_function_name): Renamed to
>>>>> 	  clone_function_name_numbered to be explicit about numbering.
>>>>> 	  (clone_function_name): New two-argument function that does
>>>>> 	  not number its output.
>>>>> 	  (clone_function_name): New three-argument function that
>>>>> 	  takes a number to append to its output.
>>>>> 	* cgraphclones.c (duplicate_thunk_for_node):
>>>>> 	  (clone_function_name_1): Renamed.
>>>>> 	  (clone_function_name_numbered): Two new functions.
>>>>> 	  (clone_function_name): Improved documentation.
>>>>> 	  (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
>>>>> 	* config/rs6000/rs6000.c (make_resolver_func): Ditto.
>>>>> 	* final.c (final_scan_insn_1): Use the new clone_function_name
>>>>> 	  without numbering.
>>>>> 	* multiple_target.c (create_dispatcher_calls): Ditto.
>>>>> 	  (create_target_clone): Ditto.
>>>>> 	* omp-expand.c (grid_expand_target_grid_body): Ditto.
>>>>> 	* omp-low.c (create_omp_child_function_name): Ditto.
>>>>> 	* omp-simd-clone.c (simd_clone_create): Ditto.
>>>>> 	* symtab.c (simd_symtab_node::noninterposable_alias): Use the
>>>>> 	  new clone_function_name without numbering.
>>>>>
>>>>> gcc/lto/ChangeLog:
>>>>>
>>>>> 2018-10-26  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
>>>>>
>>>>> 	* lto-partition.c (privatize_symbol_name_1): Use
>>>>> 	  clone_function_name_numbered.
>>>>>
>>>>> gcc/testsuite/ChangeLog:
>>>>>
>>>>> 2018-10-26  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
>>>>>
>>>>> 	* gcc.dg/tree-prof/cold_partition_label.c: Update for cold
>>>>> 	  section names without numbers.
>>>>> 	* gcc.dg/tree-prof/section-attr-1.c: Ditto.
>>>>> 	* gcc.dg/tree-prof/section-attr-2.c: Ditto.
>>>>> 	* gcc.dg/tree-prof/section-attr-3.c: Ditto.
>>>>
>>>> OK,
>>>> thanks!
>>>> Honza
>>>>
>>>
>>> Thanks again for the review. This is my first patch and I don't have
>>> commit access. What should I do?
>>
>> I'm going to install the patch on your behalf. For write access you should
>> follow these intructions: https://www.gnu.org/software/gcc/svnwrite.html#policies
>>
>> Martin
>>
>>>
>>>
>>> - Michael
>>>
>>
> 
> But first I see some failures when I tried to apply the patch:
> 
> $ patch -p0 --dry-run < ~/Downloads/0001-Avoid-unnecessarily-numbering-cloned-symbols.patch
> checking file gcc/cgraph.h
> Hunk #1 succeeded at 2382 with fuzz 1 (offset 14 lines).
> checking file gcc/cgraphclones.c
> Hunk #1 succeeded at 317 (offset 1 line).
> checking file gcc/config/rs6000/rs6000.c
> Hunk #1 succeeded at 36997 (offset 485 lines).
> checking file gcc/lto/lto-partition.c
> checking file gcc/multiple_target.c
> checking file gcc/omp-expand.c
> checking file gcc/omp-low.c
> checking file gcc/omp-simd-clone.c
> checking file gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
> checking file gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c
> Hunk #1 FAILED at 42.
> 1 out of 1 hunk FAILED
> checking file gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c
> Hunk #1 FAILED at 41.
> 1 out of 1 hunk FAILED
> checking file gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c
> Hunk #1 FAILED at 42.
> 1 out of 1 hunk FAILED
> 
> Can you please rebase that on top of current trunk?
> Thanks,
> Martin
> 

Sorry about that. Attached is the fixed patch. Note that I'm currently unable to run
those particular section-attr tests to verify the correctness of the new scan-assembler
expressions.


Thanks for installing the patch while I figure out the SVN access.
- Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-unnecessarily-numbering-cloned-symbols.patch
Type: text/x-patch
Size: 15450 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181029/47c5ec67/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181029/47c5ec67/attachment.sig>


More information about the Gcc-patches mailing list