diff options
author | Richard Biener <rguenther@suse.de> | 2024-05-15 18:32:37 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-05-16 11:03:59 +0200 |
commit | 1e0ae1f52741f7e0133661659ed2d210f939a398 (patch) | |
tree | 1d9c2131cd93f4af4375591d338b22aee627b662 /gcc/tree-vectorizer.h | |
parent | bff532827515b23335e315141e37475a142c6932 (diff) | |
download | gcc-1e0ae1f52741f7e0133661659ed2d210f939a398.zip gcc-1e0ae1f52741f7e0133661659ed2d210f939a398.tar.gz gcc-1e0ae1f52741f7e0133661659ed2d210f939a398.tar.bz2 |
tree-optimization/79958 - make DSE track multiple paths
DSE currently gives up when the path we analyze forks. This leads
to multiple missed dead store elimination PRs. The following fixes
this by recursing for each path and maintaining the visited bitmap
to avoid visiting CFG re-merges multiple times. The overall cost
is still limited by the same bound, it's just more likely we'll hit
the limit now. The patch doesn't try to deal with byte tracking
once a path forks but drops info on the floor and only handling
fully dead stores in that case.
PR tree-optimization/79958
PR tree-optimization/109087
PR tree-optimization/100314
PR tree-optimization/114774
* tree-ssa-dse.cc (dse_classify_store): New forwarder.
(dse_classify_store): Add arguments cnt and visited, recurse
to track multiple paths when we end up with multiple defs.
* gcc.dg/tree-ssa/ssa-dse-48.c: New testcase.
* gcc.dg/tree-ssa/ssa-dse-49.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-50.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-51.c: Likewise.
* gcc.dg/graphite/pr80906.c: Avoid DSE of last data reference
in loop.
* g++.dg/ipa/devirt-24.C: Adjust for extra DSE.
* g++.dg/warn/Wuninitialized-pr107919-1.C: Use more important
-O2 optimization level, -O1 regresses.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions