]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add flow_sensitive_info_storage and use it in gimple-fold.
authorAndrew Pinski <apinski@marvell.com>
Fri, 14 Jul 2023 22:14:59 +0000 (15:14 -0700)
committerAndrew Pinski <apinski@marvell.com>
Wed, 19 Jul 2023 16:17:02 +0000 (09:17 -0700)
commita86d5eca6a11c25da4aff436f53589950641675f
treed7f649c59afcca23e5fe2b6e6c66c2b6a6527586
parentbf20b770d9aabb15faf2644b5e3106249cb175f3
Add flow_sensitive_info_storage and use it in gimple-fold.

This adds flow_sensitive_info_storage and uses it in
maybe_fold_comparisons_from_match_pd as mentioned in
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621817.html .
Since using it in maybe_fold_comparisons_from_match_pd was easy
and allowed me to test the storage earlier, I did it.

This also hides better how the flow sensitive information is
stored and only a single place needs to be updated if that
ever changes (again).

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* gimple-fold.cc (fosa_unwind): Replace `vrange_storage *`
with flow_sensitive_info_storage.
(follow_outer_ssa_edges): Update how to save off the flow
sensitive info.
(maybe_fold_comparisons_from_match_pd): Update restoring
of flow sensitive info.
* tree-ssanames.cc (flow_sensitive_info_storage::save): New method.
(flow_sensitive_info_storage::restore): New method.
(flow_sensitive_info_storage::save_and_clear): New method.
(flow_sensitive_info_storage::clear_storage): New method.
* tree-ssanames.h (class flow_sensitive_info_storage): New class.
gcc/gimple-fold.cc
gcc/tree-ssanames.cc
gcc/tree-ssanames.h