This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Simple bitop reassoc in match.pd
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 May 2016 18:02:47 +0200 (CEST)
- Subject: Re: Simple bitop reassoc in match.pd
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1604302026470 dot 16157 at laptop-mg dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 20 dot 1605021043250 dot 1830 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc0xAovn2-X44Zp4uU432UkF-jUcrrOQYxE-3PV+qiHDxA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 02 dot 1605022320550 dot 23827 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc0yc-Svq0=6Okk8hb9TP2hb6R-PARU8PSFf-ttDKRSwsQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1605031435510 dot 1905 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc3A3jJvGKONB+mmSrpkunQgOv=+GjAQjcEdbyRY-zbhnQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 02 dot 1605061313400 dot 19107 at laptop-mg dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 02 dot 1605100810480 dot 7805 at laptop-mg dot saclay dot inria dot fr> <CAMe9rOqKnemgoVD09do-KxE1gTcJENjZ=E3=8zu==_XkeimZFw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1605111741330 dot 16195 at laptop-mg dot saclay dot inria dot fr> <cad81ded-1af0-4ce9-729e-8806b54346ac at redhat dot com> <alpine dot DEB dot 2 dot 20 dot 1605111920020 dot 16195 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc0G7uLRdYXaB6_bkPCzm=N0WbKF2od_AfwBMM8S6cC7iA at mail dot gmail dot com>
- Reply-to: gcc-patches at gcc dot gnu dot org
On Thu, 12 May 2016, Richard Biener wrote:
Yeah - note that VRP already calls set_range_info before simplifying
stmts. It's just that substitute_and_fold doesn't apply fold_stmt (and
thus match.pd) to all stmts but it only applies the pass specific "fold"
(vrp_fold_stmt) to all stmts.
Just to be sure: is the fact that VRP doesn't apply fold_stmt on purpose?
The restriction makes sense, it is just that it may yield a bit of
duplication. We already indirectly use get_range_info in match.pd and may
miss out on opportunities that only occur in branches during the VRP pass.
--
Marc Glisse