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] Fix PR ipa/68035


> Hello.
> 
> Following patch triggers hash calculation of items (functions and variables)
> in situations where LTO mode is not utilized.
> 
> Patch survives regression tests and bootstraps on x86_64-linux-pc.
> 
> Ready for trunk?
> Thanks,
> Martin

> >From 62266e21a89777c6dbd680f7c87f15abe603c024 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Thu, 5 Nov 2015 18:31:31 +0100
> Subject: [PATCH] Fix PR ipa/68035
> 
> gcc/testsuite/ChangeLog:
> 
> 2015-11-05  Martin Liska  <mliska@suse.cz>
> 
> 	* gcc.dg/ipa/pr68035.c: New test.
> 
> gcc/ChangeLog:
> 
> 2015-11-05  Martin Liska  <mliska@suse.cz>
> 
> 	PR ipa/68035
> 	* ipa-icf.c (sem_item_optimizer::build_graph): Force building
> 	of a hash value for an item if we are not running in LTO mode.
> ---
>  gcc/ipa-icf.c                      |   4 ++
>  gcc/testsuite/gcc.dg/ipa/pr68035.c | 108 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 112 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.dg/ipa/pr68035.c
> 
> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index 7bb3af5..09c42a1 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -2744,6 +2744,10 @@ sem_item_optimizer::build_graph (void)
>      {
>        sem_item *item = m_items[i];
>        m_symtab_node_map.put (item->node, item);
> +
> +      /* Initialize hash values if we are not in LTO mode.  */
> +      if (!in_lto_p)
> +	item->get_hash ();
>      }

Hmm, what is the difference to the LTO mode here. I would have expected that all the items
was analyzed in both paths?

Honza


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