This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals
- From: Martin Jambor <mjambor at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 12 Jan 2016 18:51:31 +0100
- Subject: Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals
- Authentication-results: sourceware.org; auth=none
- References: <20160108145901 dot GD3982 at virgil dot suse dot cz> <CAFiYyc3_T3BOs-n6qVxv-11ZRYT1N+zs79p4azmjhHN2ZpNTug at mail dot gmail dot com> <20160111163847 dot GX18720 at tucnak dot redhat dot com> <20160112173621 dot GF3982 at virgil dot suse dot cz>
On Tue, Jan 12, 2016 at 06:36:21PM +0100, Martin Jambor wrote:
> > remap_decl (old_var, id);
> > }
> > - phase 2 - do the full remap_decls, but during that arrange that
> > remap_decl for non-zero id->remapping_type_depth if (!n) just returns
> > decl
>
> ...they would not be copied here because remap_decl would not be
> duplicating stuff. So I'd end up with an original local decl when I
> actually need a duplicate.
>
ugh, I'm trying to be too fast and obviously forgot about the
id->remapping_type_depth part of the proposed condition.
Still, when could relying solely on id->remapping_type_depth fail?
Sorry for the noise,
Martin