diff options
Diffstat (limited to 'llvm/tools/llvm-mca/Scheduler.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/Scheduler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/tools/llvm-mca/Scheduler.cpp b/llvm/tools/llvm-mca/Scheduler.cpp index 2a938b872eb..e722844e8d8 100644 --- a/llvm/tools/llvm-mca/Scheduler.cpp +++ b/llvm/tools/llvm-mca/Scheduler.cpp @@ -352,14 +352,16 @@ void Scheduler::issueInstruction(Instruction &IS, unsigned InstrIndex) { // This updates the internal state of each write. IS.execute(); + notifyInstructionIssued(InstrIndex, UsedResources); if (D.MaxLatency) { + assert(IS.isExecuting() && "A zero latency instruction?"); IssuedQueue[InstrIndex] = &IS; - notifyInstructionIssued(InstrIndex, UsedResources); - } else { - // A zero latency instruction which reads and/or updates registers. - notifyInstructionIssued(InstrIndex, UsedResources); - notifyInstructionExecuted(InstrIndex); + return; } + + // A zero latency instruction which reads and/or updates registers. + assert(IS.isExecuted() && "Instruction still executing!"); + notifyInstructionExecuted(InstrIndex); } void Scheduler::issue() { |