[PATCH] D72125: [NFC] Move InPQueue into normal argument in releaseNode
Qiu Chaofan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 06:16:41 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb2c2fe721972: [NFC] Move InPQueue into arguments of releaseNode (authored by qiucf).
Changed prior to commit:
https://reviews.llvm.org/D72125?vs=235987&id=236807#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72125/new/
https://reviews.llvm.org/D72125
Files:
llvm/include/llvm/CodeGen/MachineScheduler.h
llvm/lib/CodeGen/MachineScheduler.cpp
Index: llvm/lib/CodeGen/MachineScheduler.cpp
===================================================================
--- llvm/lib/CodeGen/MachineScheduler.cpp
+++ llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2088,13 +2088,8 @@
return OtherCritCount;
}
-template void SchedBoundary::releaseNode<true>(SUnit *SU, unsigned ReadyCycle,
- unsigned Idx);
-template void SchedBoundary::releaseNode<false>(SUnit *SU, unsigned ReadyCycle,
- unsigned Idx);
-
-template <bool InPQueue>
-void SchedBoundary::releaseNode(SUnit *SU, unsigned ReadyCycle, unsigned Idx) {
+void SchedBoundary::releaseNode(SUnit *SU, unsigned ReadyCycle, bool InPQueue,
+ unsigned Idx) {
assert(SU->getInstr() && "Scheduled SUnit must have instr");
#ifndef NDEBUG
@@ -2373,7 +2368,7 @@
if (Available.size() >= ReadyListLimit)
break;
- releaseNode<true>(SU, ReadyCycle, I);
+ releaseNode(SU, ReadyCycle, true, I);
if (E != Pending.size()) {
--I;
--E;
Index: llvm/include/llvm/CodeGen/MachineScheduler.h
===================================================================
--- llvm/include/llvm/CodeGen/MachineScheduler.h
+++ llvm/include/llvm/CodeGen/MachineScheduler.h
@@ -757,8 +757,16 @@
unsigned getOtherResourceCount(unsigned &OtherCritIdx);
- template <bool InPQueue>
- void releaseNode(SUnit *SU, unsigned ReadyCycle, unsigned Idx = 0);
+ /// Release SU to make it ready. If it's not in hazard, remove it from
+ /// pending queue (if already in) and push into available queue.
+ /// Otherwise, push the SU into pending queue.
+ ///
+ /// @param SU The unit to be released.
+ /// @param ReadyCycle Until which cycle the unit is ready.
+ /// @param InPQueue Whether SU is already in pending queue.
+ /// @param Idx Position offset in pending queue (if in it).
+ void releaseNode(SUnit *SU, unsigned ReadyCycle, bool InPQueue,
+ unsigned Idx = 0);
void bumpCycle(unsigned NextCycle);
@@ -956,7 +964,7 @@
if (SU->isScheduled)
return;
- Top.releaseNode<false>(SU, SU->TopReadyCycle);
+ Top.releaseNode(SU, SU->TopReadyCycle, false);
TopCand.SU = nullptr;
}
@@ -964,7 +972,7 @@
if (SU->isScheduled)
return;
- Bot.releaseNode<false>(SU, SU->BotReadyCycle);
+ Bot.releaseNode(SU, SU->BotReadyCycle, false);
BotCand.SU = nullptr;
}
@@ -1044,7 +1052,7 @@
void releaseTopNode(SUnit *SU) override {
if (SU->isScheduled)
return;
- Top.releaseNode<false>(SU, SU->TopReadyCycle);
+ Top.releaseNode(SU, SU->TopReadyCycle, false);
}
// Only called for roots.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72125.236807.patch
Type: text/x-patch
Size: 2713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200108/90c31788/attachment.bin>
More information about the llvm-commits
mailing list