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 for PR ipa/64693


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
>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


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