OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [inline-2.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Verify that logic combining probabilities works as expected.  */
2
/* { dg-do compile } */
3
/* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining"  } */
4
 
5
struct bah {int a,b,d;};
6
 
7
__attribute__ ((noinline))
8
void test(int a,int b,int c,int d,int e)
9
{
10
  test3(a,b,c,d,e);
11
}
12
inline
13
static void bar (int parm1, int parm2)
14
{
15
  int i;
16
  for (i = 0; i<10; i++)
17
    {
18
      test (0,0,parm1,parm2,i);
19
    }
20
}
21
void foo (int invariant)
22
{
23
  int i;
24
  for (i = 0; i<10; i++)
25
    {
26
      bar (i, invariant);
27
    }
28
}
29
/* After inlining bar into foo, op2 is invariant within inner loop.  */
30
/* { dg-final { scan-ipa-dump "op2 change 10.000000. of time"  "inline"  } } */
31
/* After inlining bar into foo, op3 is invariant within both loops.  */
32
/* { dg-final { scan-ipa-dump "op3 change 1.000000. of time"  "inline"  } } */
33
/* { dg-final { cleanup-ipa-dump "inline" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.