]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116463 - complex lowering leaves around dead stmts
authorRichard Biener <rguenther@suse.de>
Fri, 23 Aug 2024 11:44:29 +0000 (13:44 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 23 Aug 2024 12:37:27 +0000 (14:37 +0200)
commitde1923f9f4d5344694c22ca883aeb15caf635734
tree60860333f45e74e01768249af3693af209623b03
parenta35dd276cbf6236e08bcf6e56e62c2be41cf6e3c
tree-optimization/116463 - complex lowering leaves around dead stmts

Complex lowering generally replaces existing complex defs with
COMPLEX_EXPRs but those might be dead when it can always refer to
components from the lattice.  This in turn can pessimize followup
transforms like forwprop and reassoc, the following makes sure to
get rid of dead COMPLEX_EXPRs generated by using
simple_dce_from_worklist.

PR tree-optimization/116463
* tree-complex.cc: Include tree-ssa-dce.h.
(dce_worklist): New global.
(update_complex_assignment): Add SSA def to the DCE worklist.
(tree_lower_complex): Perform DCE.
gcc/tree-complex.cc