This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ICF: properly handle LABEL_DECLs (PR tree-opt/81696).
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 8 Aug 2017 13:17:28 +0200
- Subject: Re: [PATCH] ICF: properly handle LABEL_DECLs (PR tree-opt/81696).
- Authentication-results: sourceware.org; auth=none
- References: <7d571cd7-7e8c-f283-91b3-4062eed47cdf@suse.cz>
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.
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)
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
>
>