diff mbox

Fix for PR ipa/64693

Message ID 54F08FA5.8070801@suse.cz
State New
Headers show

Commit Message

Martin Liška Feb. 27, 2015, 3:39 p.m. UTC
On 02/26/2015 07:21 PM, Jan Hubicka wrote:
> 2015-02-25  Martin Liska  <mliska@suse.cz>
> 	    Jan Hubicka  <hubicka@ucw.cz>
>
> 	PR ipa/64693
> 	* ipa-icf.c (symbol_compare_collection::symbol_compare_collection): New.
> 	(sem_item_optimizer::subdivide_classes_by_sensitive_refs): New function.
> 	(sem_item_optimizer::process_cong_reduction): Include division by
> 	sensitive references.
> 	* ipa-icf.h (struct symbol_compare_hashmap_traits): New class.
> 	* ipa-ref.c (ipa_ref::address_matters_p): New function.
> 	* ipa-ref.h (ipa_ref::address_matters_p): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> 2015-02-25  Martin Liska  <mliska@suse.cz>
> 	    Jan Hubicka  <hubicka@ucw.cz>
>
> 	* g++.dg/ipa/pr64146.C: Update expected results.
> 	* gcc.dg/ipa/ipa-icf-26.c: Update test.
> 	* gcc.dg/ipa/ipa-icf-33.c: Remove redundant line.
> 	* gcc.dg/ipa/ipa-icf-34.c: New test.
>
> OK
> Honza
>

Hi.

There's one missing vector comparison. Fix is obvious, ready for trunk?

Thanks,
Martin

Comments

Jan Hubicka Feb. 27, 2015, 4:58 p.m. UTC | #1
> Hi.
> 
> There's one missing vector comparison. Fix is obvious, ready for trunk?
> 
> Thanks,
> Martin

> >From 3d03fb28ec21b6ed30d5179bd70aba79d246cd26 Mon Sep 17 00:00:00 2001
> From: mliska <mliska@suse.cz>
> Date: Fri, 27 Feb 2015 16:35:31 +0100
> Subject: [PATCH] Fix missing condition in symbol_compare_hashmap_traits.
> 
> gcc/ChangeLog:
> 
> 2015-02-27  Martin Liska  <mliska@suse.cz>
> 
> 	* ipa-icf.h (struct symbol_compare_hashmap_traits): Add missing
> 	vector length condition.
OK
Honza
> ---
>  gcc/ipa-icf.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
> index 9e76239..077267c 100644
> --- a/gcc/ipa-icf.h
> +++ b/gcc/ipa-icf.h
> @@ -110,7 +110,8 @@ struct symbol_compare_hashmap_traits: default_hashmap_traits
>    equal_keys (const symbol_compare_collection *a,
>  	      const symbol_compare_collection *b)
>    {
> -    if (a->m_references.length () != b->m_references.length ())
> +    if (a->m_references.length () != b->m_references.length ()
> +	|| a->m_interposables.length () != b->m_interposables.length ())
>        return false;
>  
>      for (unsigned i = 0; i < a->m_references.length (); i++)
> -- 
> 2.1.2
>
diff mbox

Patch

From 3d03fb28ec21b6ed30d5179bd70aba79d246cd26 Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Fri, 27 Feb 2015 16:35:31 +0100
Subject: [PATCH] Fix missing condition in symbol_compare_hashmap_traits.

gcc/ChangeLog:

2015-02-27  Martin Liska  <mliska@suse.cz>

	* ipa-icf.h (struct symbol_compare_hashmap_traits): Add missing
	vector length condition.
---
 gcc/ipa-icf.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
index 9e76239..077267c 100644
--- a/gcc/ipa-icf.h
+++ b/gcc/ipa-icf.h
@@ -110,7 +110,8 @@  struct symbol_compare_hashmap_traits: default_hashmap_traits
   equal_keys (const symbol_compare_collection *a,
 	      const symbol_compare_collection *b)
   {
-    if (a->m_references.length () != b->m_references.length ())
+    if (a->m_references.length () != b->m_references.length ()
+	|| a->m_interposables.length () != b->m_interposables.length ())
       return false;
 
     for (unsigned i = 0; i < a->m_references.length (); i++)
-- 
2.1.2