From: Martin Sebor Date: Wed, 3 Feb 2021 17:23:06 +0000 (-0700) Subject: PR tree-optimization/98937 - pointer_query cache leaks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c3d388aee5609d32bd8e3ba1add776b1a6f0d1f;p=gcc.git PR tree-optimization/98937 - pointer_query cache leaks gcc/ChangeLog: PR tree-optimization/98937 * tree-ssa-strlen.c (strlen_dom_walker::~strlen_dom_walker): Define. Flush pointer_query cache. --- diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index c6f74051607..8912a113de9 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -5491,6 +5491,8 @@ public: m_cleanup_cfg (false) { } + ~strlen_dom_walker (); + virtual edge before_dom_children (basic_block); virtual void after_dom_children (basic_block); @@ -5508,6 +5510,13 @@ public: bool m_cleanup_cfg; }; +/* Release pointer_query cache. */ + +strlen_dom_walker::~strlen_dom_walker () +{ + ptr_qry.flush_cache (); +} + /* Callback for walk_dominator_tree. Attempt to optimize various string ops by remembering string lengths pointed by pointer SSA_NAMEs. */