]> git.ipfire.org Git - thirdparty/gcc.git/commit
path solver: Compute ranges in path in gimple order.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 24 Nov 2021 08:43:36 +0000 (09:43 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 25 Nov 2021 10:51:21 +0000 (11:51 +0100)
commit8acbd7bef6edbf537e3037174907029b530212f6
treeaf3c72a02705b7ba336706efd779b67af58357ce
parent94912212d3d1be0b1c490e9b5f45165ef5f30d8a
path solver: Compute ranges in path in gimple order.

Andrew's patch for this PR103254 papered over some underlying
performance issues in the path solver that I'd like to address.

We are currently solving the SSA's defined in the current block in
bitmap order, which amounts to random order for all purposes.  This is
causing unnecessary recursion in gori.  This patch changes the order
to gimple order, thus solving dependencies before uses.

There is no change in threadable paths with this change.

Tested on x86-64 & ppc64le Linux.

gcc/ChangeLog:

PR tree-optimization/103254
* gimple-range-path.cc (path_range_query::compute_ranges_defined): New
(path_range_query::compute_ranges_in_block): Move to
compute_ranges_defined.
* gimple-range-path.h (compute_ranges_defined): New.
gcc/gimple-range-path.cc
gcc/gimple-range-path.h