1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[llvm-mca] Remove redundant includes in Stage.h.

This patch also makes Stage::isReady() a const method.

No functional change.

llvm-svn: 332443
This commit is contained in:
Andrea Di Biagio 2018-05-16 09:24:38 +00:00
parent aaacb56f16
commit 38049fdba1
4 changed files with 8 additions and 9 deletions

View File

@ -18,7 +18,7 @@
using namespace mca;
bool FetchStage::isReady() { return SM.hasNext(); }
bool FetchStage::isReady() const { return SM.hasNext(); }
bool FetchStage::execute(InstRef &IR) {
if (!SM.hasNext())

View File

@ -37,7 +37,7 @@ public:
FetchStage(const FetchStage &Other) = delete;
FetchStage &operator=(const FetchStage &Other) = delete;
bool isReady() override final;
bool isReady() const override final;
bool execute(InstRef &IR) override final;
void postExecute(const InstRef &IR) override final;
};

View File

@ -22,7 +22,7 @@ namespace mca {
Stage::Stage() {}
void Stage::addListener(HWEventListener *Listener) {
llvm::llvm_unreachable_internal("Stage-based eventing is not implemented.");
llvm_unreachable("Stage-based eventing is not implemented.");
}
} // namespace mca

View File

@ -16,14 +16,13 @@
#ifndef LLVM_TOOLS_LLVM_MCA_STAGE_H
#define LLVM_TOOLS_LLVM_MCA_STAGE_H
#include "HWEventListener.h"
#include "Instruction.h"
#include "SourceMgr.h"
#include <memory>
#include <string>
#include <set>
namespace mca {
class HWEventListener;
class InstRef;
class Stage {
std::set<HWEventListener *> Listeners;
Stage(const Stage &Other) = delete;
@ -36,7 +35,7 @@ public:
/// Called prior to preExecute to ensure that the stage can operate.
/// TODO: Remove this logic once backend::run and backend::runCycle become
/// one routine.
virtual bool isReady() { return true; }
virtual bool isReady() const { return true; }
/// Called as a setup phase to prepare for the main stage execution.
virtual void preExecute(const InstRef &IR) {}