This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/5] Downgrade value_expr_for_decl to non-cache
- From: Michael Matz <matz at suse dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Tom de Vries <Tom_deVries at mentor dot com>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Wed, 15 Jul 2015 17:12:15 +0200 (CEST)
- Subject: Re: [PATCH 4/5] Downgrade value_expr_for_decl to non-cache
- Authentication-results: sourceware.org; auth=none
- References: <55A28B9E dot 1030706 at mentor dot com> <55A28D67 dot 7010001 at mentor dot com> <CAFiYyc2tdcbsdK+OTfBZ9tu1SjeiCfAoB-8F8pMEncZemcobyQ at mail dot gmail dot com> <CAFiYyc15rJ5D0Np=_rWOxW1ywUHvAtf9Vaa88P7gH21BscMP_A at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1507151611250 dot 23227 at wotan dot suse dot de> <20150715141732 dot GV1788 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1507151621350 dot 23227 at wotan dot suse dot de> <20150715143240 dot GW1788 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1507151640530 dot 23227 at wotan dot suse dot de> <alpine dot LSU dot 2 dot 20 dot 1507151650030 dot 23227 at wotan dot suse dot de> <36955EF3-F642-48EF-AE27-BD7DBE1345C1 at gmail dot com>
Hi,
On Wed, 15 Jul 2015, Richard Biener wrote:
> >Or, maybe we're talking past each other. You mean the case where
> >complicated-expr-on-Y is the value-expr, and Y is _no_ stale decl, but
> >the complicated expr itself nevertheless is mentioned nowhere else?
> >Yes, those trees must be retained, I was only talking about the
> >stale-decl cases.
>
> Yes. And that's the case where we still want to collect the decl if it
> is not mentioned anywhere else. Thus use a cache map. But then we'll
> ICE on the new sanity check.
Like Jakubs mentioned, that can (and probably should) better be fixed by
walking DECL_VALUE_EXPR from the decl walker, as if it were a normal
member (likewise for the other maps, if necessary). It's not necessary to
fiddle with the hash-table markers itself.
Ciao,
Michael.