aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-mca
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-06-26 10:44:12 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-06-26 10:44:12 +0000
commit2f2d460c914eabe8943f00ec5acf1a2d6d072bff (patch)
tree6535869dede68d6e6c6d17a2c84b22d3252e6750 /tools/llvm-mca
parent1766212247af35deafff713c88e42e7af3270711 (diff)
[llvm-mca] Remove unused header files and correctly guard some include headers under NDEBUG. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mca')
-rw-r--r--tools/llvm-mca/Instruction.h4
-rw-r--r--tools/llvm-mca/LSUnit.cpp3
-rw-r--r--tools/llvm-mca/LSUnit.h5
-rw-r--r--tools/llvm-mca/RegisterFile.cpp3
-rw-r--r--tools/llvm-mca/RetireControlUnit.cpp3
-rw-r--r--tools/llvm-mca/RetireControlUnit.h2
-rw-r--r--tools/llvm-mca/Scheduler.cpp7
7 files changed, 19 insertions, 8 deletions
diff --git a/tools/llvm-mca/Instruction.h b/tools/llvm-mca/Instruction.h
index 558ef42c266..880d57b31a3 100644
--- a/tools/llvm-mca/Instruction.h
+++ b/tools/llvm-mca/Instruction.h
@@ -17,7 +17,11 @@
#define LLVM_TOOLS_LLVM_MCA_INSTRUCTION_H
#include "llvm/Support/MathExtras.h"
+
+#ifndef NDEBUG
#include "llvm/Support/raw_ostream.h"
+#endif
+
#include <memory>
#include <set>
#include <vector>
diff --git a/tools/llvm-mca/LSUnit.cpp b/tools/llvm-mca/LSUnit.cpp
index c2f3b9dd5a0..539183cb7a7 100644
--- a/tools/llvm-mca/LSUnit.cpp
+++ b/tools/llvm-mca/LSUnit.cpp
@@ -14,8 +14,11 @@
#include "LSUnit.h"
#include "Instruction.h"
+
+#ifndef NDEBUG
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#endif
using namespace llvm;
diff --git a/tools/llvm-mca/LSUnit.h b/tools/llvm-mca/LSUnit.h
index 85911070f15..81752219058 100644
--- a/tools/llvm-mca/LSUnit.h
+++ b/tools/llvm-mca/LSUnit.h
@@ -16,12 +16,8 @@
#ifndef LLVM_TOOLS_LLVM_MCA_LSUNIT_H
#define LLVM_TOOLS_LLVM_MCA_LSUNIT_H
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/raw_ostream.h"
#include <set>
-#define DEBUG_TYPE "llvm-mca"
-
namespace mca {
class InstRef;
@@ -145,6 +141,7 @@ public:
bool isReady(const InstRef &IR) const;
void onInstructionExecuted(const InstRef &IR);
};
+
} // namespace mca
#endif
diff --git a/tools/llvm-mca/RegisterFile.cpp b/tools/llvm-mca/RegisterFile.cpp
index db4a0d17778..52b3e7716f8 100644
--- a/tools/llvm-mca/RegisterFile.cpp
+++ b/tools/llvm-mca/RegisterFile.cpp
@@ -16,7 +16,10 @@
#include "RegisterFile.h"
#include "Instruction.h"
+
+#ifndef NDEBUG
#include "llvm/Support/Debug.h"
+#endif
using namespace llvm;
diff --git a/tools/llvm-mca/RetireControlUnit.cpp b/tools/llvm-mca/RetireControlUnit.cpp
index 123058541f2..3a4319241fb 100644
--- a/tools/llvm-mca/RetireControlUnit.cpp
+++ b/tools/llvm-mca/RetireControlUnit.cpp
@@ -13,7 +13,10 @@
//===----------------------------------------------------------------------===//
#include "RetireControlUnit.h"
+
+#ifndef NDEBUG
#include "llvm/Support/Debug.h"
+#endif
using namespace llvm;
diff --git a/tools/llvm-mca/RetireControlUnit.h b/tools/llvm-mca/RetireControlUnit.h
index da1f59da3e8..7c076561428 100644
--- a/tools/llvm-mca/RetireControlUnit.h
+++ b/tools/llvm-mca/RetireControlUnit.h
@@ -17,8 +17,6 @@
#include "Instruction.h"
#include "llvm/MC/MCSchedule.h"
-
-#include <algorithm>
#include <vector>
namespace mca {
diff --git a/tools/llvm-mca/Scheduler.cpp b/tools/llvm-mca/Scheduler.cpp
index 0e4bd77b7fd..5ed8ff0be15 100644
--- a/tools/llvm-mca/Scheduler.cpp
+++ b/tools/llvm-mca/Scheduler.cpp
@@ -12,15 +12,18 @@
//===----------------------------------------------------------------------===//
#include "Scheduler.h"
-#include "HWEventListener.h"
-#include "Pipeline.h"
#include "Support.h"
+#ifndef NDEBUG
+#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#endif
namespace mca {
using namespace llvm;
+#define DEBUG_TYPE "llvm-mca"
+
uint64_t ResourceState::selectNextInSequence() {
assert(isReady());
uint64_t Next = getNextInSequence();