diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 700cbb4683b..09d6e0cdd8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-06-12 Richard Earnshaw + + * flow.c (mark_used_regs): Revert last change. + (life_analysis): Remove PROP_AUTOINC if running after reload. + (propagate_one_insn): PROP_AUTOINC is always off after reload. + 2000-06-11 Richard Earnshaw * flow.c (mark_used_regs): Don't call find_auto_inc after reload diff --git a/gcc/flow.c b/gcc/flow.c index d9592cfe895..0b6e78fecbf 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -2606,9 +2606,13 @@ life_analysis (f, file, flags) Otherwise offsets and such may be incorrect. Reload will make some registers as live even though they do not - appear in the rtl. */ + appear in the rtl. + + We don't want to create new auto-incs after reload, since they + are unlikely to be useful and can cause problems with shared + stack slots. */ if (reload_completed) - flags &= ~PROP_REG_INFO; + flags &= ~(PROP_REG_INFO | PROP_AUTOINC); /* We want alias analysis information for local dead store elimination. */ if (flags & PROP_SCAN_DEAD_CODE) @@ -3466,8 +3470,7 @@ propagate_one_insn (pbi, insn) register rtx x = single_set (insn); /* Does this instruction increment or decrement a register? */ - if (!reload_completed - && (flags & PROP_AUTOINC) + if ((flags & PROP_AUTOINC) && x != 0 && GET_CODE (SET_DEST (x)) == REG && (GET_CODE (SET_SRC (x)) == PLUS @@ -5254,7 +5257,7 @@ mark_used_regs (pbi, x, cond, insn) } #ifdef AUTO_INC_DEC - if (! reload_completed && (flags & PROP_AUTOINC)) + if (flags & PROP_AUTOINC) find_auto_inc (pbi, x, insn); #endif break; @@ -5287,7 +5290,7 @@ mark_used_regs (pbi, x, cond, insn) if (GET_CODE (testreg) == MEM) { #ifdef AUTO_INC_DEC - if (! reload_completed && (flags & PROP_AUTOINC)) + if (flags & PROP_AUTOINC) find_auto_inc (pbi, testreg, insn); #endif mark_used_regs (pbi, XEXP (testreg, 0), cond, insn);