123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #pragma once
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wunused-parameter"
- #endif
- #ifndef LLVM_MCA_PIPELINE_H
- #define LLVM_MCA_PIPELINE_H
- #include "llvm/MCA/Stages/Stage.h"
- #include "llvm/Support/Error.h"
- namespace llvm {
- namespace mca {
- class HWEventListener;
- class Pipeline {
- Pipeline(const Pipeline &P) = delete;
- Pipeline &operator=(const Pipeline &P) = delete;
-
- SmallVector<std::unique_ptr<Stage>, 8> Stages;
- std::set<HWEventListener *> Listeners;
- unsigned Cycles;
- Error runCycle();
- bool hasWorkToProcess();
- void notifyCycleBegin();
- void notifyCycleEnd();
- public:
- Pipeline() : Cycles(0) {}
- void appendStage(std::unique_ptr<Stage> S);
-
- Expected<unsigned> run();
- void addEventListener(HWEventListener *Listener);
- };
- }
- }
- #endif
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
|