annotate gcc/testsuite/gcc.dg/ipa/inline-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Verify that analysis of function parameters works as expected. */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-O3 -c -fdump-ipa-inline" } */
kono
parents:
diff changeset
4 struct bah {int a,b,c,d,e;};
kono
parents:
diff changeset
5 static struct bah bah3={2,3,4,5,6};
kono
parents:
diff changeset
6 const static struct bah bah4={2,3,4,5,6};
kono
parents:
diff changeset
7 void test (int, struct bah *, struct bah, struct bah, int, struct bah, struct bah, struct bah);
kono
parents:
diff changeset
8 void foo (int invariant, struct bah invariant2)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 int i;
kono
parents:
diff changeset
11 struct bah bah2={1,2,3,4,5};
kono
parents:
diff changeset
12 struct bah bah5={1,2,3,4,5};
kono
parents:
diff changeset
13 for (i = 0; i<10; i++)
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 bah5.a=i;
kono
parents:
diff changeset
16 test (i, &bah2, bah2, bah3, invariant, invariant2, bah4, bah5);
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 /* op0 change on every invocation. */
kono
parents:
diff changeset
20 /* op1 is function invariant. */
kono
parents:
diff changeset
21 /* { dg-final { scan-ipa-dump-not "op0 is compile time invariant" "inline" } } */
kono
parents:
diff changeset
22 /* { dg-final { scan-ipa-dump-not "op0 change" "inline" } } */
kono
parents:
diff changeset
23 /* { dg-final { scan-ipa-dump "op1 is compile time invariant" "inline" } } */
kono
parents:
diff changeset
24 /* op2 is invariant within loop (we make assumption that function call does not afect it.). */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
25 /* { dg-final { scan-ipa-dump "op2 change 9.990000. of time" "inline" } } */
111
kono
parents:
diff changeset
26 /* op3 is invariant within loop (we make assumption that function call does not afect it.). */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
27 /* { dg-final { scan-ipa-dump "op3 change 9.990000. of time" "inline" } } */
111
kono
parents:
diff changeset
28 /* op4 is invariant within loop. */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
29 /* { dg-final { scan-ipa-dump "op4 change 9.990000. of time" "inline" } } */
111
kono
parents:
diff changeset
30 /* op5 is invariant within loop. */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
31 /* { dg-final { scan-ipa-dump "op5 change 9.990000. of time" "inline" } } */
111
kono
parents:
diff changeset
32 /* op6 is compile time invariant. */
kono
parents:
diff changeset
33 /* { dg-final { scan-ipa-dump "op6 is compile time invariant" "inline" } } */
kono
parents:
diff changeset
34 /* op7 change. */
kono
parents:
diff changeset
35 /* { dg-final { scan-ipa-dump-not "op7 is compile time invariant" "inline" } } */
kono
parents:
diff changeset
36 /* { dg-final { scan-ipa-dump-not "op7 change" "inline" } } */