File indexing completed on 2026-05-10 08:44:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef LLVM_MCA_STAGES_RETIRESTAGE_H
0017 #define LLVM_MCA_STAGES_RETIRESTAGE_H
0018
0019 #include "llvm/ADT/SmallVector.h"
0020 #include "llvm/MCA/HardwareUnits/LSUnit.h"
0021 #include "llvm/MCA/HardwareUnits/RegisterFile.h"
0022 #include "llvm/MCA/HardwareUnits/RetireControlUnit.h"
0023 #include "llvm/MCA/Stages/Stage.h"
0024
0025 namespace llvm {
0026 namespace mca {
0027
0028 class RetireStage final : public Stage {
0029
0030 RetireControlUnit &RCU;
0031 RegisterFile &PRF;
0032 LSUnitBase &LSU;
0033
0034 RetireStage(const RetireStage &Other) = delete;
0035 RetireStage &operator=(const RetireStage &Other) = delete;
0036
0037 public:
0038 RetireStage(RetireControlUnit &R, RegisterFile &F, LSUnitBase &LS)
0039 : RCU(R), PRF(F), LSU(LS) {}
0040
0041 bool hasWorkToComplete() const override { return !RCU.isEmpty(); }
0042 Error cycleStart() override;
0043 Error cycleEnd() override;
0044 Error execute(InstRef &IR) override;
0045 void notifyInstructionRetired(const InstRef &IR) const;
0046 };
0047
0048 }
0049 }
0050
0051 #endif