This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-icf::merge TLC
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Jack Howarth <howarth dot at dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Liška <mliska at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 27 Feb 2015 18:00:52 +0100
- Subject: Re: ipa-icf::merge TLC
- Authentication-results: sourceware.org; auth=none
- References: <20150225083810 dot GA86854 at kam dot mff dot cuni dot cz> <CAJMcOU-9=VSQK3RgDqezLbkQq=0CkCWC6VSaR1UxQaFopp4=sA at mail dot gmail dot com> <20150227021047 dot GA20437 at kam dot mff dot cuni dot cz> <CAMe9rOp=QHf9FtrditfQRsOms=O1Vk6QZ-TsdJAwZzda0KPzEQ at mail dot gmail dot com>
>
> This caused:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65237
Hi,
this is patch I commited. gcc.dg/attr-noinline.c has template that counts number of calls
in optimized assembler. Those do not match if one function is turned into another's wrapper.
gcc.dg/noreturn-7.c misses one warning because we unify the functions before outputting it.
I think that is OK given that the warning will come out if user fix the first instance.
gcc.dg/ipa/ipa-cp-1.c, gcc.dg/ipa/ipa-cp-2.c was accidental commits from my work with
Martin Jambor, sorry for that.
There is still gcc.target/i386/stackalign/longlong-2.c that is real bug of alignments not
being compared. I noticed that independnetly yesterday and asked Martin to add patch
(among with several other details)
Honza
PR ipa/65237
* gcc.dg/attr-noinline.c: Add -fno-ipa-icf
* gcc.dg/noreturn-7.c: Add -fno-ipa-icf.
* gcc.dg/ipa/ipa-cp-1.c: Revert accidental commit.
* gcc.dg/ipa/ipa-cp-2.c: Revert accidental commit.
Index: gcc.dg/attr-noinline.c
===================================================================
--- gcc.dg/attr-noinline.c (revision 221034)
+++ gcc.dg/attr-noinline.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -finline-functions" } */
+/* { dg-options "-O2 -finline-functions -fno-ipa-icf" } */
extern int t();
Index: gcc.dg/noreturn-7.c
===================================================================
--- gcc.dg/noreturn-7.c (revision 221034)
+++ gcc.dg/noreturn-7.c (working copy)
@@ -5,7 +5,7 @@
in presence of tail recursion within a noreturn function. */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wreturn-type -Wmissing-noreturn" } */
+/* { dg-options "-O2 -Wreturn-type -Wmissing-noreturn -fno-ipa-icf" } */
void f(void) __attribute__ ((__noreturn__));
Index: gcc.dg/ipa/ipa-cp-1.c
===================================================================
--- gcc.dg/ipa/ipa-cp-1.c (revision 221034)
+++ gcc.dg/ipa/ipa-cp-1.c (working copy)
@@ -1,22 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-cp" } */
-int n;
-
-static void
-__attribute__ ((noinline))
-test(void *a)
-{
- __builtin_memset (a,0,n);
-}
-
-int
-main()
-{
- int aa;
- short bb;
- test (&aa);
- test (&bb);
- return 0;
-}
-/* { dg-final { scan-ipa-dump "Alignment 2" "cp" } } */
-/* { dg-final { cleanup-ipa-dump "cp" } } */
Index: gcc.dg/ipa/ipa-cp-2.c
===================================================================
--- gcc.dg/ipa/ipa-cp-2.c (revision 221034)
+++ gcc.dg/ipa/ipa-cp-2.c (working copy)
@@ -1,22 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-cp" } */
-int n;
-
-static void
-__attribute__ ((noinline))
-test(void *a)
-{
- __builtin_memset (a,0,n);
-}
-
-static __attribute__ ((aligned(16))) int aa[10];
-
-int
-main()
-{
- test (&aa[1]);
- test (&aa[3]);
- return 0;
-}
-/* { dg-final { scan-ipa-dump "Alignment 8, misalignment 4" "cp" } } */
-/* { dg-final { cleanup-ipa-dump "cp" } } */