]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/tree-vrp.h
Require alias for gcc.dg/pr56727-2.c
[thirdparty/gcc.git] / gcc / tree-vrp.h
CommitLineData
f90aa46c 1/* Support routines for Value Range Propagation (VRP).
cbe34bb5 2 Copyright (C) 2016-2017 Free Software Foundation, Inc.
f90aa46c
KV
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20/* Type of value ranges. See value_range_d In tree-vrp.c for a
21 description of these types. */
22enum value_range_type { VR_UNDEFINED, VR_RANGE,
23 VR_ANTI_RANGE, VR_VARYING, VR_LAST };
24
25/* Range of values that can be associated with an SSA_NAME after VRP
26 has executed. */
86cd0334 27struct GTY((for_user)) value_range
f90aa46c
KV
28{
29 /* Lattice value represented by this range. */
30 enum value_range_type type;
31
32 /* Minimum and maximum values represented by this range. These
33 values should be interpreted as follows:
34
35 - If TYPE is VR_UNDEFINED or VR_VARYING then MIN and MAX must
36 be NULL.
37
38 - If TYPE == VR_RANGE then MIN holds the minimum value and
39 MAX holds the maximum value of the range [MIN, MAX].
40
41 - If TYPE == ANTI_RANGE the variable is known to NOT
42 take any values in the range [MIN, MAX]. */
43 tree min;
44 tree max;
45
46 /* Set of SSA names whose value ranges are equivalent to this one.
47 This set is only valid when TYPE is VR_RANGE or VR_ANTI_RANGE. */
48 bitmap equiv;
49};
50
51extern void vrp_intersect_ranges (value_range *vr0, value_range *vr1);
52extern void vrp_meet (value_range *vr0, const value_range *vr1);
53extern void dump_value_range (FILE *, const value_range *);
3a4228ba
KV
54extern void extract_range_from_unary_expr (value_range *vr,
55 enum tree_code code,
56 tree type,
57 value_range *vr0_,
58 tree op0_type);
f90aa46c 59