[llvm] r186632 - MI Sched: Update the way resources are tracked so the current heuristics make more sense.
Andrew Trick
atrick at apple.com
Fri Jul 19 10:11:26 PDT 2013
On Jul 19, 2013, at 2:54 AM, Alexey Samsonov <samsonov at google.com> wrote:
> Hi Andrew!
>
> Looks like this triggered an error report on out MSan bootstrap bot. I've tried to fix this in r186658.
Ah yes, I see how that happened. Thanks for fixing it!
-Andy
> On Fri, Jul 19, 2013 at 4:20 AM, Andrew Trick <atrick at apple.com> wrote:
> Author: atrick
> Date: Thu Jul 18 19:20:07 2013
> New Revision: 186632
>
> URL: http://llvm.org/viewvc/llvm-project?rev=186632&view=rev
> Log:
> MI Sched: Update the way resources are tracked so the current heuristics make more sense.
>
> Modified:
> llvm/trunk/lib/CodeGen/MachineScheduler.cpp
>
> Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=186632&r1=186631&r2=186632&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu Jul 18 19:20:07 2013
> @@ -1253,7 +1253,7 @@ public:
> // Count scheduled resources that have been executed. Resources are
> // considered executed if they become ready in the time that it takes to
> // saturate any resource including the one in question. Counts are scaled
> - // for direct comparison with other resources. Counts ca be compared with
> + // for direct comparison with other resources. Counts can be compared with
> // MOps * getMicroOpFactor and Latency * getLatencyFactor.
> SmallVector<unsigned, 16> ExecutedResCounts;
>
> @@ -1658,7 +1658,7 @@ void ConvergingScheduler::SchedBoundary:
> << Rem->CriticalPath << "\n");
> }
> // If the same resource is limiting inside and outside the zone, do nothing.
> - if (IsResourceLimited && OtherResLimited && (ZoneCritResIdx == OtherCritIdx))
> + if (ZoneCritResIdx == OtherCritIdx)
> return;
>
> DEBUG(
> @@ -1760,11 +1760,9 @@ countResource(unsigned PIdx, unsigned Cy
> assert(Rem->RemainingCounts[PIdx] >= Count && "resource double counted");
> Rem->RemainingCounts[PIdx] -= Count;
>
> - // Check if this resource exceeds the current critical resource by a full
> - // cycle. If so, it becomes the critical resource.
> - if (ZoneCritResIdx != PIdx
> - && ((int)(getResourceCount(PIdx) - getCriticalCount())
> - >= (int)SchedModel->getLatencyFactor())) {
> + // Check if this resource exceeds the current critical resource. If so, it
> + // becomes the critical resource.
> + if (ZoneCritResIdx != PIdx && (getResourceCount(PIdx) > getCriticalCount())) {
> ZoneCritResIdx = PIdx;
> DEBUG(dbgs() << " *** Critical resource "
> << getResourceName(PIdx) << ": "
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> --
> Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130719/5edaf89b/attachment.html>
More information about the llvm-commits
mailing list