This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ICF: properly handle LABEL_DECLs (PR tree-opt/81696).


On 08/08/2017 01:17 PM, Richard Biener wrote:
> On Tue, Aug 8, 2017 at 1:11 PM, Martin Liška <mliska@suse.cz> wrote:
>> Hello.
>>
>> As LABEL_DECL can point to another function (non-local goto), we must properly
>> compare them.
>>
>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>
>> Ready to be installed ?
> 
> Ok.

Thanks.

> 
> So with bb1 == bb2 == NULL could you equate them in case the DECL_CONTEXT
> functions were merged by ICF (and the labels)?  (I guess it's not
> worth the trouble)

No, that would be very rare case.

Martin

> 
> Thanks,
> Richard.
> 
>> Martin
>>
>> gcc/ChangeLog:
>>
>> 2017-08-08  Martin Liska  <mliska@suse.cz>
>>
>>         PR tree-opt/81696
>>         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
>>         LABEL_DECLs that can be from a different function.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2017-08-08  Martin Liska  <mliska@suse.cz>
>>
>>         PR tree-opt/81696
>>         * gcc.dg/ipa/pr81696.c: New test.
>> ---
>>  gcc/ipa-icf-gimple.c               |  6 +++++-
>>  gcc/testsuite/gcc.dg/ipa/pr81696.c | 26 ++++++++++++++++++++++++++
>>  2 files changed, 31 insertions(+), 1 deletion(-)
>>  create mode 100644 gcc/testsuite/gcc.dg/ipa/pr81696.c
>>
>>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]