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_ENTRYSTAGE_H
0017 #define LLVM_MCA_STAGES_ENTRYSTAGE_H
0018
0019 #include "llvm/ADT/SmallVector.h"
0020 #include "llvm/MCA/SourceMgr.h"
0021 #include "llvm/MCA/Stages/Stage.h"
0022
0023 namespace llvm {
0024 namespace mca {
0025
0026 class EntryStage final : public Stage {
0027 InstRef CurrentInstruction;
0028 SmallVector<std::unique_ptr<Instruction>, 16> Instructions;
0029 SourceMgr &SM;
0030 unsigned NumRetired;
0031
0032
0033 Error getNextInstruction();
0034
0035 EntryStage(const EntryStage &Other) = delete;
0036 EntryStage &operator=(const EntryStage &Other) = delete;
0037
0038 public:
0039 EntryStage(SourceMgr &SM) : SM(SM), NumRetired(0) {}
0040
0041 bool isAvailable(const InstRef &IR) const override;
0042 bool hasWorkToComplete() const override;
0043 Error execute(InstRef &IR) override;
0044 Error cycleStart() override;
0045 Error cycleResume() override;
0046 Error cycleEnd() override;
0047 };
0048
0049 }
0050 }
0051
0052 #endif