+Thu Oct 1 19:58:30 1998 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
+
+ * regmove.c (regmove_optimize): Add variable old_max_uid.
+ At the end of the function, update basic_block_end.
+
Thu Oct 1 17:58:25 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* dwarf2out.c (expand_builtin_dwarf_reg_size): Use
int nregs;
FILE *regmove_dump_file;
{
+ int old_max_uid = get_max_uid ();
rtx insn;
struct match match;
int pass;
regno_src_regno = (int *)alloca (sizeof *regno_src_regno * nregs);
for (i = nregs; --i >= 0; ) regno_src_regno[i] = -1;
- regmove_bb_head = (int *)alloca (sizeof (int) * (get_max_uid () + 1));
- for (i = get_max_uid (); i >= 0; i--) regmove_bb_head[i] = -1;
+ regmove_bb_head = (int *)alloca (sizeof (int) * (old_max_uid + 1));
+ for (i = old_max_uid; i >= 0; i--) regmove_bb_head[i] = -1;
for (i = 0; i < n_basic_blocks; i++)
regmove_bb_head[INSN_UID (basic_block_head[i])] = i;
}
}
#endif /* REGISTER_CONSTRAINTS */
+
+ /* In fixup_match_1, some insns may have been inserted after basic block
+ ends. Fix that here. */
+ for (i = 0; i < n_basic_blocks; i++)
+ {
+ rtx end = basic_block_end[i];
+ rtx new = end;
+ rtx next = NEXT_INSN (new);
+ while (next != 0 && INSN_UID (next) >= old_max_uid
+ && (i == n_basic_blocks - 1 || basic_block_head[i + 1] != next))
+ new = next, next = NEXT_INSN (new);
+ basic_block_end[i] = new;
+ }
}
/* Returns the INSN_CODE for INSN if its pattern has matching constraints for