aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-10-30 13:03:00 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-10-30 12:03:00 +0000
commitfc0e67aaa02a6d0cc6265d1188ca619683b8d806 (patch)
tree08d5c931dd32510bca70cabe55307cf8725c94c3 /gcc
parent430d1e8de0800bc758534ad8048d9e8d53bb2335 (diff)
downloadgcc-fc0e67aaa02a6d0cc6265d1188ca619683b8d806.zip
gcc-fc0e67aaa02a6d0cc6265d1188ca619683b8d806.tar.gz
gcc-fc0e67aaa02a6d0cc6265d1188ca619683b8d806.tar.bz2
Remove alias set comparison.
2019-10-30 Martin Liska <mliska@suse.cz> * ipa-icf-gimple.c (func_checker::compatible_types_p): Do not compare alias sets. It's handled by operand_equal_p. 2019-10-30 Martin Liska <mliska@suse.cz> * c-c++-common/Wstringop-truncation-4.c: Disable IPA ICF. * gcc.dg/tree-ssa/pr64910-2.c: Likewise. * gcc.dg/tree-ssa/pr79352.c: Likewise. From-SVN: r277618
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-icf-gimple.c12
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/Wstringop-truncation-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr79352.c2
6 files changed, 14 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3537a61..3ea3d91 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2019-10-30 Martin Liska <mliska@suse.cz>
+ * ipa-icf-gimple.c (func_checker::compatible_types_p):
+ Do not compare alias sets. It's handled by operand_equal_p.
+
+2019-10-30 Martin Liska <mliska@suse.cz>
+
* ipa-icf-gimple.c (func_checker::func_checker): Do not
initialize m_compare_polymorphic.
(func_checker::compare_decl): Do not compare polymorphic types.
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index 3193823..5b0fbc1 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "data-streamer.h"
#include "gimple-pretty-print.h"
-#include "alias.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "ipa-utils.h"
@@ -209,17 +208,6 @@ func_checker::compatible_types_p (tree t1, tree t2)
if (!types_compatible_p (t1, t2))
return return_false_with_msg ("types are not compatible");
- /* We do a lot of unnecesary matching of types that are not being
- accessed and thus do not need to be compatible. In longer term we should
- remove these checks on all types which are not accessed as memory
- locations.
-
- For time being just avoid calling get_alias_set on types that are not
- having alias sets defined at all. */
- if (type_with_alias_set_p (t1) && type_with_alias_set_p (t2)
- && get_alias_set (t1) != get_alias_set (t2))
- return return_false_with_msg ("alias sets are different");
-
return true;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9bee47b..59c2e56 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-30 Martin Liska <mliska@suse.cz>
+
+ * c-c++-common/Wstringop-truncation-4.c: Disable IPA ICF.
+ * gcc.dg/tree-ssa/pr64910-2.c: Likewise.
+ * gcc.dg/tree-ssa/pr79352.c: Likewise.
+
2019-10-30 Jakub Jelinek <jakub@redhat.com>
* c-c++-common/gomp/declare-variant-2.c: Add a test with , before
diff --git a/gcc/testsuite/c-c++-common/Wstringop-truncation-4.c b/gcc/testsuite/c-c++-common/Wstringop-truncation-4.c
index c76f282..1520953 100644
--- a/gcc/testsuite/c-c++-common/Wstringop-truncation-4.c
+++ b/gcc/testsuite/c-c++-common/Wstringop-truncation-4.c
@@ -3,7 +3,7 @@
Verify that -Wstringop-truncation is issued for uses of arrays and
pointers to qualified forms of characters of all three types.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wstringop-truncation" } */
+ { dg-options "-O2 -Wall -Wstringop-truncation -fno-ipa-icf" } */
#if __cplusplus
extern "C"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c
index 2e3d679..812bfa4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+/* { dg-options "-O2 -fdump-tree-reassoc1 -fno-ipa-icf" } */
/* We want to make sure that we reassociate in a way that has the
constant last. With the constant last, it's more likely to result
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr79352.c b/gcc/testsuite/gcc.dg/tree-ssa/pr79352.c
index 485e2d6..36e195c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr79352.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr79352.c
@@ -1,7 +1,7 @@
/* PR tree-optimization/79352 - -fprintf-return-value doesn't handle
flexible-like array members properly
{ dg-do compile }
- { dg-options "-O2 -fdump-tree-optimized" } */
+ { dg-options "-O2 -fdump-tree-optimized -fno-ipa-icf" } */
struct A { int i; char a1[1]; };
struct B { int i; char a3[3]; };