This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Flow auto-inc calculations after reload
- To: gcc-patches at gcc dot gnu dot org
- Subject: Flow auto-inc calculations after reload
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Sun, 11 Jun 2000 15:10:32 +0100
- cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
When we run the flow analysis pass after reload, we are doing it primarily
to get the flow graph information correct prior to running if_convert.
Creating new auto-inc instructions is dangerous, since we may be dealing
with a register spilled onto stack. The stack slots for these are shared,
so we would have to unshare such slots before doing this. Since creating
new auto-incs after reload is unlikely to be useful (we've already done
register allocation, so there is unlikely to be anything to be gained from
being able to tie the new insns generated) I think it is better to just
suppress this aspect of the auto-inc code.
This fixes a regression when compiling unsorted/structret.c on a
big-endian arm.
(also bootstrapped on arm-unknown-linux-gnuoldld).
2000-06-11 Richard Earnshaw <rearnsha@arm.com>
* flow.c (mark_used_regs): Don't call find_auto_inc after reload
has run.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.298
diff -p -r1.298 flow.c
*** flow.c 2000/05/31 23:57:00 1.298
--- flow.c 2000/06/11 14:01:08
*************** mark_used_regs (pbi, x, cond, insn)
*** 5254,5260 ****
}
#ifdef AUTO_INC_DEC
! if (flags & PROP_AUTOINC)
find_auto_inc (pbi, x, insn);
#endif
break;
--- 5254,5260 ----
}
#ifdef AUTO_INC_DEC
! if (! reload_completed && (flags & PROP_AUTOINC))
find_auto_inc (pbi, x, insn);
#endif
break;
*************** mark_used_regs (pbi, x, cond, insn)
*** 5287,5293 ****
if (GET_CODE (testreg) == MEM)
{
#ifdef AUTO_INC_DEC
! if (flags & PROP_AUTOINC)
find_auto_inc (pbi, testreg, insn);
#endif
mark_used_regs (pbi, XEXP (testreg, 0), cond, insn);
--- 5287,5293 ----
if (GET_CODE (testreg) == MEM)
{
#ifdef AUTO_INC_DEC
! if (! reload_completed && (flags & PROP_AUTOINC))
find_auto_inc (pbi, testreg, insn);
#endif
mark_used_regs (pbi, XEXP (testreg, 0), cond, insn);