]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/tree-ssa-sccvn.h
Change copyright header to refer to version 3 of the GNU General Public License and...
[thirdparty/gcc.git] / gcc / tree-ssa-sccvn.h
CommitLineData
89fb70a3
DB
1/* Tree SCC value numbering
2 Copyright (C) 2007 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin <dberlin@dberlin.org>
4
9dcd6f09
NC
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
89fb70a3
DB
20
21#ifndef TREE_SSA_SCCVN_H
22#define TREE_SSA_SCCVN_H
23
24/* TOP of the VN lattice. */
25extern tree VN_TOP;
26
27typedef struct vn_ssa_aux
28{
29 /* SCC information. */
30 unsigned int dfsnum;
31 bool visited;
32 unsigned int low;
33 bool on_sccstack;
34
35 /* Value number. This may be an SSA name or a constant. */
36 tree valnum;
37 /* Representative expression, if not a direct constant. */
38 tree expr;
39 /* Whether the representative expression contains constants. */
40 bool has_constants;
41 /* Whether the SSA_NAME has been value numbered already. This is
42 only saying whether visit_use has been called on it at least
43 once. It cannot be used to avoid visitation for SSA_NAME's
44 involved in non-singleton SCC's. */
45 bool use_processed;
46} *vn_ssa_aux_t;
47
48/* Return the value numbering info for an SSA_NAME. */
49extern vn_ssa_aux_t VN_INFO (tree);
50extern vn_ssa_aux_t VN_INFO_GET (tree);
51void run_scc_vn (void);
52void free_scc_vn (void);
53void switch_to_PRE_table (void);
54tree vn_binary_op_lookup (tree);
55void vn_binary_op_insert (tree, tree);
56tree vn_unary_op_lookup (tree);
57void vn_unary_op_insert (tree, tree);
58tree vn_reference_lookup (tree, VEC (tree, gc) *);
59void vn_reference_insert (tree, tree, VEC (tree, gc) *);
60VEC (tree, gc) *shared_vuses_from_stmt (tree);
61VEC (tree, gc) *copy_vuses_from_stmt (tree);
62
63
64#endif /* TREE_SSA_SCCVN_H */