flow.c:verify_local_live_at_start patch (Was: 1 GCC regressions, 1 new, with your patch on 2000-11-02T22:05:00Z)
Joern Rennecke
amylaar@redhat.com
Fri Nov 3 12:56:00 GMT 2000
All right, so how about this patch:
Fri Nov 3 20:51:51 2000 J"orn Rennecke <amylaar@redhat.com>
* flow.c (verify_local_live_at_start): Back out last change.
* combine.c (distribute_notes): When parts of a hard reg are
neither set nor referenced in PLACE, search backwards for a
place to put a REG_UNUSED note; if none found, ask for flow
info refresh.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.346
diff -p -r1.346 flow.c
*** flow.c 2000/11/03 05:43:09 1.346
--- flow.c 2000/11/03 20:51:46
*************** verify_local_live_at_start (new_live_at_
*** 2888,2911 ****
EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i,
{
! /* No pseudo registers should die. */
if (REGNO_REG_SET_P (bb->global_live_at_start, i))
! {
! /* But hard regs can reasonably die, e.g. when we combine
! (insn 6 30 7 (set (reg/v:DI 83)
! (reg:DI 5 r5)) (nil)
! (expr_list:REG_DEAD (reg:DI 5 r5) (nil)))
! ... and ...
! (insn 17 15 18 (set (reg:SI 5 r5)
! (subreg:SI (reg/v:DI 83) 1)) (insn_list 6 (nil))
! (expr_list:REG_DEAD (reg/v:DI 83) (nil))) . */
!
! if (i >= FIRST_PSEUDO_REGISTER)
! abort ();
! }
! else
! /* Verify that the now-live register is wider than word_mode. */
! verify_wide_reg (i, bb->head, bb->end);
});
}
}
--- 2888,2898 ----
EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i,
{
! /* No registers should die. */
if (REGNO_REG_SET_P (bb->global_live_at_start, i))
! abort ();
! /* Verify that the now-live register is wider than word_mode. */
! verify_wide_reg (i, bb->head, bb->end);
});
}
}
Index: combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.160
diff -p -r1.160 combine.c
*** combine.c 2000/11/02 22:02:21 1.160
--- combine.c 2000/11/03 20:51:50
*************** distribute_notes (notes, from_insn, i3,
*** 12499,12504 ****
--- 12499,12505 ----
i += HARD_REGNO_NREGS (i, reg_raw_mode[i]))
{
rtx piece = gen_rtx_REG (reg_raw_mode[i], i);
+ basic_block bb = BASIC_BLOCK (this_basic_block);
if (! dead_or_set_p (place, piece)
&& ! reg_bitfield_target_p (piece,
*************** distribute_notes (notes, from_insn, i3,
*** 12510,12515 ****
--- 12511,12544 ----
distribute_notes (new_note, place, place,
NULL_RTX, NULL_RTX, NULL_RTX);
}
+ else if (! refers_to_regno_p (i, i + 1,
+ PATTERN (place), 0)
+ && ! find_regno_fusage (place, USE, i))
+ for (tem = PREV_INSN (place); ;
+ tem = PREV_INSN (tem))
+ {
+ if (! INSN_P (tem))
+ {
+ if (tem == bb->head)
+ {
+ SET_BIT (refresh_blocks,
+ this_basic_block);
+ need_refresh = 1;
+ break;
+ }
+ continue;
+ }
+ if (dead_or_set_p (tem, piece)
+ || reg_bitfield_target_p (piece,
+ PATTERN (tem)))
+ {
+ REG_NOTES (tem)
+ = gen_rtx_EXPR_LIST (REG_DEAD, piece,
+ REG_NOTES (tem));
+ break;
+ }
+ }
+
}
place = 0;
More information about the Gcc-regression
mailing list