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.
This commit is contained in:
Martin Sebor 2021-02-03 10:23:06 -07:00
parent 1f69e63cfc
commit 5c3d388aee

View File

@ -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. */