re PR bootstrap/52041 (Bootstrap failure at revision 183650 with --enable-checking=release)

PR bootstrap/52041
	PR bootstrap/52039
	PR target/51974
	* ree.c (add_removable_extension): Change def_map argument
	to unsigned *, store in def_map 1 + offset into *insn_list vector
	instead of pointers into the vector.
	(find_removable_extensions): Adjust caller.

From-SVN: r183751
This commit is contained in:
Jakub Jelinek 2012-01-31 09:41:46 +01:00 committed by Jakub Jelinek
parent a5516da864
commit 68c8a82477
2 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,13 @@
2012-01-31 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/52041
PR bootstrap/52039
PR target/51974
* ree.c (add_removable_extension): Change def_map argument
to unsigned *, store in def_map 1 + offset into *insn_list vector
instead of pointers into the vector.
(find_removable_extensions): Adjust caller.
2012-01-30 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.md: Resolve all AS1 and AS2 macros.

View File

@ -747,10 +747,11 @@ combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state)
static void
add_removable_extension (const_rtx expr, rtx insn,
VEC (ext_cand, heap) **insn_list,
ext_cand **def_map)
unsigned *def_map)
{
enum rtx_code code;
enum machine_mode mode;
unsigned int idx;
rtx src, dest;
/* We are looking for SET (REG N) (ANY_EXTEND (REG N)). */
@ -786,7 +787,8 @@ add_removable_extension (const_rtx expr, rtx insn,
/* Second, make sure the reaching definitions don't feed another and
different extension. FIXME: this obviously can be improved. */
for (def = defs; def; def = def->next)
if ((cand = def_map[INSN_UID(DF_REF_INSN (def->ref))])
if ((idx = def_map[INSN_UID(DF_REF_INSN (def->ref))])
&& (cand = VEC_index (ext_cand, *insn_list, idx - 1))
&& (cand->code != code || cand->mode != mode))
{
if (dump_file)
@ -805,9 +807,10 @@ add_removable_extension (const_rtx expr, rtx insn,
cand->code = code;
cand->mode = mode;
cand->insn = insn;
idx = VEC_length (ext_cand, *insn_list);
for (def = defs; def; def = def->next)
def_map[INSN_UID(DF_REF_INSN (def->ref))] = cand;
def_map[INSN_UID(DF_REF_INSN (def->ref))] = idx;
}
}
@ -820,7 +823,7 @@ find_removable_extensions (void)
VEC (ext_cand, heap) *insn_list = NULL;
basic_block bb;
rtx insn, set;
ext_cand **def_map = XCNEWVEC (ext_cand *, max_insn_uid);
unsigned *def_map = XCNEWVEC (unsigned, max_insn_uid);
FOR_EACH_BB (bb)
FOR_BB_INSNS (bb, insn)