From 74ee12ff68243bb177fb8653474dff80c3792139 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 5 Jun 2024 15:12:27 -0400 Subject: Move array_bounds warnings into a separate pass. Array bounds checking is currently tied to VRP. This causes issues with using laternate VRP algorithms as well as experimenting with moving the location of the warnings later. This moves it to its own pass and cleans up the vrp_pass object. * gimple-array-bounds.cc (array_bounds_checker::array_bounds_checker): Always use current range_query. (pass_data_array_bounds): New. (pass_array_bounds): New. (make_pass_array_bounds): New. * gimple-array-bounds.h (array_bounds_checker): Adjust prototype. * passes.def (pass_array_bounds): New. Add after VRP1. * timevar.def (TV_TREE_ARRAY_BOUNDS): New timevar. * tree-pass.h (make_pass_array_bounds): Add prototype. * tree-vrp.cc (execute_ranger_vrp): Remove warning param and do not invoke array bounds warning pass. (pass_vrp::pass_vrp): Adjust params. (pass_vrp::close): Adjust parameters. (pass_vrp::warn_array_bounds_p): Remove. (make_pass_vrp): Remove warning param. (make_pass_early_vrp): Remove warning param. (make_pass_fast_vrp): Remove warning param. --- gcc/gimple-array-bounds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/gimple-array-bounds.h') diff --git a/gcc/gimple-array-bounds.h b/gcc/gimple-array-bounds.h index 3e077d0..aa7ca8e 100644 --- a/gcc/gimple-array-bounds.h +++ b/gcc/gimple-array-bounds.h @@ -27,7 +27,7 @@ class array_bounds_checker friend class check_array_bounds_dom_walker; public: - array_bounds_checker (struct function *, range_query *); + array_bounds_checker (struct function *); void check (); private: -- cgit v1.1