[llvm] r335589 - [llvm-mca] Remove unused header files and correctly guard some include headers under NDEBUG. NFC

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 03:44:12 PDT 2018


Author: adibiagio
Date: Tue Jun 26 03:44:12 2018
New Revision: 335589

URL: http://llvm.org/viewvc/llvm-project?rev=335589&view=rev
Log:
[llvm-mca] Remove unused header files and correctly guard some include headers under NDEBUG. NFC

Modified:
    llvm/trunk/tools/llvm-mca/Instruction.h
    llvm/trunk/tools/llvm-mca/LSUnit.cpp
    llvm/trunk/tools/llvm-mca/LSUnit.h
    llvm/trunk/tools/llvm-mca/RegisterFile.cpp
    llvm/trunk/tools/llvm-mca/RetireControlUnit.cpp
    llvm/trunk/tools/llvm-mca/RetireControlUnit.h
    llvm/trunk/tools/llvm-mca/Scheduler.cpp

Modified: llvm/trunk/tools/llvm-mca/Instruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Instruction.h?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Instruction.h (original)
+++ llvm/trunk/tools/llvm-mca/Instruction.h Tue Jun 26 03:44:12 2018
@@ -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>

Modified: llvm/trunk/tools/llvm-mca/LSUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/LSUnit.cpp?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/LSUnit.cpp (original)
+++ llvm/trunk/tools/llvm-mca/LSUnit.cpp Tue Jun 26 03:44:12 2018
@@ -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;
 

Modified: llvm/trunk/tools/llvm-mca/LSUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/LSUnit.h?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/LSUnit.h (original)
+++ llvm/trunk/tools/llvm-mca/LSUnit.h Tue Jun 26 03:44:12 2018
@@ -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

Modified: llvm/trunk/tools/llvm-mca/RegisterFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/RegisterFile.cpp?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/RegisterFile.cpp (original)
+++ llvm/trunk/tools/llvm-mca/RegisterFile.cpp Tue Jun 26 03:44:12 2018
@@ -16,7 +16,10 @@
 
 #include "RegisterFile.h"
 #include "Instruction.h"
+
+#ifndef NDEBUG
 #include "llvm/Support/Debug.h"
+#endif
 
 using namespace llvm;
 

Modified: llvm/trunk/tools/llvm-mca/RetireControlUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/RetireControlUnit.cpp?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/RetireControlUnit.cpp (original)
+++ llvm/trunk/tools/llvm-mca/RetireControlUnit.cpp Tue Jun 26 03:44:12 2018
@@ -13,7 +13,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "RetireControlUnit.h"
+
+#ifndef NDEBUG
 #include "llvm/Support/Debug.h"
+#endif
 
 using namespace llvm;
 

Modified: llvm/trunk/tools/llvm-mca/RetireControlUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/RetireControlUnit.h?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/RetireControlUnit.h (original)
+++ llvm/trunk/tools/llvm-mca/RetireControlUnit.h Tue Jun 26 03:44:12 2018
@@ -17,8 +17,6 @@
 
 #include "Instruction.h"
 #include "llvm/MC/MCSchedule.h"
-
-#include <algorithm>
 #include <vector>
 
 namespace mca {

Modified: llvm/trunk/tools/llvm-mca/Scheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Scheduler.cpp?rev=335589&r1=335588&r2=335589&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Scheduler.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Scheduler.cpp Tue Jun 26 03:44:12 2018
@@ -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();




More information about the llvm-commits mailing list