summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MCA/HardwareUnits/Scheduler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MCA/HardwareUnits/Scheduler.cpp b/llvm/lib/MCA/HardwareUnits/Scheduler.cpp
index fb1080dc02c..b8cd62f8bd4 100644
--- a/llvm/lib/MCA/HardwareUnits/Scheduler.cpp
+++ b/llvm/lib/MCA/HardwareUnits/Scheduler.cpp
@@ -140,6 +140,7 @@ InstRef Scheduler::select() {
Strategy->compare(IR, ReadySet[QueueIndex])) {
const InstrDesc &D = IR.getInstruction()->getDesc();
uint64_t BusyResourceMask = Resources->checkAvailability(D);
+ BusyResourceUnits |= BusyResourceMask;
if (!BusyResourceMask)
QueueIndex = I;
}
@@ -196,6 +197,8 @@ void Scheduler::cycleEvent(SmallVectorImpl<ResourceRef> &Freed,
IR.getInstruction()->cycleEvent();
promoteToReadySet(Ready);
+
+ BusyResourceUnits = 0;
}
bool Scheduler::mustIssueImmediately(const InstRef &IR) const {
OpenPOWER on IntegriCloud