Revise -mdisable-fpregs option and add new -msoft-mult option
[official-gcc.git] / gcc / gimple-array-bounds.h
blobd8f7ff7a89fc4f04cb73e009b41f3ce0fd05654c
1 /* Array bounds checking.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_GIMPLE_ARRAY_BOUNDS_H
21 #define GCC_GIMPLE_ARRAY_BOUNDS_H
23 class array_bounds_checker
25 friend class check_array_bounds_dom_walker;
27 public:
28 array_bounds_checker (struct function *fun, range_query *v)
29 : fun (fun), ranges (v) { }
30 void check ();
32 private:
33 static tree check_array_bounds (tree *tp, int *walk_subtree, void *data);
34 bool check_array_ref (location_t, tree, gimple *, bool ignore_off_by_one);
35 bool check_mem_ref (location_t, tree, bool ignore_off_by_one);
36 void check_addr_expr (location_t, tree, gimple *);
37 const value_range *get_value_range (const_tree op, gimple *);
39 struct function *fun;
40 range_query *ranges;
43 #endif // GCC_GIMPLE_ARRAY_BOUNDS_H