annotate gcc/tree-vrp.h @ 127:4c56639505ff

fix function.c and add CbC-example Makefile
author mir3636
date Wed, 11 Apr 2018 18:46:58 +0900
parents 04ced10e8804
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Support routines for Value Range Propagation (VRP).
kono
parents:
diff changeset
2 Copyright (C) 2016-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
14 GNU General Public License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 #ifndef GCC_TREE_VRP_H
kono
parents:
diff changeset
21 #define GCC_TREE_VRP_H
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* Type of value ranges. See value_range_d In tree-vrp.c for a
kono
parents:
diff changeset
24 description of these types. */
kono
parents:
diff changeset
25 enum value_range_type { VR_UNDEFINED, VR_RANGE,
kono
parents:
diff changeset
26 VR_ANTI_RANGE, VR_VARYING, VR_LAST };
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* Range of values that can be associated with an SSA_NAME after VRP
kono
parents:
diff changeset
29 has executed. */
kono
parents:
diff changeset
30 struct GTY((for_user)) value_range
kono
parents:
diff changeset
31 {
kono
parents:
diff changeset
32 /* Lattice value represented by this range. */
kono
parents:
diff changeset
33 enum value_range_type type;
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 /* Minimum and maximum values represented by this range. These
kono
parents:
diff changeset
36 values should be interpreted as follows:
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 - If TYPE is VR_UNDEFINED or VR_VARYING then MIN and MAX must
kono
parents:
diff changeset
39 be NULL.
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 - If TYPE == VR_RANGE then MIN holds the minimum value and
kono
parents:
diff changeset
42 MAX holds the maximum value of the range [MIN, MAX].
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 - If TYPE == ANTI_RANGE the variable is known to NOT
kono
parents:
diff changeset
45 take any values in the range [MIN, MAX]. */
kono
parents:
diff changeset
46 tree min;
kono
parents:
diff changeset
47 tree max;
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 /* Set of SSA names whose value ranges are equivalent to this one.
kono
parents:
diff changeset
50 This set is only valid when TYPE is VR_RANGE or VR_ANTI_RANGE. */
kono
parents:
diff changeset
51 bitmap equiv;
kono
parents:
diff changeset
52 };
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 extern void vrp_intersect_ranges (value_range *vr0, value_range *vr1);
kono
parents:
diff changeset
55 extern void vrp_meet (value_range *vr0, const value_range *vr1);
kono
parents:
diff changeset
56 extern void dump_value_range (FILE *, const value_range *);
kono
parents:
diff changeset
57 extern void extract_range_from_unary_expr (value_range *vr,
kono
parents:
diff changeset
58 enum tree_code code,
kono
parents:
diff changeset
59 tree type,
kono
parents:
diff changeset
60 value_range *vr0_,
kono
parents:
diff changeset
61 tree op0_type);
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 #endif /* GCC_TREE_VRP_H */