aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-05-02 16:04:00 -0700
committerAndrew Pinski <apinski@marvell.com>2023-05-04 04:25:27 -0700
commit78b0eea7802698f51377f77aa98453556854a328 (patch)
tree68de52bf3d6359215b071ff6c5ae394fc7dbd687 /gcc/tree-ssa-phiopt.cc
parent8830e46777407a7d5cd3de353394ffc46f2c785c (diff)
downloadgcc-78b0eea7802698f51377f77aa98453556854a328.zip
gcc-78b0eea7802698f51377f77aa98453556854a328.tar.gz
gcc-78b0eea7802698f51377f77aa98453556854a328.tar.bz2
Move copy_phi_arg_into_existing_phi to common location and use it
While improving replace_phi_edge_with_variable for the diamond formed bb case, I need a way to copy phi entries from one edge to another as I am removing a forwarding bb inbetween. I was pointed out that jump threading code had copy_phi_arg_into_existing_phi which I can use. I also noticed that both gimple_duplicate_sese_tail and remove_forwarder_block have similar code so it makes sense to use that function in those two locations too. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-threadupdate.cc (copy_phi_arg_into_existing_phi): Move to ... * tree-cfg.cc (copy_phi_arg_into_existing_phi): Here and remove static. (gimple_duplicate_sese_tail): Use copy_phi_arg_into_existing_phi instead of an inline version of it. * tree-cfgcleanup.cc (remove_forwarder_block): Likewise. * tree-cfg.h (copy_phi_arg_into_existing_phi): New declaration.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions