summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MCA
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-02-11 17:55:47 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-02-11 17:55:47 +0000
commit23ff2aa47cfe9b26714f9b0ab9e7eabb163e4bcf (patch)
tree098666c89953c11dc5fe73632a47629fd668a6cf /llvm/lib/MCA
parent41cc52d590d4d68763c438f22d550b6e68a03578 (diff)
downloadbcm5719-llvm-23ff2aa47cfe9b26714f9b0ab9e7eabb163e4bcf.tar.gz
bcm5719-llvm-23ff2aa47cfe9b26714f9b0ab9e7eabb163e4bcf.zip
[MCA][Scheduler] Track resources that were found busy when issuing an instruction.
This is a follow up of r353706. When the scheduler fails to issue a ready instruction to the underlying pipelines, it now updates a mask of 'busy resource units'. That information will be used in future to obtain the set of "problematic" resources in the case of bottlenecks caused by resource pressure. No functional change intended. llvm-svn: 353728
Diffstat (limited to 'llvm/lib/MCA')
-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