aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-02-04 09:46:43 +0100
committerRichard Biener <rguenther@suse.de>2022-02-10 10:56:14 +0100
commit0f58ba4dd6b25b16d25494ae18d15dfa681f9b65 (patch)
tree72fb407291d3a50d206b43c977c237a49a41e642 /gcc/function.cc
parent4a8083285c3edf50088a095870b217ab0881dff0 (diff)
downloadgcc-0f58ba4dd6b25b16d25494ae18d15dfa681f9b65.zip
gcc-0f58ba4dd6b25b16d25494ae18d15dfa681f9b65.tar.gz
gcc-0f58ba4dd6b25b16d25494ae18d15dfa681f9b65.tar.bz2
tree-optimization/104373 - early diagnostic on unreachable code
The following improves early uninit diagnostics by computing edge reachability using VN and ignoring unreachable blocks when looking for uninitialized uses. To not ICE with -fdump-tree-all the early uninit pass needs a dumpfile since VN tries to dump statistics. 2022-02-04 Richard Biener <rguenther@suse.de> PR tree-optimization/104373 * tree-ssa-sccvn.h (do_rpo_vn): New export exposing the walk kind. * tree-ssa-sccvn.cc (do_rpo_vn): Export, get the default walk kind as argument. (run_rpo_vn): Adjust. (pass_fre::execute): Likewise. * tree-ssa-uninit.cc (warn_uninitialized_vars): Skip blocks not reachable. (execute_late_warn_uninitialized): Mark all edges as executable. (execute_early_warn_uninitialized): Use VN to compute executable edges. (pass_data_early_warn_uninitialized): Enable a dump file, change dump name to warn_uninit. * g++.dg/warn/Wuninitialized-32.C: New testcase. * gcc.dg/uninit-pr20644-O0.c: Remove XFAIL.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions