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.dg/] [tree-ssa/] [loadpre8.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
3
typedef union tree_node *tree;
4
struct tree_common
5
{
6
  tree chain;
7
}
8
VEC_constructor_elt_base;
9
struct tree_ssa_name
10
{
11
  tree var;
12
};
13
union tree_node
14
{
15
  struct tree_common common;
16
  struct tree_ssa_name ssa_name;
17
};
18
struct edge_def
19
{
20
  struct basic_block_def *dest;
21
};
22
typedef struct edge_def *edge;
23
typedef struct VEC_edge_base
24
{
25
}
26
VEC_edge_base;
27
__attribute__ ((noinline)) static edge
28
VEC_edge_base_index (const VEC_edge_base * vec_, unsigned ix_)
29
{
30
}
31
typedef struct VEC_edge_gc
32
{
33
  VEC_edge_base base;
34
}
35
VEC_edge_gc;
36
struct basic_block_def
37
{
38
  VEC_edge_gc *succs;
39
};
40
typedef struct basic_block_def *basic_block;
41
typedef struct
42
{
43
  unsigned index;
44
  VEC_edge_gc **container;
45
}
46
edge_iterator;
47
__inline__ VEC_edge_gc *
48
ei_container (edge_iterator i)
49
{
50
  return *i.container;
51
}
52
__inline__ edge_iterator
53
ei_start_1 (VEC_edge_gc ** ev)
54
{
55
  edge_iterator i;
56
  i.container = ev;
57
  return i;
58
}
59
__attribute__ ((noinline)) static ei_next (edge_iterator * i)
60
{
61
}
62
static __inline__ edge
63
ei_edge (edge_iterator i)
64
{
65
  return  (edge) (VEC_edge_base_index ((((ei_container (i))) ? &((ei_container (i)))->base : 0), (i.index)));
66
}
67
static __inline__ unsigned char
68
ei_cond (edge_iterator ei, edge * p)
69
{
70
  *p = ei_edge (ei);
71
}
72
typedef tree *def_operand_p;
73
extern tree *get_phi_result_ptr (tree);
74
static __inline__ tree
75
get_def_from_ptr (def_operand_p def)
76
{
77
}
78
__attribute__ ((noinline)) static tree
79
phi_nodes (basic_block bb)
80
{
81
}
82
 
83
/* We can eliminate a load of the SRA'd variable edge_iterator.container */
84
rewrite_add_phi_arguments (basic_block bb)
85
{
86
  edge e;
87
  edge_iterator ei;
88
  for ((ei) = ei_start_1 (&((bb->succs))); ei_cond ((ei), &(e));
89
       ei_next (&(ei)))
90
    {
91
      tree phi;
92
      for (phi = phi_nodes (e->dest); phi; phi = (((phi))->common.chain))
93
          get_reaching_def ((get_def_from_ptr (get_phi_result_ptr (phi)))->ssa_name.var);
94
    }
95
}
96
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */
97
/* { dg-final { cleanup-tree-dump "pre" } } */

powered by: WebSVN 2.1.0

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