summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp')
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
index 0456e1d7a5b..bd7b411af11 100644
--- a/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
@@ -60,9 +60,10 @@ const RetireControlUnit::RUToken &RetireControlUnit::peekCurrentToken() const {
}
void RetireControlUnit::consumeCurrentToken() {
- const RetireControlUnit::RUToken &Current = peekCurrentToken();
+ RetireControlUnit::RUToken &Current = Queue[CurrentInstructionSlotIdx];
assert(Current.NumSlots && "Reserved zero slots?");
assert(Current.IR && "Invalid RUToken in the RCU queue.");
+ Current.IR.getInstruction()->retire();
// Update the slot index to be the next item in the circular queue.
CurrentInstructionSlotIdx += Current.NumSlots;
OpenPOWER on IntegriCloud