Re: [PATCH 1/4] sched-deps: clear dependency caches before freeing them

Jeffrey Law <[email protected]> Mon, 3 Aug 2026 21:58:55 -0600
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>

On 7/30/2026 9:28 AM, [email protected] wrote:
> From: Kyrylo Tkachov <[email protected]>
>
> sched_deps_finish resets cache_size before it uses cache_size to clear the
> dependency cache bitmaps.  The cleanup loop therefore has zero iterations.
> The cache arrays are freed, but their bitmap elements are not returned to
> the bitmap obstack.
>
> Move the reset after the cleanup loop.
>
> Bootstrapped and tested on aarch64-none-linux-gnu and x86_64-linux.
>
> gcc/ChangeLog:
>
> 	* sched-deps.cc (sched_deps_finish): Reset cache_size after clearing
> 	and freeing the dependency caches.
>
> Signed-off-by: Kyrylo Tkachov <[email protected]>
OK
jeff