analyzer: fixes to -fdump-analyzer-state-purge for phi nodes
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 21 Jul 2021 21:22:45 +0000 (17:22 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 21 Jul 2021 21:22:45 +0000 (17:22 -0400)
commit6bbad96cd44774bc199b256dbf4260b25b87c7db
tree2b749a05d209844f0f591f3338277db089a27db8
parent81703584769707c34533e78c7a2bc229b0e14b2d
analyzer: fixes to -fdump-analyzer-state-purge for phi nodes

gcc/analyzer/ChangeLog:
* state-purge.cc (state_purge_annotator::add_node_annotations):
Rather than erroneously always using the NULL in-edge, determine
each relevant in-edge, and print the appropriate data for each
in-edge.  Use print_needed to print the data as comma-separated
lists of SSA names.
(print_vec_of_names): Add "within_table" param and use it.
(state_purge_annotator::add_stmt_annotations): Factor out
collation and printing code into...
(state_purge_annotator::print_needed): ...this new function.
* state-purge.h (state_purge_annotator::print_needed): New decl.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/state-purge.cc
gcc/analyzer/state-purge.h