On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote:
> This patch adds classes for tracking what state can be safely purged
> at any given point in the program.
>
> gcc/ChangeLog:
> * analyzer/state-purge.cc: New file.
> * analyzer/state-purge.h: New file.
> ---
> gcc/analyzer/state-purge.cc | 516
> ++++++++++++++++++++++++++++++++++++++++++++
> gcc/analyzer/state-purge.h | 170 +++++++++++++++
> 2 files changed, 686 insertions(+)
> create mode 100644 gcc/analyzer/state-purge.cc
> create mode 100644 gcc/analyzer/state-purge.h
> +
> +/* state_purge_map's ctor. Walk all SSA names in all functions,
> building
> + a state_purge_per_ssa_name instance for each. */
> +
> +state_purge_map::state_purge_map (const supergraph &sg,
> + logger *logger)
> +: log_user (logger), m_sg (sg)
> +{
> + LOG_FUNC (logger);
> +
> + auto_client_timevar tv ("state_purge_map ctor");
> +
> + cgraph_node *node;
> + FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node)
> + {
> + function *fun = node->get_fun ();
> + if (logger)
> + log ("function: %s", function_name (fun));
> + //printf ("function: %s\n", function_name (fun));
Debugging leftover. Kill it.
Otherwise it seems pretty reasonable.
jeff