Simplify maybe_fold_reference API
authorRichard Biener <rguenther@suse.de>
Fri, 16 Apr 2021 09:56:00 +0000 (11:56 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 21 Apr 2021 09:09:49 +0000 (11:09 +0200)
commit0bf8cd9d5e8acf6fd90a14f832bb2d5de97449b3
tree52ac7a7b89f27299c53f57522e39b8aae457277b
parenta61c4964cd71446232d62ec9b10a7d45b440dd9f
Simplify maybe_fold_reference API

This simplifies the maybe_fold_reference API reflecting that it
no longer canonicalizes refs (that's done with another function)
but only performs constant folding and thus does nothing for is_lhs.

This in turn allows to rip out quite some dead code and one user
of valid_gimple_rhs_p.

2021-04-16  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (maybe_fold_reference): Remove is_lhs
parameter (and assume it to be false).
(fold_gimple_assign): Adjust, remove all callers of
maybe_fold_reference calling it with is_lhs true.
(gimple_fold_call): Likewise.
(fold_stmt_1): Likewise.
gcc/gimple-fold.c