summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-mca/CMakeLists.txt24
-rw-r--r--llvm/tools/llvm-mca/include/Context.h (renamed from llvm/tools/llvm-mca/Context.h)2
-rw-r--r--llvm/tools/llvm-mca/include/HWEventListener.h (renamed from llvm/tools/llvm-mca/HWEventListener.h)0
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h (renamed from llvm/tools/llvm-mca/HardwareUnit.h)0
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/LSUnit.h (renamed from llvm/tools/llvm-mca/LSUnit.h)2
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/RegisterFile.h (renamed from llvm/tools/llvm-mca/RegisterFile.h)2
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/ResourceManager.h (renamed from llvm/tools/llvm-mca/ResourceManager.h)0
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h (renamed from llvm/tools/llvm-mca/RetireControlUnit.h)2
-rw-r--r--llvm/tools/llvm-mca/include/HardwareUnits/Scheduler.h (renamed from llvm/tools/llvm-mca/Scheduler.h)4
-rw-r--r--llvm/tools/llvm-mca/include/InstrBuilder.h (renamed from llvm/tools/llvm-mca/InstrBuilder.h)0
-rw-r--r--llvm/tools/llvm-mca/include/Instruction.h (renamed from llvm/tools/llvm-mca/Instruction.h)0
-rw-r--r--llvm/tools/llvm-mca/include/Pipeline.h (renamed from llvm/tools/llvm-mca/Pipeline.h)4
-rw-r--r--llvm/tools/llvm-mca/include/SourceMgr.h (renamed from llvm/tools/llvm-mca/SourceMgr.h)0
-rw-r--r--llvm/tools/llvm-mca/include/Stages/DispatchStage.h (renamed from llvm/tools/llvm-mca/DispatchStage.h)6
-rw-r--r--llvm/tools/llvm-mca/include/Stages/ExecuteStage.h (renamed from llvm/tools/llvm-mca/ExecuteStage.h)4
-rw-r--r--llvm/tools/llvm-mca/include/Stages/FetchStage.h (renamed from llvm/tools/llvm-mca/FetchStage.h)2
-rw-r--r--llvm/tools/llvm-mca/include/Stages/InstructionTables.h (renamed from llvm/tools/llvm-mca/InstructionTables.h)4
-rw-r--r--llvm/tools/llvm-mca/include/Stages/RetireStage.h (renamed from llvm/tools/llvm-mca/RetireStage.h)6
-rw-r--r--llvm/tools/llvm-mca/include/Stages/Stage.h (renamed from llvm/tools/llvm-mca/Stage.h)0
-rw-r--r--llvm/tools/llvm-mca/include/Support.h (renamed from llvm/tools/llvm-mca/Support.h)0
-rw-r--r--llvm/tools/llvm-mca/lib/CMakeLists.txt33
-rw-r--r--llvm/tools/llvm-mca/lib/Context.cpp (renamed from llvm/tools/llvm-mca/Context.cpp)14
-rw-r--r--llvm/tools/llvm-mca/lib/HWEventListener.cpp (renamed from llvm/tools/llvm-mca/HWEventListener.cpp)0
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp (renamed from llvm/tools/llvm-mca/HardwareUnit.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp (renamed from llvm/tools/llvm-mca/LSUnit.cpp)3
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp (renamed from llvm/tools/llvm-mca/RegisterFile.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp (renamed from llvm/tools/llvm-mca/ResourceManager.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp (renamed from llvm/tools/llvm-mca/RetireControlUnit.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp (renamed from llvm/tools/llvm-mca/Scheduler.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/InstrBuilder.cpp (renamed from llvm/tools/llvm-mca/InstrBuilder.cpp)0
-rw-r--r--llvm/tools/llvm-mca/lib/Instruction.cpp (renamed from llvm/tools/llvm-mca/Instruction.cpp)0
-rw-r--r--llvm/tools/llvm-mca/lib/LLVMBuild.txt22
-rw-r--r--llvm/tools/llvm-mca/lib/Pipeline.cpp (renamed from llvm/tools/llvm-mca/Pipeline.cpp)0
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/DispatchStage.cpp (renamed from llvm/tools/llvm-mca/DispatchStage.cpp)4
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/ExecuteStage.cpp (renamed from llvm/tools/llvm-mca/ExecuteStage.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/FetchStage.cpp (renamed from llvm/tools/llvm-mca/FetchStage.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/InstructionTables.cpp (renamed from llvm/tools/llvm-mca/InstructionTables.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/RetireStage.cpp (renamed from llvm/tools/llvm-mca/RetireStage.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/Stages/Stage.cpp (renamed from llvm/tools/llvm-mca/Stage.cpp)2
-rw-r--r--llvm/tools/llvm-mca/lib/Support.cpp (renamed from llvm/tools/llvm-mca/Support.cpp)0
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp8
41 files changed, 104 insertions, 62 deletions
diff --git a/llvm/tools/llvm-mca/CMakeLists.txt b/llvm/tools/llvm-mca/CMakeLists.txt
index 63cbda5b242..fead673ef69 100644
--- a/llvm/tools/llvm-mca/CMakeLists.txt
+++ b/llvm/tools/llvm-mca/CMakeLists.txt
@@ -1,3 +1,5 @@
+include_directories(include)
+
set(LLVM_LINK_COMPONENTS
AllTargetsAsmPrinters
AllTargetsAsmParsers
@@ -12,25 +14,7 @@ set(LLVM_LINK_COMPONENTS
add_llvm_tool(llvm-mca
llvm-mca.cpp
CodeRegion.cpp
- Context.cpp
- DispatchStage.cpp
- ExecuteStage.cpp
- FetchStage.cpp
- HWEventListener.cpp
- HardwareUnit.cpp
- InstrBuilder.cpp
- Instruction.cpp
- InstructionTables.cpp
- LSUnit.cpp
- Pipeline.cpp
PipelinePrinter.cpp
- RegisterFile.cpp
- ResourceManager.cpp
- RetireControlUnit.cpp
- RetireStage.cpp
- Scheduler.cpp
- Stage.cpp
- Support.cpp
Views/DispatchStatistics.cpp
Views/InstructionInfoView.cpp
Views/RegisterFileStatistics.cpp
@@ -41,3 +25,7 @@ add_llvm_tool(llvm-mca
Views/TimelineView.cpp
Views/View.cpp
)
+
+set(LLVM_MCA_SOURCE_DIR ${CURRENT_SOURCE_DIR})
+add_subdirectory(lib)
+target_link_libraries(llvm-mca PRIVATE LLVMMCA)
diff --git a/llvm/tools/llvm-mca/Context.h b/llvm/tools/llvm-mca/include/Context.h
index ae8a376774a..6d0245fbb01 100644
--- a/llvm/tools/llvm-mca/Context.h
+++ b/llvm/tools/llvm-mca/include/Context.h
@@ -17,7 +17,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_CONTEXT_H
#define LLVM_TOOLS_LLVM_MCA_CONTEXT_H
-#include "HardwareUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
#include "InstrBuilder.h"
#include "Pipeline.h"
#include "SourceMgr.h"
diff --git a/llvm/tools/llvm-mca/HWEventListener.h b/llvm/tools/llvm-mca/include/HWEventListener.h
index aa3e6dcf19a..aa3e6dcf19a 100644
--- a/llvm/tools/llvm-mca/HWEventListener.h
+++ b/llvm/tools/llvm-mca/include/HWEventListener.h
diff --git a/llvm/tools/llvm-mca/HardwareUnit.h b/llvm/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h
index e8c496ab967..e8c496ab967 100644
--- a/llvm/tools/llvm-mca/HardwareUnit.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h
diff --git a/llvm/tools/llvm-mca/LSUnit.h b/llvm/tools/llvm-mca/include/HardwareUnits/LSUnit.h
index ecd0fd3af60..b65f59be685 100644
--- a/llvm/tools/llvm-mca/LSUnit.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/LSUnit.h
@@ -16,7 +16,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_LSUNIT_H
#define LLVM_TOOLS_LLVM_MCA_LSUNIT_H
-#include "HardwareUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
#include <set>
namespace mca {
diff --git a/llvm/tools/llvm-mca/RegisterFile.h b/llvm/tools/llvm-mca/include/HardwareUnits/RegisterFile.h
index 1f574ccaee5..17272d6b9df 100644
--- a/llvm/tools/llvm-mca/RegisterFile.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/RegisterFile.h
@@ -17,7 +17,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
#define LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
-#include "HardwareUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSchedule.h"
diff --git a/llvm/tools/llvm-mca/ResourceManager.h b/llvm/tools/llvm-mca/include/HardwareUnits/ResourceManager.h
index c3f893660eb..c3f893660eb 100644
--- a/llvm/tools/llvm-mca/ResourceManager.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/ResourceManager.h
diff --git a/llvm/tools/llvm-mca/RetireControlUnit.h b/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h
index 4f2fed14aa1..7f2d699e410 100644
--- a/llvm/tools/llvm-mca/RetireControlUnit.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h
@@ -15,7 +15,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
#define LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
-#include "HardwareUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
#include "Instruction.h"
#include "llvm/MC/MCSchedule.h"
#include <vector>
diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/include/HardwareUnits/Scheduler.h
index 70f90c5989f..61bbf3fcf36 100644
--- a/llvm/tools/llvm-mca/Scheduler.h
+++ b/llvm/tools/llvm-mca/include/HardwareUnits/Scheduler.h
@@ -15,8 +15,8 @@
#ifndef LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
#define LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
-#include "HardwareUnit.h"
-#include "LSUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
+#include "HardwareUnits/LSUnit.h"
#include "ResourceManager.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSchedule.h"
diff --git a/llvm/tools/llvm-mca/InstrBuilder.h b/llvm/tools/llvm-mca/include/InstrBuilder.h
index 5888b08b3a3..5888b08b3a3 100644
--- a/llvm/tools/llvm-mca/InstrBuilder.h
+++ b/llvm/tools/llvm-mca/include/InstrBuilder.h
diff --git a/llvm/tools/llvm-mca/Instruction.h b/llvm/tools/llvm-mca/include/Instruction.h
index 454992c4b9b..454992c4b9b 100644
--- a/llvm/tools/llvm-mca/Instruction.h
+++ b/llvm/tools/llvm-mca/include/Instruction.h
diff --git a/llvm/tools/llvm-mca/Pipeline.h b/llvm/tools/llvm-mca/include/Pipeline.h
index dfc3fc13d93..dc8ee0ac751 100644
--- a/llvm/tools/llvm-mca/Pipeline.h
+++ b/llvm/tools/llvm-mca/include/Pipeline.h
@@ -16,8 +16,8 @@
#ifndef LLVM_TOOLS_LLVM_MCA_PIPELINE_H
#define LLVM_TOOLS_LLVM_MCA_PIPELINE_H
-#include "Scheduler.h"
-#include "Stage.h"
+#include "HardwareUnits/Scheduler.h"
+#include "Stages/Stage.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Error.h"
diff --git a/llvm/tools/llvm-mca/SourceMgr.h b/llvm/tools/llvm-mca/include/SourceMgr.h
index 573ca7a9a00..573ca7a9a00 100644
--- a/llvm/tools/llvm-mca/SourceMgr.h
+++ b/llvm/tools/llvm-mca/include/SourceMgr.h
diff --git a/llvm/tools/llvm-mca/DispatchStage.h b/llvm/tools/llvm-mca/include/Stages/DispatchStage.h
index 8b184139e3f..8caa002e41f 100644
--- a/llvm/tools/llvm-mca/DispatchStage.h
+++ b/llvm/tools/llvm-mca/include/Stages/DispatchStage.h
@@ -20,10 +20,10 @@
#define LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H
#include "HWEventListener.h"
+#include "HardwareUnits/RegisterFile.h"
+#include "HardwareUnits/RetireControlUnit.h"
#include "Instruction.h"
-#include "RegisterFile.h"
-#include "RetireControlUnit.h"
-#include "Stage.h"
+#include "Stages/Stage.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
diff --git a/llvm/tools/llvm-mca/ExecuteStage.h b/llvm/tools/llvm-mca/include/Stages/ExecuteStage.h
index 13ca612023a..b6bcba98eab 100644
--- a/llvm/tools/llvm-mca/ExecuteStage.h
+++ b/llvm/tools/llvm-mca/include/Stages/ExecuteStage.h
@@ -18,9 +18,9 @@
#ifndef LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
#define LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
+#include "HardwareUnits/Scheduler.h"
#include "Instruction.h"
-#include "Scheduler.h"
-#include "Stage.h"
+#include "Stages/Stage.h"
#include "llvm/ADT/ArrayRef.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/FetchStage.h b/llvm/tools/llvm-mca/include/Stages/FetchStage.h
index a0ab68a4da3..10a89c94469 100644
--- a/llvm/tools/llvm-mca/FetchStage.h
+++ b/llvm/tools/llvm-mca/include/Stages/FetchStage.h
@@ -18,7 +18,7 @@
#include "InstrBuilder.h"
#include "SourceMgr.h"
-#include "Stage.h"
+#include "Stages/Stage.h"
#include <map>
namespace mca {
diff --git a/llvm/tools/llvm-mca/InstructionTables.h b/llvm/tools/llvm-mca/include/Stages/InstructionTables.h
index 346f8727790..f8a299af269 100644
--- a/llvm/tools/llvm-mca/InstructionTables.h
+++ b/llvm/tools/llvm-mca/include/Stages/InstructionTables.h
@@ -17,9 +17,9 @@
#ifndef LLVM_TOOLS_LLVM_MCA_INSTRUCTIONTABLES_H
#define LLVM_TOOLS_LLVM_MCA_INSTRUCTIONTABLES_H
+#include "HardwareUnits/Scheduler.h"
#include "InstrBuilder.h"
-#include "Scheduler.h"
-#include "Stage.h"
+#include "Stages/Stage.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSchedule.h"
diff --git a/llvm/tools/llvm-mca/RetireStage.h b/llvm/tools/llvm-mca/include/Stages/RetireStage.h
index b4432ca6029..88a7d266e36 100644
--- a/llvm/tools/llvm-mca/RetireStage.h
+++ b/llvm/tools/llvm-mca/include/Stages/RetireStage.h
@@ -17,9 +17,9 @@
#ifndef LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
#define LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
-#include "RegisterFile.h"
-#include "RetireControlUnit.h"
-#include "Stage.h"
+#include "HardwareUnits/RegisterFile.h"
+#include "HardwareUnits/RetireControlUnit.h"
+#include "Stages/Stage.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/Stage.h b/llvm/tools/llvm-mca/include/Stages/Stage.h
index 5470c9cf0d9..5470c9cf0d9 100644
--- a/llvm/tools/llvm-mca/Stage.h
+++ b/llvm/tools/llvm-mca/include/Stages/Stage.h
diff --git a/llvm/tools/llvm-mca/Support.h b/llvm/tools/llvm-mca/include/Support.h
index fd8d8b5a23b..fd8d8b5a23b 100644
--- a/llvm/tools/llvm-mca/Support.h
+++ b/llvm/tools/llvm-mca/include/Support.h
diff --git a/llvm/tools/llvm-mca/lib/CMakeLists.txt b/llvm/tools/llvm-mca/lib/CMakeLists.txt
new file mode 100644
index 00000000000..df9ed32acfe
--- /dev/null
+++ b/llvm/tools/llvm-mca/lib/CMakeLists.txt
@@ -0,0 +1,33 @@
+include_directories(${LLVM_MCA_SOURCE_DIR}/include)
+
+add_library(LLVMMCA
+ STATIC
+ Context.cpp
+ HWEventListener.cpp
+ HardwareUnits/HardwareUnit.cpp
+ HardwareUnits/LSUnit.cpp
+ HardwareUnits/RegisterFile.cpp
+ HardwareUnits/ResourceManager.cpp
+ HardwareUnits/RetireControlUnit.cpp
+ HardwareUnits/Scheduler.cpp
+ InstrBuilder.cpp
+ Instruction.cpp
+ Pipeline.cpp
+ Stages/DispatchStage.cpp
+ Stages/ExecuteStage.cpp
+ Stages/FetchStage.cpp
+ Stages/InstructionTables.cpp
+ Stages/RetireStage.cpp
+ Stages/Stage.cpp
+ Support.cpp
+ )
+
+llvm_update_compile_flags(LLVMMCA)
+llvm_map_components_to_libnames(libs
+ CodeGen
+ MC
+ Support
+ )
+
+target_link_libraries(LLVMMCA ${libs})
+set_target_properties(LLVMMCA PROPERTIES FOLDER "Libraries")
diff --git a/llvm/tools/llvm-mca/Context.cpp b/llvm/tools/llvm-mca/lib/Context.cpp
index bf574982243..31c09dce912 100644
--- a/llvm/tools/llvm-mca/Context.cpp
+++ b/llvm/tools/llvm-mca/lib/Context.cpp
@@ -16,13 +16,13 @@
//===----------------------------------------------------------------------===//
#include "Context.h"
-#include "DispatchStage.h"
-#include "ExecuteStage.h"
-#include "FetchStage.h"
-#include "RegisterFile.h"
-#include "RetireControlUnit.h"
-#include "RetireStage.h"
-#include "Scheduler.h"
+#include "HardwareUnits/RegisterFile.h"
+#include "HardwareUnits/RetireControlUnit.h"
+#include "HardwareUnits/Scheduler.h"
+#include "Stages/DispatchStage.h"
+#include "Stages/ExecuteStage.h"
+#include "Stages/FetchStage.h"
+#include "Stages/RetireStage.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/HWEventListener.cpp b/llvm/tools/llvm-mca/lib/HWEventListener.cpp
index f27a04a9a98..f27a04a9a98 100644
--- a/llvm/tools/llvm-mca/HWEventListener.cpp
+++ b/llvm/tools/llvm-mca/lib/HWEventListener.cpp
diff --git a/llvm/tools/llvm-mca/HardwareUnit.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp
index 103cde9afcc..daeda06d859 100644
--- a/llvm/tools/llvm-mca/HardwareUnit.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "HardwareUnit.h"
+#include "HardwareUnits/HardwareUnit.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/LSUnit.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp
index e8d32da2714..b845c5b43fe 100644
--- a/llvm/tools/llvm-mca/LSUnit.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp
@@ -12,9 +12,8 @@
///
//===----------------------------------------------------------------------===//
-#include "LSUnit.h"
+#include "HardwareUnits/LSUnit.h"
#include "Instruction.h"
-
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/tools/llvm-mca/RegisterFile.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
index cba17a6a6a1..081fd3b99be 100644
--- a/llvm/tools/llvm-mca/RegisterFile.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
@@ -14,7 +14,7 @@
///
//===----------------------------------------------------------------------===//
-#include "RegisterFile.h"
+#include "HardwareUnits/RegisterFile.h"
#include "Instruction.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/tools/llvm-mca/ResourceManager.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp
index 80ea73e631d..18d0e74a774 100644
--- a/llvm/tools/llvm-mca/ResourceManager.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "ResourceManager.h"
+#include "HardwareUnits/ResourceManager.h"
#include "Support.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/tools/llvm-mca/RetireControlUnit.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
index 123058541f2..205fe84a709 100644
--- a/llvm/tools/llvm-mca/RetireControlUnit.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
@@ -12,7 +12,7 @@
///
//===----------------------------------------------------------------------===//
-#include "RetireControlUnit.h"
+#include "HardwareUnits/RetireControlUnit.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
diff --git a/llvm/tools/llvm-mca/Scheduler.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp
index b0b0d71d400..151af2333f6 100644
--- a/llvm/tools/llvm-mca/Scheduler.cpp
+++ b/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "Scheduler.h"
+#include "HardwareUnits/Scheduler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/tools/llvm-mca/InstrBuilder.cpp b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp
index 1688a56c0b6..1688a56c0b6 100644
--- a/llvm/tools/llvm-mca/InstrBuilder.cpp
+++ b/llvm/tools/llvm-mca/lib/InstrBuilder.cpp
diff --git a/llvm/tools/llvm-mca/Instruction.cpp b/llvm/tools/llvm-mca/lib/Instruction.cpp
index 0c847670557..0c847670557 100644
--- a/llvm/tools/llvm-mca/Instruction.cpp
+++ b/llvm/tools/llvm-mca/lib/Instruction.cpp
diff --git a/llvm/tools/llvm-mca/lib/LLVMBuild.txt b/llvm/tools/llvm-mca/lib/LLVMBuild.txt
new file mode 100644
index 00000000000..e3bf632741b
--- /dev/null
+++ b/llvm/tools/llvm-mca/lib/LLVMBuild.txt
@@ -0,0 +1,22 @@
+;===- ./tools/llvm-mca/lib/LLVMBuild.txt -----------------------*- Conf -*--===;
+;
+; The LLVM Compiler Infrastructure
+;
+; This file is distributed under the University of Illinois Open Source
+; License. See LICENSE.TXT for details.
+;
+;===------------------------------------------------------------------------===;
+;
+; This is an LLVMBuild description file for the components in this subdirectory.
+;
+; For more information on the LLVMBuild system, please see:
+;
+; http://llvm.org/docs/LLVMBuild.html
+;
+;===------------------------------------------------------------------------===;
+
+[component_0]
+type = Library
+name = MCA
+parent = Libraries
+required_libraries = CodeGen MC Support
diff --git a/llvm/tools/llvm-mca/Pipeline.cpp b/llvm/tools/llvm-mca/lib/Pipeline.cpp
index a67ae98d7cd..a67ae98d7cd 100644
--- a/llvm/tools/llvm-mca/Pipeline.cpp
+++ b/llvm/tools/llvm-mca/lib/Pipeline.cpp
diff --git a/llvm/tools/llvm-mca/DispatchStage.cpp b/llvm/tools/llvm-mca/lib/Stages/DispatchStage.cpp
index cb964461f4b..81098cb8fbc 100644
--- a/llvm/tools/llvm-mca/DispatchStage.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/DispatchStage.cpp
@@ -16,9 +16,9 @@
///
//===----------------------------------------------------------------------===//
-#include "DispatchStage.h"
+#include "Stages/DispatchStage.h"
#include "HWEventListener.h"
-#include "Scheduler.h"
+#include "HardwareUnits/Scheduler.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
diff --git a/llvm/tools/llvm-mca/ExecuteStage.cpp b/llvm/tools/llvm-mca/lib/Stages/ExecuteStage.cpp
index 7f604d66ff5..7fff4b8e5d6 100644
--- a/llvm/tools/llvm-mca/ExecuteStage.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/ExecuteStage.cpp
@@ -15,7 +15,7 @@
///
//===----------------------------------------------------------------------===//
-#include "ExecuteStage.h"
+#include "Stages/ExecuteStage.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/tools/llvm-mca/FetchStage.cpp b/llvm/tools/llvm-mca/lib/Stages/FetchStage.cpp
index 60c9e6f73e7..99c0aab29d9 100644
--- a/llvm/tools/llvm-mca/FetchStage.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/FetchStage.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "FetchStage.h"
+#include "Stages/FetchStage.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/InstructionTables.cpp b/llvm/tools/llvm-mca/lib/Stages/InstructionTables.cpp
index be948d8b723..1fdeefa2350 100644
--- a/llvm/tools/llvm-mca/InstructionTables.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/InstructionTables.cpp
@@ -15,7 +15,7 @@
///
//===----------------------------------------------------------------------===//
-#include "InstructionTables.h"
+#include "Stages/InstructionTables.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/RetireStage.cpp b/llvm/tools/llvm-mca/lib/Stages/RetireStage.cpp
index 4e0f380b5cc..768a68e1de9 100644
--- a/llvm/tools/llvm-mca/RetireStage.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/RetireStage.cpp
@@ -14,7 +14,7 @@
///
//===----------------------------------------------------------------------===//
-#include "RetireStage.h"
+#include "Stages/RetireStage.h"
#include "HWEventListener.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/tools/llvm-mca/Stage.cpp b/llvm/tools/llvm-mca/lib/Stages/Stage.cpp
index 5cf76ab0a41..e8cd74f2163 100644
--- a/llvm/tools/llvm-mca/Stage.cpp
+++ b/llvm/tools/llvm-mca/lib/Stages/Stage.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "Stage.h"
+#include "Stages/Stage.h"
namespace mca {
diff --git a/llvm/tools/llvm-mca/Support.cpp b/llvm/tools/llvm-mca/lib/Support.cpp
index 8f6b8a91f38..8f6b8a91f38 100644
--- a/llvm/tools/llvm-mca/Support.cpp
+++ b/llvm/tools/llvm-mca/lib/Support.cpp
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index 6ef936708df..5a94a6b62de 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -22,11 +22,9 @@
//===----------------------------------------------------------------------===//
#include "CodeRegion.h"
-#include "Context.h"
-#include "FetchStage.h"
-#include "InstructionTables.h"
-#include "Pipeline.h"
#include "PipelinePrinter.h"
+#include "Stages/FetchStage.h"
+#include "Stages/InstructionTables.h"
#include "Views/DispatchStatistics.h"
#include "Views/InstructionInfoView.h"
#include "Views/RegisterFileStatistics.h"
@@ -35,6 +33,8 @@
#include "Views/SchedulerStatistics.h"
#include "Views/SummaryView.h"
#include "Views/TimelineView.h"
+#include "include/Context.h"
+#include "include/Pipeline.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCObjectFileInfo.h"
OpenPOWER on IntegriCloud