diff options
author | Richard Biener <rguenther@suse.de> | 2022-08-29 16:16:44 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-08-30 09:32:01 +0200 |
commit | 8a63343a744a8584a9dfcbc3817f66755baafe8a (patch) | |
tree | dedb67cd8b101462d9c4c148b3b5e1cfcaf46cd4 /gcc/value-range.h | |
parent | 4a8f98fa3bef754abedc3ed7a1839b4c8c782730 (diff) | |
download | gcc-8a63343a744a8584a9dfcbc3817f66755baafe8a.zip gcc-8a63343a744a8584a9dfcbc3817f66755baafe8a.tar.gz gcc-8a63343a744a8584a9dfcbc3817f66755baafe8a.tar.bz2 |
tree-optimization/56654 - sort uninit candidates after RPO
The following sorts the immediate uses of a possibly uninitialized
SSA variable after their RPO order so we prefer warning for an
earlier occuring use rather than issueing the diagnostic for the
first uninitialized immediate use.
The sorting will inevitably be imperfect but it also allows us to
optimize the expensive predicate check for the case where there
are multiple uses in the same basic-block which is a nice side-effect.
PR tree-optimization/56654
* tree-ssa-uninit.cc (cand_cmp): New.
(find_uninit_use): First process all PHIs and collect candidate
stmts, then sort those after RPO.
(warn_uninitialized_phi): Pass on bb_to_rpo.
(execute_late_warn_uninitialized): Compute and pass on
reverse lookup of RPO number from basic block index.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions