aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MCA/Instruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MCA/Instruction.cpp')
-rw-r--r--llvm/lib/MCA/Instruction.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/MCA/Instruction.cpp b/llvm/lib/MCA/Instruction.cpp
index e658b869a67e..d4adfce59713 100644
--- a/llvm/lib/MCA/Instruction.cpp
+++ b/llvm/lib/MCA/Instruction.cpp
@@ -148,6 +148,18 @@ const CriticalDependency &Instruction::computeCriticalRegDep() {
return CriticalRegDep;
}
+void Instruction::reset() {
+ // Note that this won't clear read/write descriptors
+ // or other non-trivial fields
+ Stage = IS_INVALID;
+ CyclesLeft = UNKNOWN_CYCLES;
+ clearOptimizableMove();
+ RCUTokenID = 0;
+ LSUTokenID = 0;
+ CriticalResourceMask = 0;
+ IsEliminated = false;
+}
+
void Instruction::dispatch(unsigned RCUToken) {
assert(Stage == IS_INVALID);
Stage = IS_DISPATCHED;