]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/99407 - DSE with data-ref analysis
authorRichard Biener <rguenther@suse.de>
Thu, 22 Sep 2022 07:40:40 +0000 (09:40 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 22 Sep 2022 10:51:52 +0000 (12:51 +0200)
commit4bdf739f835520ccbc433dc9eac461895741f317
tree9b9c4d63e6b02c118ab1e9d17ef97f767cf3b922
parent41c7d2930a75eda3350956b6d9df9e571f9b494d
tree-optimization/99407 - DSE with data-ref analysis

The following resolves the issue that DSE cannot handle references
with variable offsets well when identifying possible uses of a store.
Instead of just relying on ref_maybe_used_by_stmt_p we use data-ref
analysis, making sure to perform that at most once per stmt.  The
new mode is only exercised by the DSE pass before loop optimization
as specified by a new pass parameter and when expensive optimizations
are enabled, so it's disabled below -O2.

PR tree-optimization/99407
* tree-ssa-dse.cc (dse_stmt_to_dr_map): New global.
(dse_classify_store): Use data-ref analysis to disambiguate more uses.
(pass_dse::use_dr_analysis_p): New pass parameter.
(pass_dse::set_pass_param): Implement.
(pass_dse::execute): Allocate and deallocate dse_stmt_to_dr_map.
* passes.def: Allow DR analysis for the DSE pass before loop.

* gcc.dg/vect/tsvc/vect-tsvc-s243.c: Remove XFAIL.
gcc/passes.def
gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s243.c
gcc/tree-ssa-dse.cc
This page took 0.06835 seconds and 6 git commands to generate.