tree-optimization/100221 - improve DSE a bit
authorRichard Biener <rguenther@suse.de>
Fri, 20 May 2022 10:24:40 +0000 (12:24 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 24 May 2022 06:20:11 +0000 (08:20 +0200)
commit1adf11822bd48f4d65156b7642514630c08c4d00
treeaa6609c0216133df578f8a3d5b510dd6c0e1192e
parentd918faea1217596877a35c4946500399731fbbd3
tree-optimization/100221 - improve DSE a bit

When facing multiple PHI defs and one feeding the other we can
postpone processing uses of one and thus can proceed.

2022-05-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100221
* tree-ssa-dse.cc (contains_phi_arg): New function.
(dse_classify_store): Postpone PHI defs that feed another PHI in defs.

* gcc.dg/tree-ssa/ssa-dse-44.c: New testcase.
* gcc.dg/tree-ssa/ssa-dse-45.c: Likewise.
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-44.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-45.c [new file with mode: 0644]
gcc/tree-ssa-dse.cc