This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Use cselib_lookup_from_insn in vt_init_cfa_base
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Mar 2010 17:09:44 +0200
- Subject: [PATCH] Use cselib_lookup_from_insn in vt_init_cfa_base
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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?
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