+2004-11-27 Falk Hueffner <falk@debian.org>
+ Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/18577
+ * unroll.c (unroll_loop): Test both REGNO_LAST_UID and
+ REGNO_LAST_NOTE_UID to decide whether a pseudo is local
+ to the loop.
+
2004-11-27 Alan Modra <amodra@bigpond.net.au>
PR target/12769
if (regno >= min_regno)
{
+ /* While the following 3 lines means that the inequality
+ REGNO_LAST_UID (regno) <= REGNO_LAST_NOTE_UID (regno)
+ is true at the end of the scanning, it may be subsequently
+ invalidated (e.g. in load_mems) so it should not be relied
+ upon. */
REGNO_LAST_NOTE_UID (regno) = INSN_UID (insn);
if (!note_flag)
REGNO_LAST_UID (regno) = INSN_UID (insn);
+
if (REGNO_FIRST_UID (regno) == 0)
REGNO_FIRST_UID (regno) = INSN_UID (insn);
/* If we are called by reg_scan_update() (indicated by min_regno
int first_uid; /* UID of first insn to use (REG n) */
int last_uid; /* UID of last insn to use (REG n) */
int last_note_uid; /* UID of last note to use (REG n) */
+ /* See the comment in reg_scan_mark_refs on
+ the relationship between last_uid and
+ last_note_uid. */
/* fields set by reg_scan & flow_analysis */
int sets; /* # of times (REG n) is set */
for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
&& REGNO_FIRST_LUID (r) >= copy_start_luid
+ /* See the comment in reg_scan_mark_refs on the relationship between
+ last_uid and last_note_uid. */
+ && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
+ && REGNO_LAST_LUID (r) <= copy_end_luid
&& REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop
&& REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
{