Commit 13e3ba14 by David Malcolm

analyzer: remove unused private fields

gcc/analyzer/ChangeLog:
	* engine.cc (worklist::worklist): Remove unused field m_eg.
	(class viz_callgraph_edge): Remove unused field m_call_sedge.
	(class viz_callgraph): Remove unused field m_sg.
	* exploded-graph.h (worklist::::m_eg): Remove unused field.
parent 94f7d7ec
2020-03-04 David Malcolm <dmalcolm@redhat.com>
* engine.cc (worklist::worklist): Remove unused field m_eg.
(class viz_callgraph_edge): Remove unused field m_call_sedge.
(class viz_callgraph): Remove unused field m_sg.
* exploded-graph.h (worklist::::m_eg): Remove unused field.
2020-03-02 David Malcolm <dmalcolm@redhat.com> 2020-03-02 David Malcolm <dmalcolm@redhat.com>
* analyzer.opt (fanalyzer-show-duplicate-count): New option. * analyzer.opt (fanalyzer-show-duplicate-count): New option.
......
...@@ -1654,8 +1654,7 @@ strongly_connected_components::strong_connect (unsigned index) ...@@ -1654,8 +1654,7 @@ strongly_connected_components::strong_connect (unsigned index)
/* worklist's ctor. */ /* worklist's ctor. */
worklist::worklist (const exploded_graph &eg, const analysis_plan &plan) worklist::worklist (const exploded_graph &eg, const analysis_plan &plan)
: m_eg (eg), : m_scc (eg.get_supergraph (), eg.get_logger ()),
m_scc (eg.get_supergraph (), eg.get_logger ()),
m_plan (plan), m_plan (plan),
m_queue (key_t (*this, NULL)) m_queue (key_t (*this, NULL))
{ {
...@@ -3602,10 +3601,8 @@ private: ...@@ -3602,10 +3601,8 @@ private:
class viz_callgraph_edge : public dedge<viz_callgraph_traits> class viz_callgraph_edge : public dedge<viz_callgraph_traits>
{ {
public: public:
viz_callgraph_edge (viz_callgraph_node *src, viz_callgraph_node *dest, viz_callgraph_edge (viz_callgraph_node *src, viz_callgraph_node *dest)
const call_superedge *call_sedge) : dedge<viz_callgraph_traits> (src, dest)
: dedge<viz_callgraph_traits> (src, dest),
m_call_sedge (call_sedge)
{} {}
void dump_dot (graphviz_out *gv, const dump_args_t &) const void dump_dot (graphviz_out *gv, const dump_args_t &) const
...@@ -3627,9 +3624,6 @@ public: ...@@ -3627,9 +3624,6 @@ public:
style, color, weight, constraint); style, color, weight, constraint);
pp_printf (pp, "\"];\n"); pp_printf (pp, "\"];\n");
} }
private:
const call_superedge * const m_call_sedge;
}; };
/* Subclass of digraph representing the callgraph. */ /* Subclass of digraph representing the callgraph. */
...@@ -3650,7 +3644,6 @@ public: ...@@ -3650,7 +3644,6 @@ public:
} }
private: private:
const supergraph &m_sg;
hash_map<function *, viz_callgraph_node *> m_map; hash_map<function *, viz_callgraph_node *> m_map;
}; };
...@@ -3663,7 +3656,6 @@ class viz_callgraph_cluster : public cluster<viz_callgraph_traits> ...@@ -3663,7 +3656,6 @@ class viz_callgraph_cluster : public cluster<viz_callgraph_traits>
/* viz_callgraph's ctor. */ /* viz_callgraph's ctor. */
viz_callgraph::viz_callgraph (const supergraph &sg) viz_callgraph::viz_callgraph (const supergraph &sg)
: m_sg (sg)
{ {
cgraph_node *node; cgraph_node *node;
FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node) FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node)
...@@ -3682,11 +3674,11 @@ viz_callgraph::viz_callgraph (const supergraph &sg) ...@@ -3682,11 +3674,11 @@ viz_callgraph::viz_callgraph (const supergraph &sg)
viz_callgraph_node *vcg_src = get_vcg_node_for_snode (sedge->m_src); viz_callgraph_node *vcg_src = get_vcg_node_for_snode (sedge->m_src);
if (vcg_src->m_fun) if (vcg_src->m_fun)
get_vcg_node_for_function (vcg_src->m_fun)->m_num_superedges++; get_vcg_node_for_function (vcg_src->m_fun)->m_num_superedges++;
if (const call_superedge *call_sedge = sedge->dyn_cast_call_superedge ()) if (sedge->dyn_cast_call_superedge ())
{ {
viz_callgraph_node *vcg_dest = get_vcg_node_for_snode (sedge->m_dest); viz_callgraph_node *vcg_dest = get_vcg_node_for_snode (sedge->m_dest);
viz_callgraph_edge *vcg_edge viz_callgraph_edge *vcg_edge
= new viz_callgraph_edge (vcg_src, vcg_dest, call_sedge); = new viz_callgraph_edge (vcg_src, vcg_dest);
add_edge (vcg_edge); add_edge (vcg_edge);
} }
} }
......
...@@ -710,7 +710,6 @@ private: ...@@ -710,7 +710,6 @@ private:
/* The order is important here: m_scc needs to stick around /* The order is important here: m_scc needs to stick around
until after m_queue has finished being cleaned up (the dtor until after m_queue has finished being cleaned up (the dtor
calls the ordering fns). */ calls the ordering fns). */
const exploded_graph &m_eg;
strongly_connected_components m_scc; strongly_connected_components m_scc;
const analysis_plan &m_plan; const analysis_plan &m_plan;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment