reassoc: Do not bias loop-carried PHIs early
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 14 Sep 2021 18:41:18 +0000 (20:41 +0200)
committerIlya Leoshkevich <iii@linux.ibm.com>
Tue, 28 Sep 2021 12:10:13 +0000 (14:10 +0200)
commit99c106e695bd8f1de580c4ff0b1d3fe59c9a4f1e
tree0d23c96694feb753a909aed32fea3edacc559766
parent3b7041e8345c2f1030e58620f28e22d64b2c196b
reassoc: Do not bias loop-carried PHIs early

Biasing loop-carried PHIs during the 1st reassociation pass interferes
with reduction chains and does not bring measurable benefits, so do it
only during the 2nd reassociation pass.

gcc/ChangeLog:

* passes.def (pass_reassoc): Rename parameter to early_p.
* tree-ssa-reassoc.c (reassoc_bias_loop_carried_phi_ranks_p):
New variable.
(phi_rank): Don't bias loop-carried phi ranks
before vectorization pass.
(execute_reassoc): Add bias_loop_carried_phi_ranks_p parameter.
(pass_reassoc::pass_reassoc): Add bias_loop_carried_phi_ranks_p
initializer.
(pass_reassoc::set_param): Set bias_loop_carried_phi_ranks_p
value.
(pass_reassoc::execute): Pass bias_loop_carried_phi_ranks_p to
execute_reassoc.
(pass_reassoc::bias_loop_carried_phi_ranks_p): New member.
gcc/passes.def
gcc/tree-ssa-reassoc.c