re PR bootstrap/52172 (stage 3 Bootstrap comparison failure on FreeBSD ia64)

PR bootstrap/52172
	* cselib.h (cselib_subst_to_values_from_insn): New prototype.
	* cselib.c (cselib_subst_to_values_from_insn): New function.
	* sched-deps.c (add_insn_mem_dependence,
	sched_analyze_1, sched_analyze_2): Use it.

From-SVN: r184181
This commit is contained in:
Jakub Jelinek 2012-02-14 00:31:48 +01:00 committed by Jakub Jelinek
parent 993716bdca
commit 9a76e83d80
4 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2012-02-13 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/52172
* cselib.h (cselib_subst_to_values_from_insn): New prototype.
* cselib.c (cselib_subst_to_values_from_insn): New function.
* sched-deps.c (add_insn_mem_dependence,
sched_analyze_1, sched_analyze_2): Use it.
2012-02-13 Jan Hubicka <jh@suse.cz>
PR middle-end/52214

View File

@ -1905,6 +1905,19 @@ cselib_subst_to_values (rtx x, enum machine_mode memmode)
return copy;
}
/* Wrapper for cselib_subst_to_values, that indicates X is in INSN. */
rtx
cselib_subst_to_values_from_insn (rtx x, enum machine_mode memmode, rtx insn)
{
rtx ret;
gcc_assert (!cselib_current_insn);
cselib_current_insn = insn;
ret = cselib_subst_to_values (x, memmode);
cselib_current_insn = NULL;
return ret;
}
/* Look up the rtl expression X in our tables and return the value it
has. If CREATE is zero, we return NULL if we don't know the value.
Otherwise, we create a new one if possible, using mode MODE if X

View File

@ -1,6 +1,6 @@
/* Common subexpression elimination for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1998, 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@ -88,6 +88,7 @@ extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int,
extern bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int,
cselib_expand_callback, void *);
extern rtx cselib_subst_to_values (rtx, enum machine_mode);
extern rtx cselib_subst_to_values_from_insn (rtx, enum machine_mode, rtx);
extern void cselib_invalidate_rtx (rtx);
extern void cselib_reset_table (unsigned int);

View File

@ -1728,7 +1728,8 @@ add_insn_mem_dependence (struct deps_desc *deps, bool read_p,
if (sched_deps_info->use_cselib)
{
mem = shallow_copy_rtx (mem);
XEXP (mem, 0) = cselib_subst_to_values (XEXP (mem, 0), GET_MODE (mem));
XEXP (mem, 0) = cselib_subst_to_values_from_insn (XEXP (mem, 0),
GET_MODE (mem), insn);
}
link = alloc_EXPR_LIST (VOIDmode, canon_rtx (mem), *mem_list);
*mem_list = link;
@ -2449,7 +2450,9 @@ sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn)
t = shallow_copy_rtx (dest);
cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
GET_MODE (t), insn);
XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0), GET_MODE (t));
XEXP (t, 0)
= cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
insn);
}
t = canon_rtx (t);
@ -2609,7 +2612,9 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
t = shallow_copy_rtx (t);
cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
GET_MODE (t), insn);
XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0), GET_MODE (t));
XEXP (t, 0)
= cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
insn);
}
if (!DEBUG_INSN_P (insn))