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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20090917-1.c] - Blame information for rev 299

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

Line No. Rev Author Line
1 297 jeremybenn
typedef int *loop_p;
2
typedef struct VEC_loop_p_base
3
{
4
  unsigned num;
5
  loop_p vec[1];
6
}
7
VEC_loop_p_base;
8
 
9
__inline__ int
10
VEC_loop_p_base_iterate (const VEC_loop_p_base * vec_, unsigned ix_,
11
                         loop_p * ptr)
12
{
13
  if (vec_ && ix_ < vec_->num)
14
    {
15
      *ptr = vec_->vec[ix_];
16
      return 1;
17
    }
18
  else
19
    {
20
      return 0;
21
    }
22
}
23
 
24
typedef struct VEC_loop_p_heap
25
{
26
  VEC_loop_p_base base;
27
}
28
VEC_loop_p_heap;
29
 
30
 
31
static __inline__ int
32
am_vector_index_for_loop (VEC_loop_p_heap * loop_nest, int loop_num)
33
{
34
  int i;
35
  loop_p l;
36
 
37
  for (i = 0;
38
       VEC_loop_p_base_iterate ((loop_nest) ? &(loop_nest)->base : 0, i,
39
                                &(l)); i++)
40
    if (l == loop_num)
41
      return i;
42
 
43
  __builtin_unreachable ();
44
}
45
 
46
unsigned char
47
build_access_matrix (unsigned max)
48
{
49
  unsigned i;
50
  for (i = 0; i < max; i++)
51
    {
52
      if (am_vector_index_for_loop (foo (), 0))
53
        return 0;
54
    }
55
}

powered by: WebSVN 2.1.0

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