This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] PR66714 -- Re: Re: [RFC] two-phase marking in gt_cleare_cache
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cesar Philippidis <cesar_philippidis at mentor dot com>
- Cc: Michael Matz <matz at suse dot de>, Tom de Vries <Tom_deVries at mentor dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Thu, 23 Jul 2015 17:32:41 +0200
- Subject: Re: [patch] PR66714 -- Re: Re: [RFC] two-phase marking in gt_cleare_cache
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 20 dot 1507131504490 dot 23227 at wotan dot suse dot de> <55B10652 dot 8050304 at mentor dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jul 23, 2015 at 08:20:50AM -0700, Cesar Philippidis wrote:
> The attached patch does just that; it teaches
> replace_block_vars_by_duplicates to replace the decls inside the
> value-exprs with a duplicate too. It's kind of messy though. At the
> moment I'm only considering VAR_DECL, PARM_DECL, RESULT_DECL, ADDR_EXPR,
> ARRAY_REF, COMPONENT_REF, CONVERT_EXPR, NOP_EXPR, INDIRECT_REF and
> MEM_REFs. I suspect that I may be missing some, but these are the only
> ones that were triggered gcc_unreachable during testing.
Ugh, that looks ugly, why do we have all the tree walkers?
I'd unshare_expr the value expr first, you really don't want to share
it anyway, and then just walk_tree and find all the decls in there
(with *walk_subtrees on types and perhaps something else too) and for them
replace_by_duplicate_decl (tp, vars_map, to_context);
Jakub