]> git.ipfire.org Git - thirdparty/gcc.git/commit
path solver: Add related SSAs to solvable set.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 21 Sep 2021 07:21:55 +0000 (09:21 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 21 Sep 2021 16:55:14 +0000 (18:55 +0200)
commite4249b10038bd906f50c00759b37807dd2fffede
tree4e94b6b32e1e053a51f79d5427220ee6141fbd92
parent062c8727df2d9972b73f10445a7585e0129bd63e
path solver: Add related SSAs to solvable set.

The path solver takes an initial set of SSA names which are deemed
interesting.  These are then solved along the path.  Adding any copies
of said SSA names to the list of interesting names yields significantly
better results.  This patch adds said copies to the already provided
list.

Currently this code is guarded by "m_resolve", which is the more
expensive mode, but it would be reasonable to make it available always,
especially since adding more imports usually has minimal impact on the
processing time.  I will investigate and make it universally available
if this is indeed the case.

gcc/ChangeLog:

* gimple-range-path.cc (path_range_query::add_to_imports): New.
(path_range_query::add_copies_to_imports): New.
(path_range_query::precompute_ranges): Call
add_copies_to_imports.
* gimple-range-path.h (class path_range_query): Add prototypes
for add_copies_to_imports and add_to_imports.
gcc/gimple-range-path.cc
gcc/gimple-range-path.h