]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/gimple-ssa-evrp-analyze.h
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / gimple-ssa-evrp-analyze.h
CommitLineData
74ba745b 1/* Support routines for Value Range Propagation (VRP).
99dee823 2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
74ba745b
JL
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#ifndef GCC_GIMPLE_SSA_EVRP_ANALYZE_H
21#define GCC_GIMPLE_SSA_EVRP_ANALYZE_H
22
a889e06a 23class evrp_range_analyzer : public vr_values
74ba745b
JL
24{
25 public:
c844c402 26 evrp_range_analyzer (bool update_global_ranges);
a5de02e9
JL
27 ~evrp_range_analyzer (void)
28 {
a5de02e9
JL
29 stack.release ();
30 }
74ba745b
JL
31
32 void enter (basic_block);
df80fc53
JL
33 void push_marker (void);
34 void pop_to_marker (void);
74ba745b 35 void leave (basic_block);
df80fc53 36 void record_ranges_from_stmt (gimple *, bool);
74ba745b 37
df80fc53 38 /* Record a new unwindable range. */
028d81b1 39 void push_value_range (tree var, value_range_equiv *vr);
df80fc53 40
74ba745b
JL
41 private:
42 DISABLE_COPY_AND_ASSIGN (evrp_range_analyzer);
a5de02e9 43
f86c2e71 44 void pop_value_range ();
028d81b1
AH
45 value_range_equiv *try_find_new_range (tree, tree op, tree_code code,
46 tree limit);
74ba745b
JL
47 void record_ranges_from_incoming_edge (basic_block);
48 void record_ranges_from_phis (basic_block);
028d81b1 49 void set_ssa_range_info (tree, value_range_equiv *);
74ba745b
JL
50
51 /* STACK holds the old VR. */
028d81b1 52 auto_vec<std::pair <tree, value_range_equiv *> > stack;
c844c402
JL
53
54 /* True if we are updating global ranges, false otherwise. */
55 bool m_update_global_ranges;
74ba745b
JL
56};
57
58#endif /* GCC_GIMPLE_SSA_EVRP_ANALYZE_H */