[llvm] r332443 - [llvm-mca] Remove redundant includes in Stage.h.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 02:24:38 PDT 2018
Author: adibiagio
Date: Wed May 16 02:24:38 2018
New Revision: 332443
URL: http://llvm.org/viewvc/llvm-project?rev=332443&view=rev
Log:
[llvm-mca] Remove redundant includes in Stage.h.
This patch also makes Stage::isReady() a const method.
No functional change.
Modified:
llvm/trunk/tools/llvm-mca/FetchStage.cpp
llvm/trunk/tools/llvm-mca/FetchStage.h
llvm/trunk/tools/llvm-mca/Stage.cpp
llvm/trunk/tools/llvm-mca/Stage.h
Modified: llvm/trunk/tools/llvm-mca/FetchStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/FetchStage.cpp?rev=332443&r1=332442&r2=332443&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/FetchStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/FetchStage.cpp Wed May 16 02:24:38 2018
@@ -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())
Modified: llvm/trunk/tools/llvm-mca/FetchStage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/FetchStage.h?rev=332443&r1=332442&r2=332443&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/FetchStage.h (original)
+++ llvm/trunk/tools/llvm-mca/FetchStage.h Wed May 16 02:24:38 2018
@@ -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;
};
Modified: llvm/trunk/tools/llvm-mca/Stage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Stage.cpp?rev=332443&r1=332442&r2=332443&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Stage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Stage.cpp Wed May 16 02:24:38 2018
@@ -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
Modified: llvm/trunk/tools/llvm-mca/Stage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Stage.h?rev=332443&r1=332442&r2=332443&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Stage.h (original)
+++ llvm/trunk/tools/llvm-mca/Stage.h Wed May 16 02:24:38 2018
@@ -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) {}
More information about the llvm-commits
mailing list