Commit 1e06efb6 by Martin Jambor Committed by Martin Jambor

ipa-1.c: Delete trailing spaces, put the call to f into a loop.

2010-03-24  Martin Jambor  <mjambor@suse.cz>

	* gcc.dg/ipa/ipa-1.c: Delete trailing spaces, put the call to f into
	a loop.	
	* gcc.dg/ipa/ipa-2.c: Likewise.
	* gcc.dg/ipa/ipa-3.c: Likewise.
	* gcc.dg/ipa/ipa-4.c: Likewise.
	* gcc.dg/ipa/ipa-5.c: Likewise.
	* gcc.dg/ipa/ipa-7.c: Likewise.
	* gcc.dg/ipa/ipa-6.c: Delete trailing spaces, put the call to foo into
	a loop.
	* gcc.dg/ipa/ipacost-2.c: Delete trailing spaces, put the call to
	i_can_not_be_propagated_fully2 into a loop.
	* gcc.dg/ipa/ipa-8.c: New test.
	* g++.dg/ipa/iinline-1.C: Put the call to docalling into a loop.

From-SVN: r157698
parent b98aa20c
2010-03-24 Martin Jambor <mjambor@suse.cz>
* gcc.dg/ipa/ipa-1.c: Delete trailing spaces, put the call to f into
a loop.
* gcc.dg/ipa/ipa-2.c: Likewise.
* gcc.dg/ipa/ipa-3.c: Likewise.
* gcc.dg/ipa/ipa-4.c: Likewise.
* gcc.dg/ipa/ipa-5.c: Likewise.
* gcc.dg/ipa/ipa-7.c: Likewise.
* gcc.dg/ipa/ipa-6.c: Delete trailing spaces, put the call to foo into
a loop.
* gcc.dg/ipa/ipacost-2.c: Delete trailing spaces, put the call to
i_can_not_be_propagated_fully2 into a loop.
* gcc.dg/ipa/ipa-8.c: New test.
* g++.dg/ipa/iinline-1.C: Put the call to docalling into a loop.
2010-03-24 Jakub Jelinek <jakub@redhat.com> 2010-03-24 Jakub Jelinek <jakub@redhat.com>
PR debug/19192 PR debug/19192
......
...@@ -38,8 +38,9 @@ int docalling (int (String::* f)(int delim) const) ...@@ -38,8 +38,9 @@ int docalling (int (String::* f)(int delim) const)
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
int i; int i = 0;
i = docalling (&String::funcOne); while (i < 1000)
i += docalling (&String::funcOne);
non_existent ("done", i); non_existent ("done", i);
return 0; return 0;
} }
......
...@@ -17,6 +17,8 @@ int f (int a) ...@@ -17,6 +17,8 @@ int f (int a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7); f (7);
return 0; return 0;
} }
......
...@@ -15,6 +15,8 @@ int f (int a) ...@@ -15,6 +15,8 @@ int f (int a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7); f (7);
return 0; return 0;
} }
......
...@@ -21,6 +21,8 @@ int f (double a) ...@@ -21,6 +21,8 @@ int f (double a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7.44); f (7.44);
return 0; return 0;
} }
......
...@@ -18,6 +18,8 @@ int f (int a) ...@@ -18,6 +18,8 @@ int f (int a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7); f (7);
return 0; return 0;
} }
......
...@@ -20,6 +20,8 @@ int f (float a) ...@@ -20,6 +20,8 @@ int f (float a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7.6); f (7.6);
return 0; return 0;
} }
......
...@@ -23,6 +23,8 @@ foo (int a) ...@@ -23,6 +23,8 @@ foo (int a)
int int
main () main ()
{ {
int i;
for (i = 0; i < 100; i++)
foo (7); foo (7);
return 0; return 0;
} }
......
...@@ -19,6 +19,8 @@ int f (int a) ...@@ -19,6 +19,8 @@ int f (int a)
} }
int main () int main ()
{ {
int i;
for (i = 0; i < 100; i++)
f (7); f (7);
return 0; return 0;
} }
......
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
/* { dg-add-options bind_pic_locally } */
#include <stdio.h>
static int g (int b, int c)
{
printf ("%d %d\n", b, c);
}
static int f (int a)
{
/* Second parameter of g gets different values. */
if (a > 0)
g (a, 3);
else
g (a, 5);
}
int main ()
{
f (7);
return 0;
}
/* { dg-final { scan-ipa-dump-times "versioned function" 2 "cp" } } */
/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
/* { dg-final { scan-ipa-dump "replacing param b with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
...@@ -46,8 +46,11 @@ i_can_not_be_propagated_fully2 (int *a) ...@@ -46,8 +46,11 @@ i_can_not_be_propagated_fully2 (int *a)
} }
main() main()
{ {
int i;
i_can_be_propagated_fully2 (array); i_can_be_propagated_fully2 (array);
i_can_be_propagated_fully2 (array); i_can_be_propagated_fully2 (array);
for (i = 0; i < 100; i++)
i_can_not_be_propagated_fully2 (array); i_can_not_be_propagated_fully2 (array);
i_can_not_be_propagated_fully2 (array); i_can_not_be_propagated_fully2 (array);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment