Allow match-and-simplified phiopt to run in early phiopt
authorAndrew Pinski <apinski@marvell.com>
Fri, 11 Jun 2021 20:21:34 +0000 (13:21 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 5 Jul 2021 19:44:14 +0000 (12:44 -0700)
commitcd48e550d1dc58307ab1c0ab490745673f748ccc
tree3cc79c19b9c2703ad8557d38a66c53d010fe6e85
parent3c44b412fec8d5ab7fc064065414314a8ae05c87
Allow match-and-simplified phiopt to run in early phiopt

To move a few things more to match-and-simplify from phiopt,
we need to allow match_simplify_replacement to run in early
phiopt. To do this we add a replacement for gimple_simplify
that is explictly for phiopt.

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

gcc/ChangeLog:

* tree-ssa-phiopt.c (match_simplify_replacement):
Add early_p argument. Call gimple_simplify_phiopt
instead of gimple_simplify.
(tree_ssa_phiopt_worker): Update call to
match_simplify_replacement and allow unconditionally.
(phiopt_early_allow): New function.
(gimple_simplify_phiopt): New function.
gcc/tree-ssa-phiopt.c