diff options
author | Martin Sebor <msebor@redhat.com> | 2022-02-03 13:58:28 -0700 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2022-02-03 13:58:28 -0700 |
commit | a62b740d7b8bff2d8b5578d01d00e5fe464e5325 (patch) | |
tree | c221ed0d97a1b5db66a48bc80773edab0fb1e602 /gcc/gimple-array-bounds.h | |
parent | 68e9b7b69a1d36ff86c54d52fba034737d9433c3 (diff) | |
download | gcc-a62b740d7b8bff2d8b5578d01d00e5fe464e5325.zip gcc-a62b740d7b8bff2d8b5578d01d00e5fe464e5325.tar.gz gcc-a62b740d7b8bff2d8b5578d01d00e5fe464e5325.tar.bz2 |
Enable pointer_query caching in -Warray-bounds.
gcc/ChangeLog:
* gimple-array-bounds.cc (array_bounds_checker::array_bounds_checker):
Define ctor.
(array_bounds_checker::get_value_range): Use new member.
(array_bounds_checker::check_mem_ref): Same.
* gimple-array-bounds.h (array_bounds_checker::array_bounds_checker):
Outline ctor.
(array_bounds_checker::m_ptr_query): New member.
Diffstat (limited to 'gcc/gimple-array-bounds.h')
-rw-r--r-- | gcc/gimple-array-bounds.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/gimple-array-bounds.h b/gcc/gimple-array-bounds.h index d42146b..eb39927 100644 --- a/gcc/gimple-array-bounds.h +++ b/gcc/gimple-array-bounds.h @@ -20,13 +20,14 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GIMPLE_ARRAY_BOUNDS_H #define GCC_GIMPLE_ARRAY_BOUNDS_H +#include "pointer-query.h" + class array_bounds_checker { friend class check_array_bounds_dom_walker; public: - array_bounds_checker (struct function *fun, range_query *v) - : fun (fun), ranges (v) { } + array_bounds_checker (struct function *, range_query *); void check (); private: @@ -38,8 +39,9 @@ private: /* Current function. */ struct function *fun; - /* Ranger instance. */ - range_query *ranges; + /* A pointer_query object to store information about pointers and + their targets in. */ + pointer_query m_ptr_qry; /* Current statement. */ gimple *m_stmt; }; |