mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 21:25:06 +08:00
re PR middle-end/37815 (ICE in vt_add_function_parameters (bootstrap error))
PR 37815 * emit-rtl.c (get_spill_slot_decl): Export. * emit-rtl.h (get_spill_slot_decl): Declare. * var-tracking.c (vt_add_function_parameters): Relax assertion on the contents of MEM_EXPR in a PARM_DECL to include a spill slot. From-SVN: r141278
This commit is contained in:
parent
86b9515c41
commit
3d7e23f61d
@ -1,3 +1,11 @@
|
||||
2008-10-21 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR 37815
|
||||
* emit-rtl.c (get_spill_slot_decl): Export.
|
||||
* emit-rtl.h (get_spill_slot_decl): Declare.
|
||||
* var-tracking.c (vt_add_function_parameters): Relax assertion
|
||||
on the contents of MEM_EXPR in a PARM_DECL to include a spill slot.
|
||||
|
||||
2008-10-21 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* var-tracking.c (insn_stack_adjust_offset_pre_post): If insn has a
|
||||
|
@ -2141,13 +2141,13 @@ widen_memory_access (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset)
|
||||
/* A fake decl that is used as the MEM_EXPR of spill slots. */
|
||||
static GTY(()) tree spill_slot_decl;
|
||||
|
||||
static tree
|
||||
get_spill_slot_decl (void)
|
||||
tree
|
||||
get_spill_slot_decl (bool force_build_p)
|
||||
{
|
||||
tree d = spill_slot_decl;
|
||||
rtx rd;
|
||||
|
||||
if (d)
|
||||
if (d || !force_build_p)
|
||||
return d;
|
||||
|
||||
d = build_decl (VAR_DECL, get_identifier ("%sfp"), void_type_node);
|
||||
@ -2179,7 +2179,7 @@ set_mem_attrs_for_spill (rtx mem)
|
||||
rtx addr, offset;
|
||||
tree expr;
|
||||
|
||||
expr = get_spill_slot_decl ();
|
||||
expr = get_spill_slot_decl (true);
|
||||
alias = MEM_ALIAS_SET (DECL_RTL (expr));
|
||||
|
||||
/* We expect the incoming memory to be of the form:
|
||||
|
@ -37,6 +37,7 @@ extern void set_mem_size (rtx, rtx);
|
||||
|
||||
/* Set the attributes for MEM appropriate for a spill slot. */
|
||||
extern void set_mem_attrs_for_spill (rtx);
|
||||
extern tree get_spill_slot_decl (bool);
|
||||
|
||||
/* Return a memory reference like MEMREF, but with its address changed to
|
||||
ADDR. The caller is asserting that the actual piece of memory pointed
|
||||
|
@ -3182,7 +3182,16 @@ vt_add_function_parameters (void)
|
||||
if (!decl)
|
||||
continue;
|
||||
|
||||
gcc_assert (parm == decl);
|
||||
if (parm != decl)
|
||||
{
|
||||
/* Assume that DECL_RTL was a pseudo that got spilled to
|
||||
memory. The spill slot sharing code will force the
|
||||
memory to reference spill_slot_decl (%sfp), so we don't
|
||||
match above. That's ok, the pseudo must have referenced
|
||||
the entire parameter, so just reset OFFSET. */
|
||||
gcc_assert (decl == get_spill_slot_decl (false));
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (!track_loc_p (incoming, parm, offset, false, &mode, &offset))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user