[llvm] r210390 - Fix the MachineScheduler's logic for updating ready times for in-order.
WenHan Gu (谷汶翰)
wenhan.gu at gmail.com
Wed Jun 11 23:45:02 PDT 2014
Hi Andrew,
AFAIK, ReadyCycle - CurrCycle is not always >= 0, (I use assert
(ReadyCycle>= CurrCycle) to check)
but these are unsigned types so will be underflow. (Sometimes, I got 2^32-x
on MaxObservedStall)
I suggest maybe we should use signed temp var for this calculation?
Thanks!
> void SchedBoundary::releaseNode(SUnit *SU, unsigned ReadyCycle) {
> + assert(SU->getInstr() && "Scheduled SUnit must have instr");
> +
> +#ifndef NDEBUG
> + MaxObservedStall = std::max(ReadyCycle - CurrCycle, MaxObservedStall);
> +#endif
> +
> if (ReadyCycle < MinReadyCycle)
> MinReadyCycle = ReadyCycle;
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140612/b11f84e0/attachment.html>
More information about the llvm-commits
mailing list