diff options
author | Richard Biener <rguenther@suse.de> | 2021-11-12 10:21:22 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-11-16 11:31:56 +0100 |
commit | 045206450386bcd774db3bde0c696828402361c6 (patch) | |
tree | d699881a02279559fad395114182ea23d53bbb6a /gcc/print-tree.c | |
parent | f98f373dd822b35c52356b753d528924e9f89678 (diff) | |
download | gcc-045206450386bcd774db3bde0c696828402361c6.zip gcc-045206450386bcd774db3bde0c696828402361c6.tar.gz gcc-045206450386bcd774db3bde0c696828402361c6.tar.bz2 |
tree-optimization/102880 - improve CD-DCE
The PR shows a missed control-dependent DCE caused by CFG cleanup
merging a forwarder resulting in a partially degenerate PHI node.
With control-dependent DCE we need to mark control dependences
of incoming edges into PHIs as necessary but that is unnecessarily
conservative for the case when two edges have the same value.
There is no easy way to mark only a subset of control dependences
of both edges necessary so the fix is to produce forwarder blocks
where then the control dependence captures the requirements more
precisely.
For gcc.dg/tree-ssa/ssa-dom-thread-7.c the number of edges in the
CFG decrease as we have commonized PHI arguments which in turn
results in different threadings. The testcase is too complex
and the dump scanning too simple to do anything meaningful here
but to adjust the number of expected threads.
The same CFG massaging could be useful at RTL expansion time to
reduce the number of copies we need to insert on edges.
FAIL: gcc.dg/tree-ssa/ssa-hoist-4.c scan-tree-dump-times optimized "MAX_EXPR" 1
2021-11-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/102880
* tree-ssa-dce.c (sort_phi_args): New function.
(make_forwarders_with_degenerate_phis): Likewise.
(perform_tree_ssa_dce): Call
make_forwarders_with_degenerate_phis.
* gcc.dg/tree-ssa/pr102880.c: New testcase.
* gcc.dg/tree-ssa/pr69270-3.c: Robustify.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Change the number of
expected threadings.
Diffstat (limited to 'gcc/print-tree.c')
0 files changed, 0 insertions, 0 deletions