This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
flow.c:mark_set_regs fix checked in
- To: gcc-patches at gcc dot gnu dot org
- Subject: flow.c:mark_set_regs fix checked in
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Mon, 19 Jun 2000 23:38:37 +0100 (BST)
- CC: amylaar at pasanda dot cygnus dot co dot uk
When there was an auto-increment generated by regmove with a
REG_UNUSED note, flow would change it to REG_DEAD during sched1
and cause a scheduler abort because of an increase in the number
of REG_DEAD notes. Flow used to be the first pass that created
auto-increment, and hence was not written to expect auto-increment
in its input.
Reviewed by Richard Henderson.
Mon Jun 19 23:26:40 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* Take REG_INC notes into account.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.302
diff -p -r1.302 flow.c
*** flow.c 2000/06/13 22:23:49 1.302
--- flow.c 2000/06/19 22:27:22
*************** mark_set_regs (pbi, x, insn)
*** 4152,4159 ****
--- 4152,4169 ----
rtx x, insn;
{
rtx cond = NULL_RTX;
+ rtx link;
enum rtx_code code;
+ if (insn)
+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
+ {
+ if (REG_NOTE_KIND (link) == REG_INC)
+ mark_set_1 (pbi, SET, XEXP (link, 0),
+ (GET_CODE (x) == COND_EXEC
+ ? COND_EXEC_TEST (x) : NULL_RTX),
+ insn, pbi->flags);
+ }
retry:
switch (code = GET_CODE (x))
{