]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make ranger optional in path_range_query.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 11 Nov 2021 17:06:50 +0000 (18:06 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 11 Nov 2021 21:13:17 +0000 (22:13 +0100)
commit53b3edceab96de49034fa8cea79f3b365c63f3e5
tree009961b5e6e7c9c455d4e7d5024809d28c17cfd6
parenta7753db4a7c071fef7a4e7fe2650d6c59cc34066
Make ranger optional in path_range_query.

All users of path_range_query are currently allocating a gimple_ranger
only to pass it to the query object.  It's tidier to just do it from
path_range_query if no ranger was passed.

Tested on x86-64 Linux.

gcc/ChangeLog:

* gimple-range-path.cc (path_range_query::path_range_query): New
ctor without a ranger.
(path_range_query::~path_range_query): Free ranger if necessary.
(path_range_query::range_on_path_entry): Adjust m_ranger for pointer.
(path_range_query::ssa_range_in_phi): Same.
(path_range_query::compute_ranges_in_block): Same.
(path_range_query::compute_imports): Same.
(path_range_query::compute_ranges): Same.
(path_range_query::range_of_stmt): Same.
(path_range_query::compute_outgoing_relations): Same.
* gimple-range-path.h (class path_range_query): New ctor.
* tree-ssa-loop-ch.c (ch_base::copy_headers): Remove gimple_ranger
as path_range_query allocates one.
* tree-ssa-threadbackward.c (class back_threader): Remove m_ranger.
(back_threader::~back_threader): Same.
gcc/gimple-range-path.cc
gcc/gimple-range-path.h
gcc/tree-ssa-loop-ch.c
gcc/tree-ssa-threadbackward.c