Clean up registering of paths in backwards threader.
authorAldy Hernandez <aldyh@redhat.com>
Sun, 5 Sep 2021 07:41:50 +0000 (09:41 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Sun, 5 Sep 2021 09:46:22 +0000 (11:46 +0200)
commitcbeeadff4c041c09a6335105d596019b6d583880
treea49eff0daaa1750081150b70b8d6d364e4846d0c
parentb27416a7a91b7e6b6b018411ac85cad556ff9903
Clean up registering of paths in backwards threader.

All callers to maybe_register_path() call find_taken_edge() beforehand
and pass the edge as an argument.  There's no reason to repeat this
at each call site.

This is a clean-up in preparation for some other enhancements to the
backwards threader.

Tested on x86-64 Linux.

gcc/ChangeLog:

* tree-ssa-threadbackward.c (back_threader::maybe_register_path):
Remove argument and call find_taken_edge.
(back_threader::resolve_phi): Do not calculate taken edge before
calling maybe_register_path.
(back_threader::find_paths_to_names): Same.
gcc/tree-ssa-threadbackward.c