Mercurial > hg > CbC > CbC_gcc
annotate gcc/tree-ssa-propagate.h @ 88:f214c1d5b862
merge 89
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 20 Dec 2011 18:53:46 +0900 |
parents | f6334be47118 |
children | 04ced10e8804 |
rev | line source |
---|---|
0 | 1 /* Data structures and function declarations for the SSA value propagation |
2 engine. | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
3 Copyright (C) 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. |
0 | 4 Contributed by Diego Novillo <dnovillo@redhat.com> |
5 | |
6 This file is part of GCC. | |
7 | |
8 GCC is free software; you can redistribute it and/or modify | |
9 it under the terms of the GNU General Public License as published by | |
10 the Free Software Foundation; either version 3, or (at your option) | |
11 any later version. | |
12 | |
13 GCC is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with GCC; see the file COPYING3. If not see | |
20 <http://www.gnu.org/licenses/>. */ | |
21 | |
22 #ifndef _TREE_SSA_PROPAGATE_H | |
23 #define _TREE_SSA_PROPAGATE_H 1 | |
24 | |
25 /* If SIM_P is true, statement S will be simulated again. */ | |
26 | |
27 static inline void | |
28 prop_set_simulate_again (gimple s, bool visit_p) | |
29 { | |
30 gimple_set_visited (s, visit_p); | |
31 } | |
32 | |
33 /* Return true if statement T should be simulated again. */ | |
34 | |
35 static inline bool | |
36 prop_simulate_again_p (gimple s) | |
37 { | |
38 return gimple_visited_p (s); | |
39 } | |
40 | |
41 /* Lattice values used for propagation purposes. Specific instances | |
42 of a propagation engine must return these values from the statement | |
43 and PHI visit functions to direct the engine. */ | |
44 enum ssa_prop_result { | |
45 /* The statement produces nothing of interest. No edges will be | |
46 added to the work lists. */ | |
47 SSA_PROP_NOT_INTERESTING, | |
48 | |
49 /* The statement produces an interesting value. The set SSA_NAMEs | |
50 returned by SSA_PROP_VISIT_STMT should be added to | |
51 INTERESTING_SSA_EDGES. If the statement being visited is a | |
52 conditional jump, SSA_PROP_VISIT_STMT should indicate which edge | |
53 out of the basic block should be marked executable. */ | |
54 SSA_PROP_INTERESTING, | |
55 | |
56 /* The statement produces a varying (i.e., useless) value and | |
57 should not be simulated again. If the statement being visited | |
58 is a conditional jump, all the edges coming out of the block | |
59 will be considered executable. */ | |
60 SSA_PROP_VARYING | |
61 }; | |
62 | |
63 | |
64 /* Call-back functions used by the value propagation engine. */ | |
65 typedef enum ssa_prop_result (*ssa_prop_visit_stmt_fn) (gimple, edge *, tree *); | |
66 typedef enum ssa_prop_result (*ssa_prop_visit_phi_fn) (gimple); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
67 typedef bool (*ssa_prop_fold_stmt_fn) (gimple_stmt_iterator *gsi); |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
68 typedef tree (*ssa_prop_get_value_fn) (tree); |
0 | 69 |
70 | |
71 /* In tree-ssa-propagate.c */ | |
72 void ssa_propagate (ssa_prop_visit_stmt_fn, ssa_prop_visit_phi_fn); | |
73 bool valid_gimple_rhs_p (tree); | |
74 void move_ssa_defining_stmt_for_defs (gimple, gimple); | |
75 bool update_call_from_tree (gimple_stmt_iterator *, tree); | |
76 bool stmt_makes_single_store (gimple); | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
77 bool substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn, bool); |
0 | 78 |
79 #endif /* _TREE_SSA_PROPAGATE_H */ |