target/4860: [ARM; 3.0] sjlj_mark_call_sites thwarted by load-multi
pb@gcc.gnu.org
pb@gcc.gnu.org
Tue Jan 22 15:07:00 GMT 2002
Old Synopsis: Internal Compiler Error with ARM g++ cross compiler
New Synopsis: [ARM; 3.0] sjlj_mark_call_sites thwarted by load-multi
Responsible-Changed-From-To: unassigned->pb
Responsible-Changed-By: pb
Responsible-Changed-When: Tue Jan 22 15:07:15 2002
Responsible-Changed-Why:
.
State-Changed-From-To: open->analyzed
State-Changed-By: pb
State-Changed-When: Tue Jan 22 15:07:15 2002
State-Changed-Why:
Still occurs with 3.0 branch.
This loop in sjlj_mark_call_sites (about line 2135) is too simple minded:
/* Search backward for the first set of a register in this set. */
while (nparm_regs)
{
before = PREV_INSN (before);
/* Given that we've done no other optimizations yet,
the arguments should be immediately available. */
if (GET_CODE (before) == CODE_LABEL)
abort ();
p = single_set (before);
if (p && GET_CODE (SET_DEST (p)) == REG
&& REGNO (SET_DEST (p)) < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (parm_regs, REGNO (SET_DEST (p))))
{
CLEAR_HARD_REG_BIT (parm_regs, REGNO (SET_DEST (p)));
nparm_regs--;
}
}
What happens in this case is that several of the SETs for argument registers have been wrapped up in a PARALLEL in order to make them come out as an LDM, which stops single_set from seeing them.
This code has already been restructured on the trunk to use note_stores, which avoids the problem. See:
Sun Jul 29 23:26:50 CEST 2001 Jan Hubicka <jh@suse.cz>
* rtlanal.c (parms_set, find_first_parameter_load): Break out from...;
handle multiple sets.
* except.c (sjlj_mark_call_sites): .... here.
* gcse.c (insert_insn_end_bb): Use find_first_parameter_load.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4860
More information about the Gcc-prs
mailing list