summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/Backend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/Backend.cpp')
-rw-r--r--llvm/tools/llvm-mca/Backend.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/Backend.cpp b/llvm/tools/llvm-mca/Backend.cpp
index 46c7a735e9e..a45fd342aef 100644
--- a/llvm/tools/llvm-mca/Backend.cpp
+++ b/llvm/tools/llvm-mca/Backend.cpp
@@ -36,7 +36,8 @@ void Backend::runCycle(unsigned Cycle) {
std::unique_ptr<Instruction> NewIS(
IB->createInstruction(STI, IR.first, *IR.second));
const InstrDesc &Desc = NewIS->getDesc();
- if (!DU->isAvailable(Desc.NumMicroOps) || !DU->canDispatch(*NewIS))
+ if (!DU->isAvailable(Desc.NumMicroOps) ||
+ !DU->canDispatch(IR.first, *NewIS))
break;
Instruction *IS = NewIS.get();
@@ -62,6 +63,11 @@ void Backend::notifyInstructionEvent(const HWInstructionEvent &Event) {
Listener->onInstructionEvent(Event);
}
+void Backend::notifyStallEvent(const HWStallEvent &Event) {
+ for (HWEventListener *Listener : Listeners)
+ Listener->onStallEvent(Event);
+}
+
void Backend::notifyResourceAvailable(const ResourceRef &RR) {
DEBUG(dbgs() << "[E] Resource Available: [" << RR.first << '.' << RR.second
<< "]\n");
OpenPOWER on IntegriCloud