This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] two-phase marking in gt_cleare_cache
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Mon, 6 Jul 2015 15:25:57 +0200
- Subject: Re: [RFC] two-phase marking in gt_cleare_cache
- Authentication-results: sourceware.org; auth=none
- References: <559A42E9 dot 6000303 at mentor dot com>
On Mon, Jul 6, 2015 at 10:57 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> Hi,
>
> Using attached untested patch, I managed to minimize a test-case failure for
> PR 66714.
>
> The patch introduces two-phase marking in gt_cleare_cache:
> - first phase, it loops over all the hash table entries and removes
> those which are dead
> - second phase, it runs over all the live hash table entries and marks
> live items that are reachable from those live entries
>
> By doing so, we make the behaviour of gt_cleare_cache independent of the
> order in which the entries are visited, turning:
> - hard-to-trigger bugs which trigger for one visiting order but not for
> another, into
> - more easily triggered bugs which trigger for any visiting order.
>
> Any comments?
I think it is only half-way correct in your proposed change. You only
fix the issue for hashes of the same kind. To truly fix the issue you'd
have to change generated code for gt_clear_caches () and provide
a clearing-only implementation (or pass a operation mode bool to
the core worker in hash-table.h).
Thanks,
Richard.
> Thanks,
> - Tom