summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorQiu Chaofan <qiucofan@cn.ibm.com>2020-01-08 22:12:15 +0800
committerQiu Chaofan <qiucofan@cn.ibm.com>2020-01-08 22:15:32 +0800
commitb2c2fe72197267af90b4b6a187ab6163f806ce00 (patch)
tree987fa46469f7ae16ed6edee7030490c61540e82e /llvm/lib/CodeGen/MachineScheduler.cpp
parent7a77ad144694ced7b553c644bcbcbfffac2b5fe1 (diff)
downloadbcm5719-llvm-b2c2fe72197267af90b4b6a187ab6163f806ce00.tar.gz
bcm5719-llvm-b2c2fe72197267af90b4b6a187ab6163f806ce00.zip
[NFC] Move InPQueue into arguments of releaseNode
This patch moves `InPQueue` into function arguments instead of template arguments of `releaseNode`, which is a cleaner approach. Differential Revision: https://reviews.llvm.org/D72125
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index bee7848ba4c..52855ceb428 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2088,13 +2088,8 @@ getOtherResourceCount(unsigned &OtherCritIdx) {
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 @@ void SchedBoundary::releasePending() {
if (Available.size() >= ReadyListLimit)
break;
- releaseNode<true>(SU, ReadyCycle, I);
+ releaseNode(SU, ReadyCycle, true, I);
if (E != Pending.size()) {
--I;
--E;
OpenPOWER on IntegriCloud