This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use cselib_lookup_from_insn in vt_init_cfa_base
- From: Richard Guenther <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Mar 2010 17:08:02 +0200 (CEST)
- Subject: Re: [PATCH] Use cselib_lookup_from_insn in vt_init_cfa_base
- References: <20100331150944.GT2817@tyan-ft48-01.lab.bos.redhat.com>
On Wed, 31 Mar 2010, Jakub Jelinek wrote:
> Hi!
>
> The new function allows us to get rid of an ugly hack.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
Ok.
Thanks,
Richard.
> 2010-03-31 Jakub Jelinek <jakub@redhat.com>
>
> * var-tracking.c (vt_init_cfa_base): Use cselib_lookup_from_insn
> instead of cselib_lookup following by tweaking locs->setting_insn.
>
> --- gcc/var-tracking.c.jj 2010-03-30 22:24:21.000000000 +0200
> +++ gcc/var-tracking.c 2010-03-31 10:54:25.000000000 +0200
> @@ -8101,10 +8101,10 @@ vt_init_cfa_base (void)
> if (!MAY_HAVE_DEBUG_INSNS)
> return;
>
> - val = cselib_lookup (cfa_base_rtx, GET_MODE (cfa_base_rtx), 1);
> + val = cselib_lookup_from_insn (cfa_base_rtx, GET_MODE (cfa_base_rtx), 1,
> + get_insns ());
> preserve_value (val);
> cselib_preserve_cfa_base_value (val);
> - val->locs->setting_insn = get_insns ();
> var_reg_decl_set (&VTI (ENTRY_BLOCK_PTR)->out, cfa_base_rtx,
> VAR_INIT_STATUS_INITIALIZED, dv_from_value (val->val_rtx),
> 0, NULL_RTX, INSERT);
>
> Jakub
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex