This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Scheduler bugfix
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Scheduler bugfix
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Wed, 18 Aug 1999 00:53:37 +0200
Hi
This tinny most probably typo causes haifa to cache unit values that are
out of range and then crash randomly (as well as produce incorrect results)
and also consumed me few hours to figure out whats wrong with my patterns.
It also probably slowed down considerably, because it disabled caching for
almost all patterns except of few of those, where it was wrong.
Same patch apply to sched.c too.
Maybe this can go to 2.95 branch too?
Tue Aug 17 17:47:33 EDT 1999 Jan Hubicka <hubicka@freesoft.cz>
* haifa-sched.c (insn_unit): Fix typo on out of range test.
* sched.c (insn_unit): Likewise.
*** haifa-sched.c.old Sat Aug 7 11:05:15 1999
--- haifa-sched.c Tue Aug 17 17:45:35 1999
*************** insn_unit (insn)
*** 2849,2855 ****
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
! || (~unit & ((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);
--- 2849,2855 ----
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
! || (unit & ~((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);
*** sched.c.old Sat Aug 7 11:05:15 1999
--- sched.c Tue Aug 17 17:45:35 1999
*************** insn_unit (insn)
*** 2849,2855 ****
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
! || (~unit & ((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);
--- 2849,2855 ----
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
! || (unit & ~((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);