]> granicus.if.org Git - llvm/commitdiff
[llvm-mca] Move llvm-mca library to llvm/lib/MCA.
authorClement Courbet <courbet@google.com>
Mon, 17 Dec 2018 08:08:31 +0000 (08:08 +0000)
committerClement Courbet <courbet@google.com>
Mon, 17 Dec 2018 08:08:31 +0000 (08:08 +0000)
Summary: See PR38731.

Reviewers: andreadb

Subscribers: mgorny, javed.absar, tschuett, gbedwell, andreadb, RKSimon, llvm-commits

Differential Revision: https://reviews.llvm.org/D55557

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349332 91177308-0d34-0410-b5e6-96231b3b80d8

48 files changed:
CODE_OWNERS.TXT
include/llvm/MCA/Context.h [moved from tools/llvm-mca/include/Context.h with 90% similarity]
include/llvm/MCA/HWEventListener.h [moved from tools/llvm-mca/include/HWEventListener.h with 96% similarity]
include/llvm/MCA/HardwareUnits/HardwareUnit.h [moved from tools/llvm-mca/include/HardwareUnits/HardwareUnit.h with 86% similarity]
include/llvm/MCA/HardwareUnits/LSUnit.h [moved from tools/llvm-mca/include/HardwareUnits/LSUnit.h with 98% similarity]
include/llvm/MCA/HardwareUnits/RegisterFile.h [moved from tools/llvm-mca/include/HardwareUnits/RegisterFile.h with 98% similarity]
include/llvm/MCA/HardwareUnits/ResourceManager.h [moved from tools/llvm-mca/include/HardwareUnits/ResourceManager.h with 98% similarity]
include/llvm/MCA/HardwareUnits/RetireControlUnit.h [moved from tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h with 94% similarity]
include/llvm/MCA/HardwareUnits/Scheduler.h [moved from tools/llvm-mca/include/HardwareUnits/Scheduler.h with 96% similarity]
include/llvm/MCA/InstrBuilder.h [moved from tools/llvm-mca/include/InstrBuilder.h with 94% similarity]
include/llvm/MCA/Instruction.h [moved from tools/llvm-mca/include/Instruction.h with 99% similarity]
include/llvm/MCA/Pipeline.h [moved from tools/llvm-mca/include/Pipeline.h with 93% similarity]
include/llvm/MCA/SourceMgr.h [moved from tools/llvm-mca/include/SourceMgr.h with 95% similarity]
include/llvm/MCA/Stages/DispatchStage.h [moved from tools/llvm-mca/include/Stages/DispatchStage.h with 91% similarity]
include/llvm/MCA/Stages/EntryStage.h [moved from tools/llvm-mca/include/Stages/EntryStage.h with 88% similarity]
include/llvm/MCA/Stages/ExecuteStage.h [moved from tools/llvm-mca/include/Stages/ExecuteStage.h with 92% similarity]
include/llvm/MCA/Stages/InstructionTables.h [moved from tools/llvm-mca/include/Stages/InstructionTables.h with 83% similarity]
include/llvm/MCA/Stages/RetireStage.h [moved from tools/llvm-mca/include/Stages/RetireStage.h with 84% similarity]
include/llvm/MCA/Stages/Stage.h [moved from tools/llvm-mca/include/Stages/Stage.h with 94% similarity]
include/llvm/MCA/Support.h [moved from tools/llvm-mca/include/Support.h with 98% similarity]
lib/CMakeLists.txt
lib/LLVMBuild.txt
lib/MCA/CMakeLists.txt [moved from tools/llvm-mca/lib/CMakeLists.txt with 62% similarity]
lib/MCA/Context.cpp [moved from tools/llvm-mca/lib/Context.cpp with 86% similarity]
lib/MCA/HWEventListener.cpp [moved from tools/llvm-mca/lib/HWEventListener.cpp with 94% similarity]
lib/MCA/HardwareUnits/HardwareUnit.cpp [moved from tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp with 93% similarity]
lib/MCA/HardwareUnits/LSUnit.cpp [moved from tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp with 98% similarity]
lib/MCA/HardwareUnits/RegisterFile.cpp [moved from tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp with 99% similarity]
lib/MCA/HardwareUnits/ResourceManager.cpp [moved from tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp with 99% similarity]
lib/MCA/HardwareUnits/RetireControlUnit.cpp [moved from tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp with 98% similarity]
lib/MCA/HardwareUnits/Scheduler.cpp [moved from tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp with 99% similarity]
lib/MCA/InstrBuilder.cpp [moved from tools/llvm-mca/lib/InstrBuilder.cpp with 99% similarity]
lib/MCA/Instruction.cpp [moved from tools/llvm-mca/lib/Instruction.cpp with 99% similarity]
lib/MCA/LLVMBuild.txt [moved from tools/llvm-mca/lib/LLVMBuild.txt with 100% similarity]
lib/MCA/Pipeline.cpp [moved from tools/llvm-mca/lib/Pipeline.cpp with 97% similarity]
lib/MCA/Stages/DispatchStage.cpp [moved from tools/llvm-mca/lib/Stages/DispatchStage.cpp with 98% similarity]
lib/MCA/Stages/EntryStage.cpp [moved from tools/llvm-mca/lib/Stages/EntryStage.cpp with 96% similarity]
lib/MCA/Stages/ExecuteStage.cpp [moved from tools/llvm-mca/lib/Stages/ExecuteStage.cpp with 99% similarity]
lib/MCA/Stages/InstructionTables.cpp [moved from tools/llvm-mca/lib/Stages/InstructionTables.cpp with 98% similarity]
lib/MCA/Stages/RetireStage.cpp [moved from tools/llvm-mca/lib/Stages/RetireStage.cpp with 95% similarity]
lib/MCA/Stages/Stage.cpp [moved from tools/llvm-mca/lib/Stages/Stage.cpp with 95% similarity]
lib/MCA/Support.cpp [moved from tools/llvm-mca/lib/Support.cpp with 98% similarity]
tools/llvm-mca/CMakeLists.txt
tools/llvm-mca/LLVMBuild.txt
tools/llvm-mca/PipelinePrinter.h
tools/llvm-mca/Views/SummaryView.cpp
tools/llvm-mca/Views/View.h
tools/llvm-mca/llvm-mca.cpp

index 67b91f2088337908dc56c293408230ffd5bc5f24..a6e10fc0e27039fe3147abd5b3655b751e2df5be 100644 (file)
@@ -71,7 +71,7 @@ D: Loop Strength Reduction, Register allocators
 N: Andrea Di Biagio
 E: andrea.dibiagio@sony.com
 E: andrea.dibiagio@gmail.com
-D: llvm-mca
+D: MCA, llvm-mca
 
 N: Duncan P. N. Exon Smith
 E: dexonsmith@apple.com
similarity index 90%
rename from tools/llvm-mca/include/Context.h
rename to include/llvm/MCA/Context.h
index ebd1528e371f722e970785dc689f383ad1e813a5..6b2bee0fdc4210779189c4fe8e7b43dfe9426ed5 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_CONTEXT_H
-#define LLVM_TOOLS_LLVM_MCA_CONTEXT_H
-#include "HardwareUnits/HardwareUnit.h"
-#include "InstrBuilder.h"
-#include "Pipeline.h"
-#include "SourceMgr.h"
+#ifndef LLVM_MCA_CONTEXT_H
+#define LLVM_MCA_CONTEXT_H
+
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
+#include "llvm/MCA/InstrBuilder.h"
+#include "llvm/MCA/Pipeline.h"
+#include "llvm/MCA/SourceMgr.h"
 #include <memory>
 
 namespace llvm {
@@ -65,4 +66,4 @@ public:
 
 } // namespace mca
 } // namespace llvm
-#endif // LLVM_TOOLS_LLVM_MCA_CONTEXT_H
+#endif // LLVM_MCA_CONTEXT_H
similarity index 96%
rename from tools/llvm-mca/include/HWEventListener.h
rename to include/llvm/MCA/HWEventListener.h
index 0216fae7866b71ead66e3aa5635997664e1915c9..3b32b2cd657721d7cb2694e5f7d0c2c684dedfcb 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_HWEVENTLISTENER_H
-#define LLVM_TOOLS_LLVM_MCA_HWEVENTLISTENER_H
+#ifndef LLVM_MCA_HWEVENTLISTENER_H
+#define LLVM_MCA_HWEVENTLISTENER_H
 
-#include "Instruction.h"
-#include "Support.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/MCA/Instruction.h"
+#include "llvm/MCA/Support.h"
 
 namespace llvm {
 namespace mca {
@@ -153,4 +153,4 @@ private:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_HWEVENTLISTENER_H
similarity index 86%
rename from tools/llvm-mca/include/HardwareUnits/HardwareUnit.h
rename to include/llvm/MCA/HardwareUnits/HardwareUnit.h
index 5070418c11bffc3f97a2dfd8d21d36adb9eb22cd..104a2009f219d234986557de065cafd3ebe70aca 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
-#define LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
+#ifndef LLVM_MCA_HARDWAREUNIT_H
+#define LLVM_MCA_HARDWAREUNIT_H
 
 namespace llvm {
 namespace mca {
@@ -30,4 +30,4 @@ public:
 
 } // namespace mca
 } // namespace llvm
-#endif // LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
+#endif // LLVM_MCA_HARDWAREUNIT_H
similarity index 98%
rename from tools/llvm-mca/include/HardwareUnits/LSUnit.h
rename to include/llvm/MCA/HardwareUnits/LSUnit.h
index 3f37651ad8dcfb49212842ccc46e75eefa1b2b11..e217fc50f780c5d78cc4a4051dd322c204660e52 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_LSUNIT_H
-#define LLVM_TOOLS_LLVM_MCA_LSUNIT_H
+#ifndef LLVM_MCA_LSUNIT_H
+#define LLVM_MCA_LSUNIT_H
 
-#include "HardwareUnits/HardwareUnit.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
 
 namespace llvm {
 namespace mca {
@@ -204,4 +204,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_LSUNIT_H
similarity index 98%
rename from tools/llvm-mca/include/HardwareUnits/RegisterFile.h
rename to include/llvm/MCA/HardwareUnits/RegisterFile.h
index d9949bf4f6a13be5208240ba299cb4d7927895c1..c23ab038923481363f0d5718af4ca56f56dd983f 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
-#define LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
+#ifndef LLVM_MCA_REGISTER_FILE_H
+#define LLVM_MCA_REGISTER_FILE_H
 
-#include "HardwareUnits/HardwareUnit.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
 #include "llvm/Support/Error.h"
 
 namespace llvm {
@@ -236,4 +236,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
+#endif // LLVM_MCA_REGISTER_FILE_H
similarity index 98%
rename from tools/llvm-mca/include/HardwareUnits/ResourceManager.h
rename to include/llvm/MCA/HardwareUnits/ResourceManager.h
index aa1bdb0440f49ef54433ad620e3728fcda1e4dd0..5429f2b8cf0a5c928f40a32ab1d26c3ae137e921 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_RESOURCE_MANAGER_H
-#define LLVM_TOOLS_LLVM_MCA_RESOURCE_MANAGER_H
+#ifndef LLVM_MCA_RESOURCE_MANAGER_H
+#define LLVM_MCA_RESOURCE_MANAGER_H
 
-#include "Instruction.h"
-#include "Support.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/Instruction.h"
+#include "llvm/MCA/Support.h"
 
 namespace llvm {
 namespace mca {
@@ -357,4 +357,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_RESOURCE_MANAGER_H
+#endif // LLVM_MCA_RESOURCE_MANAGER_H
similarity index 94%
rename from tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h
rename to include/llvm/MCA/HardwareUnits/RetireControlUnit.h
index 12e0a1fba136ea926c1ce3f48d8e9b7fdcf7fa60..71360e984ade5d48914b375df9e628abbf58274c 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
-#define LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
+#ifndef LLVM_MCA_RETIRE_CONTROL_UNIT_H
+#define LLVM_MCA_RETIRE_CONTROL_UNIT_H
 
-#include "HardwareUnits/HardwareUnit.h"
-#include "Instruction.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
+#include "llvm/MCA/Instruction.h"
 #include <vector>
 
 namespace llvm {
@@ -101,4 +101,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
+#endif // LLVM_MCA_RETIRE_CONTROL_UNIT_H
similarity index 96%
rename from tools/llvm-mca/include/HardwareUnits/Scheduler.h
rename to include/llvm/MCA/HardwareUnits/Scheduler.h
index a8d00d2a60cd63cc9ae0e801d273a2886b7338f1..351ea4827df9a112c3cb3e14607c97eda19146e2 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
-#define LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
+#ifndef LLVM_MCA_SCHEDULER_H
+#define LLVM_MCA_SCHEDULER_H
 
-#include "HardwareUnits/HardwareUnit.h"
-#include "HardwareUnits/LSUnit.h"
-#include "ResourceManager.h"
-#include "Support.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
+#include "llvm/MCA/HardwareUnits/LSUnit.h"
+#include "llvm/MCA/HardwareUnits/ResourceManager.h"
+#include "llvm/MCA/Support.h"
 
 namespace llvm {
 namespace mca {
@@ -211,4 +211,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
+#endif // LLVM_MCA_SCHEDULER_H
similarity index 94%
rename from tools/llvm-mca/include/InstrBuilder.h
rename to include/llvm/MCA/InstrBuilder.h
index 1c958c5020ee08bbafc4fb811df4b7e9c0b22aa3..0fadbce399b6d44cccf2f84290597a7a8b1c6922 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_INSTRBUILDER_H
-#define LLVM_TOOLS_LLVM_MCA_INSTRBUILDER_H
+#ifndef LLVM_MCA_INSTRBUILDER_H
+#define LLVM_MCA_INSTRBUILDER_H
 
-#include "Instruction.h"
-#include "Support.h"
 #include "llvm/MC/MCInstrAnalysis.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MCA/Instruction.h"
+#include "llvm/MCA/Support.h"
 #include "llvm/Support/Error.h"
 
 namespace llvm {
@@ -74,4 +74,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_INSTRBUILDER_H
similarity index 99%
rename from tools/llvm-mca/include/Instruction.h
rename to include/llvm/MCA/Instruction.h
index dff9513f82124dc477d742759eab50d49a4b2080..d3fa8ccdc93b75008c15d1cea107c49c25245a68 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_INSTRUCTION_H
-#define LLVM_TOOLS_LLVM_MCA_INSTRUCTION_H
+#ifndef LLVM_MCA_INSTRUCTION_H
+#define LLVM_MCA_INSTRUCTION_H
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
@@ -539,4 +539,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif  // LLVM_MCA_INSTRUCTION_H
similarity index 93%
rename from tools/llvm-mca/include/Pipeline.h
rename to include/llvm/MCA/Pipeline.h
index 0fd40264569941ed73fe7f9026e4437d9c2b7ec4..acd256060bdd77a6f73c142eb3e38e72595de490 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_PIPELINE_H
-#define LLVM_TOOLS_LLVM_MCA_PIPELINE_H
+#ifndef LLVM_MCA_PIPELINE_H
+#define LLVM_MCA_PIPELINE_H
 
-#include "HardwareUnits/Scheduler.h"
-#include "Stages/Stage.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
+#include "llvm/MCA/Stages/Stage.h"
 #include "llvm/Support/Error.h"
 
 namespace llvm {
@@ -76,4 +76,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_PIPELINE_H
+#endif // LLVM_MCA_PIPELINE_H
similarity index 95%
rename from tools/llvm-mca/include/SourceMgr.h
rename to include/llvm/MCA/SourceMgr.h
index e5180107011b19a3feab4faa9a92ca4c00f278cb..5e0ca6419f5d4057185d8fb123edd53eed6bdb06 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_SOURCEMGR_H
-#define LLVM_TOOLS_LLVM_MCA_SOURCEMGR_H
+#ifndef LLVM_MCA_SOURCEMGR_H
+#define LLVM_MCA_SOURCEMGR_H
 
 #include "llvm/ADT/ArrayRef.h"
 
@@ -54,4 +54,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_SOURCEMGR_H
similarity index 91%
rename from tools/llvm-mca/include/Stages/DispatchStage.h
rename to include/llvm/MCA/Stages/DispatchStage.h
index 29cace1022e08ddbb746e6b4fe16d7686ba511ce..f015cd7522eb54edf0e22e0cf412c4f352861ab2 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H
-#define LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H
+#ifndef LLVM_MCA_DISPATCH_STAGE_H
+#define LLVM_MCA_DISPATCH_STAGE_H
 
-#include "HWEventListener.h"
-#include "HardwareUnits/RegisterFile.h"
-#include "HardwareUnits/RetireControlUnit.h"
-#include "Instruction.h"
-#include "Stages/Stage.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MCA/HWEventListener.h"
+#include "llvm/MCA/HardwareUnits/RegisterFile.h"
+#include "llvm/MCA/HardwareUnits/RetireControlUnit.h"
+#include "llvm/MCA/Instruction.h"
+#include "llvm/MCA/Stages/Stage.h"
 
 namespace llvm {
 namespace mca {
@@ -90,4 +90,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H
+#endif // LLVM_MCA_DISPATCH_STAGE_H
similarity index 88%
rename from tools/llvm-mca/include/Stages/EntryStage.h
rename to include/llvm/MCA/Stages/EntryStage.h
index 21b8331e95b720ff618653e14f9512c9e5011b24..cd9a65b8cc2bcfaa7a0161bee4dc9d71b449f5ed 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_ENTRY_STAGE_H
-#define LLVM_TOOLS_LLVM_MCA_ENTRY_STAGE_H
+#ifndef LLVM_MCA_ENTRY_STAGE_H
+#define LLVM_MCA_ENTRY_STAGE_H
 
-#include "SourceMgr.h"
-#include "Stages/Stage.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/MCA/SourceMgr.h"
+#include "llvm/MCA/Stages/Stage.h"
 
 namespace llvm {
 namespace mca {
@@ -49,4 +49,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_FETCH_STAGE_H
+#endif // LLVM_MCA_FETCH_STAGE_H
similarity index 92%
rename from tools/llvm-mca/include/Stages/ExecuteStage.h
rename to include/llvm/MCA/Stages/ExecuteStage.h
index 91b24059c950df6dfdc762c063ce79a2b474922c..4f40c5c65d6bc951acf7b47edebeacb2d301dfa4 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
-#define LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
+#ifndef LLVM_MCA_EXECUTE_STAGE_H
+#define LLVM_MCA_EXECUTE_STAGE_H
 
-#include "HardwareUnits/Scheduler.h"
-#include "Instruction.h"
-#include "Stages/Stage.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
+#include "llvm/MCA/Instruction.h"
+#include "llvm/MCA/Stages/Stage.h"
 
 namespace llvm {
 namespace mca {
@@ -77,4 +77,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
+#endif // LLVM_MCA_EXECUTE_STAGE_H
similarity index 83%
rename from tools/llvm-mca/include/Stages/InstructionTables.h
rename to include/llvm/MCA/Stages/InstructionTables.h
index e618d06b1b74740a23bb7eb48650390c03d6bc0c..50f84fc6fff94c9c455e52a26c6dbe7716e3ab70 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_INSTRUCTIONTABLES_H
-#define LLVM_TOOLS_LLVM_MCA_INSTRUCTIONTABLES_H
+#ifndef LLVM_MCA_INSTRUCTIONTABLES_H
+#define LLVM_MCA_INSTRUCTIONTABLES_H
 
-#include "HardwareUnits/Scheduler.h"
-#include "Stages/Stage.h"
-#include "Support.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/MC/MCSchedule.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
+#include "llvm/MCA/Stages/Stage.h"
+#include "llvm/MCA/Support.h"
 
 namespace llvm {
 namespace mca {
@@ -42,4 +42,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_INSTRUCTIONTABLES_H
similarity index 84%
rename from tools/llvm-mca/include/Stages/RetireStage.h
rename to include/llvm/MCA/Stages/RetireStage.h
index 28eda40984f36caf3bb19415a7c3545b565af8bf..2051ce5c86adf990ee87f4f3b1acffbf807c9a46 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
-#define LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
+#ifndef LLVM_MCA_RETIRE_STAGE_H
+#define LLVM_MCA_RETIRE_STAGE_H
 
-#include "HardwareUnits/RegisterFile.h"
-#include "HardwareUnits/RetireControlUnit.h"
-#include "Stages/Stage.h"
+#include "llvm/MCA/HardwareUnits/RegisterFile.h"
+#include "llvm/MCA/HardwareUnits/RetireControlUnit.h"
+#include "llvm/MCA/Stages/Stage.h"
 
 namespace llvm {
 namespace mca {
@@ -45,4 +45,4 @@ public:
 } // namespace mca
 } // namespace llvm
 
-#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
+#endif // LLVM_MCA_RETIRE_STAGE_H
similarity index 94%
rename from tools/llvm-mca/include/Stages/Stage.h
rename to include/llvm/MCA/Stages/Stage.h
index 5665fc453bfcae42279b63ad8401a3cc88633614..fc7ab569bb0f73a30566c75309e8263e126df4c8 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_STAGE_H
-#define LLVM_TOOLS_LLVM_MCA_STAGE_H
+#ifndef LLVM_MCA_STAGE_H
+#define LLVM_MCA_STAGE_H
 
-#include "HWEventListener.h"
+#include "llvm/MCA/HWEventListener.h"
 #include "llvm/Support/Error.h"
 #include <set>
 
@@ -85,4 +85,4 @@ public:
 
 } // namespace mca
 } // namespace llvm
-#endif // LLVM_TOOLS_LLVM_MCA_STAGE_H
+#endif // LLVM_MCA_STAGE_H
similarity index 98%
rename from tools/llvm-mca/include/Support.h
rename to include/llvm/MCA/Support.h
index e7a4e33ed74ecdfc8ae4e5381e693b90d473c25c..5c5a35454330b70ee32fbf194d3956f9f127e4a1 100644 (file)
@@ -12,8 +12,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TOOLS_LLVM_MCA_SUPPORT_H
-#define LLVM_TOOLS_LLVM_MCA_SUPPORT_H
+#ifndef LLVM_MCA_SUPPORT_H
+#define LLVM_MCA_SUPPORT_H
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/SmallVector.h"
@@ -116,4 +116,4 @@ double computeBlockRThroughput(const MCSchedModel &SM, unsigned DispatchWidth,
 } // namespace mca
 } // namespace llvm
 
-#endif
+#endif // LLVM_MCA_SUPPORT_H
index d45dc7c400893f4192f17f32deb93e5c6ecbdb34..f25c7a098558574e40d97f8e55102df491b3865d 100644 (file)
@@ -12,6 +12,7 @@ add_subdirectory(Linker)
 add_subdirectory(Analysis)
 add_subdirectory(LTO)
 add_subdirectory(MC)
+add_subdirectory(MCA)
 add_subdirectory(Object)
 add_subdirectory(ObjectYAML)
 add_subdirectory(Option)
index 2f6628e318f5f6d096beb260eec9e7d11f679231..d87bf797161bea615d6f2402bda9f3d9849f1f05 100644 (file)
@@ -31,6 +31,7 @@ subdirectories =
  IRReader
  LTO
  MC
+ MCA
  Object
  BinaryFormat
  ObjectYAML
similarity index 62%
rename from tools/llvm-mca/lib/CMakeLists.txt
rename to lib/MCA/CMakeLists.txt
index 21b6e34cc7e17739e9fe702f7a3f637b1b80af54..bfd0782d1f7d5012b8f6798c8109eab278e38ba3 100644 (file)
@@ -1,7 +1,4 @@
-include_directories(${LLVM_MCA_SOURCE_DIR}/include)
-
-add_library(LLVMMCA
-  STATIC
+add_llvm_library(LLVMMCA
   Context.cpp
   HWEventListener.cpp
   HardwareUnits/HardwareUnit.cpp
@@ -20,13 +17,7 @@ add_library(LLVMMCA
   Stages/RetireStage.cpp
   Stages/Stage.cpp
   Support.cpp
-  )
 
-llvm_update_compile_flags(LLVMMCA)
-llvm_map_components_to_libnames(libs
-  MC
-  Support
+  ADDITIONAL_HEADER_DIRS
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/MCA
   )
-
-target_link_libraries(LLVMMCA ${libs})
-set_target_properties(LLVMMCA PROPERTIES FOLDER "Libraries")
similarity index 86%
rename from tools/llvm-mca/lib/Context.cpp
rename to lib/MCA/Context.cpp
index 17b992aac9cd5583c9a5ba6933e8d654397718fb..c1b197dfe2e6744fc53e2c9b05283e7da9406083 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Context.h"
-#include "HardwareUnits/RegisterFile.h"
-#include "HardwareUnits/RetireControlUnit.h"
-#include "HardwareUnits/Scheduler.h"
-#include "Stages/DispatchStage.h"
-#include "Stages/EntryStage.h"
-#include "Stages/ExecuteStage.h"
-#include "Stages/RetireStage.h"
+#include "llvm/MCA/Context.h"
+#include "llvm/MCA/HardwareUnits/RegisterFile.h"
+#include "llvm/MCA/HardwareUnits/RetireControlUnit.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
+#include "llvm/MCA/Stages/DispatchStage.h"
+#include "llvm/MCA/Stages/EntryStage.h"
+#include "llvm/MCA/Stages/ExecuteStage.h"
+#include "llvm/MCA/Stages/RetireStage.h"
 
 namespace llvm {
 namespace mca {
similarity index 94%
rename from tools/llvm-mca/lib/HWEventListener.cpp
rename to lib/MCA/HWEventListener.cpp
index 3930e2555a9ba33df5c9b42496fdc1b16e711c58..4a0e5b1754dd593761557726cf1fcfaab97af9f6 100644 (file)
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HWEventListener.h"
+#include "llvm/MCA/HWEventListener.h"
 
 namespace llvm {
 namespace mca {
similarity index 93%
rename from tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp
rename to lib/MCA/HardwareUnits/HardwareUnit.cpp
index 4e46ffacbd4044799c8a86a8916dd8455c882e3a..edd32b9c0c1ab9bbbb3d9e49e18145ee7058274b 100644 (file)
@@ -13,7 +13,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/HardwareUnit.h"
+#include "llvm/MCA/HardwareUnits/HardwareUnit.h"
 
 namespace llvm {
 namespace mca {
similarity index 98%
rename from tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp
rename to lib/MCA/HardwareUnits/LSUnit.cpp
index ed8269167febfc94250ad01583bc310a600c9bac..8895eb392b60ae92dd17aa377f4b9f03efb077f7 100644 (file)
@@ -12,8 +12,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/LSUnit.h"
-#include "Instruction.h"
+#include "llvm/MCA/HardwareUnits/LSUnit.h"
+#include "llvm/MCA/Instruction.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
similarity index 99%
rename from tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
rename to lib/MCA/HardwareUnits/RegisterFile.cpp
index f96e4cab4b97c0775c7fcc42b15edd23acc7b753..22977e5ded65b054ce6be3c4207ac05d1e98a6b2 100644 (file)
@@ -14,8 +14,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/RegisterFile.h"
-#include "Instruction.h"
+#include "llvm/MCA/HardwareUnits/RegisterFile.h"
+#include "llvm/MCA/Instruction.h"
 #include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "llvm-mca"
similarity index 99%
rename from tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp
rename to lib/MCA/HardwareUnits/ResourceManager.cpp
index f12238ab8015d90c29c51a5d99de565f9a9de1bb..b62fccdfd28d5085d4ddaf5c46b29f0c39cbd5e3 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/ResourceManager.h"
-#include "Support.h"
+#include "llvm/MCA/HardwareUnits/ResourceManager.h"
+#include "llvm/MCA/Support.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -54,7 +54,7 @@ void DefaultResourceStrategy::used(uint64_t Mask) {
     RemovedFromNextInSequence |= Mask;
     return;
   }
+
   NextInSequenceMask &= (~Mask);
   if (NextInSequenceMask)
     return;
similarity index 98%
rename from tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
rename to lib/MCA/HardwareUnits/RetireControlUnit.cpp
index bd7b411af110df06b605cca109dd7ffa81c9d49a..de9f24552c38be4190bd364fc3f7b17868ae53c8 100644 (file)
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/RetireControlUnit.h"
+#include "llvm/MCA/HardwareUnits/RetireControlUnit.h"
 #include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "llvm-mca"
similarity index 99%
rename from tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp
rename to lib/MCA/HardwareUnits/Scheduler.cpp
index f0ac59e5bc2be39abcbf1d5ad3b6786177494f98..3924ac599105aa3e803f7361568613c9c0d3f81a 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "HardwareUnits/Scheduler.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
similarity index 99%
rename from tools/llvm-mca/lib/InstrBuilder.cpp
rename to lib/MCA/InstrBuilder.cpp
index f3960826b5c057d7aacde08b6765a56e1c1d88e6..5e228a255f15348478bee979d651126bb815d769 100644 (file)
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "InstrBuilder.h"
+#include "llvm/MCA/InstrBuilder.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/MC/MCInst.h"
similarity index 99%
rename from tools/llvm-mca/lib/Instruction.cpp
rename to lib/MCA/Instruction.cpp
index 47ba2f8043af274efe47ac66646d2b6b8d7a42f4..057e95ca9990fdf967cda1c741c5e8e2ce453db7 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Instruction.h"
+#include "llvm/MCA/Instruction.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
similarity index 97%
rename from tools/llvm-mca/lib/Pipeline.cpp
rename to lib/MCA/Pipeline.cpp
index 0357124bef5b365b892013e984f4a1261f46fe5d..fd97ea624b839c4be09a0357710017973b987e84 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Pipeline.h"
-#include "HWEventListener.h"
+#include "llvm/MCA/Pipeline.h"
+#include "llvm/MCA/HWEventListener.h"
 #include "llvm/Support/Debug.h"
 
 namespace llvm {
similarity index 98%
rename from tools/llvm-mca/lib/Stages/DispatchStage.cpp
rename to lib/MCA/Stages/DispatchStage.cpp
index 838dbad22e3ad5c03ffb5d1c8fda39374bb914d0..52e04fad58e559ce3db58a850ab53e59af38ae7b 100644 (file)
@@ -16,9 +16,9 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/DispatchStage.h"
-#include "HWEventListener.h"
-#include "HardwareUnits/Scheduler.h"
+#include "llvm/MCA/Stages/DispatchStage.h"
+#include "llvm/MCA/HWEventListener.h"
+#include "llvm/MCA/HardwareUnits/Scheduler.h"
 #include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "llvm-mca"
similarity index 96%
rename from tools/llvm-mca/lib/Stages/EntryStage.cpp
rename to lib/MCA/Stages/EntryStage.cpp
index f552132cac6a36995b7ce40e74effbcaeafc8939..3325bb36f5afe91e9bcf9f04064f2029fe8975c0 100644 (file)
@@ -13,8 +13,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/EntryStage.h"
-#include "Instruction.h"
+#include "llvm/MCA/Stages/EntryStage.h"
+#include "llvm/MCA/Instruction.h"
 
 namespace llvm {
 namespace mca {
similarity index 99%
rename from tools/llvm-mca/lib/Stages/ExecuteStage.cpp
rename to lib/MCA/Stages/ExecuteStage.cpp
index 298f08a2887f951117d3a79d629ee705a8e1d66e..17f7ff7259a3e963bc5e003c011f417ab130c4e6 100644 (file)
@@ -15,7 +15,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/ExecuteStage.h"
+#include "llvm/MCA/Stages/ExecuteStage.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
 
similarity index 98%
rename from tools/llvm-mca/lib/Stages/InstructionTables.cpp
rename to lib/MCA/Stages/InstructionTables.cpp
index 33c30e7f95c0f7142b0732df0a20d858f0550cbf..f918c183aa5a0486452a4cd5dac3f80deb99f1f3 100644 (file)
@@ -15,7 +15,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/InstructionTables.h"
+#include "llvm/MCA/Stages/InstructionTables.h"
 
 namespace llvm {
 namespace mca {
similarity index 95%
rename from tools/llvm-mca/lib/Stages/RetireStage.cpp
rename to lib/MCA/Stages/RetireStage.cpp
index 47eed5f2c9c651beefae47f364ee0f9d764dda85..d6bcc518662f5323e87c2a21c93a237e328b667f 100644 (file)
@@ -14,8 +14,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/RetireStage.h"
-#include "HWEventListener.h"
+#include "llvm/MCA/Stages/RetireStage.h"
+#include "llvm/MCA/HWEventListener.h"
 #include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "llvm-mca"
similarity index 95%
rename from tools/llvm-mca/lib/Stages/Stage.cpp
rename to lib/MCA/Stages/Stage.cpp
index c3cfe47d24e19feba002cec357a148355685da91..38191645e736dab45a0543e5cf7800c74b9aaaed 100644 (file)
@@ -13,7 +13,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Stages/Stage.h"
+#include "llvm/MCA/Stages/Stage.h"
 
 namespace llvm {
 namespace mca {
similarity index 98%
rename from tools/llvm-mca/lib/Support.cpp
rename to lib/MCA/Support.cpp
index a6ff26dafb5baa49e52d1fd3291c3bd22596c712..3271bc6bf5b4f103fcd046cd5c48547dccc96f5e 100644 (file)
@@ -13,7 +13,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "Support.h"
+#include "llvm/MCA/Support.h"
 #include "llvm/MC/MCSchedule.h"
 
 namespace llvm {
index 4339d48d461831e7fe3c96c561106d069f508fb9..1fceb08c1ca3d3b18f11a4fc1f3ed4e32996428a 100644 (file)
@@ -6,6 +6,7 @@ set(LLVM_LINK_COMPONENTS
   AllTargetsDescs
   AllTargetsDisassemblers
   AllTargetsInfos
+  MCA
   MC
   MCParser
   Support
@@ -28,5 +29,3 @@ add_llvm_tool(llvm-mca
   )
 
 set(LLVM_MCA_SOURCE_DIR ${CURRENT_SOURCE_DIR})
-add_subdirectory(lib)
-target_link_libraries(llvm-mca PRIVATE LLVMMCA)
index 0afcd3129ecd2adb769562c5416eacb41eb79e3f..a704612934ff11dd490bc780db47932c797a7372 100644 (file)
@@ -19,4 +19,4 @@
 type = Tool
 name = llvm-mca
 parent = Tools
-required_libraries = MC MCParser Support all-targets
+required_libraries = MC MCA MCParser Support all-targets
index 7e426383f21bc8fd8f5d295190eaa87ca63d813b..456026e12df39fe029619e07d15794f52bd5ad68 100644 (file)
@@ -17,9 +17,9 @@
 #ifndef LLVM_TOOLS_LLVM_MCA_PIPELINEPRINTER_H
 #define LLVM_TOOLS_LLVM_MCA_PIPELINEPRINTER_H
 
-#include "Pipeline.h"
 #include "Views/View.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/MCA/Pipeline.h"
 #include "llvm/Support/raw_ostream.h"
 
 #define DEBUG_TYPE "llvm-mca"
index fdf27600c933e204cfb8aad446e7cab955c7cf58..3a7eb827c478e1b37152a3c3328cbc03113e2a2e 100644 (file)
@@ -14,8 +14,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Views/SummaryView.h"
-#include "Support.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/MCA/Support.h"
 #include "llvm/Support/Format.h"
 
 namespace llvm {
index c332bb53938ab732f535babf0d7eb79273703e58..4b82b0da0d27d6e4ace69cd3f2a9f11594a76753 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef LLVM_TOOLS_LLVM_MCA_VIEW_H
 #define LLVM_TOOLS_LLVM_MCA_VIEW_H
 
-#include "HWEventListener.h"
+#include "llvm/MCA/HWEventListener.h"
 #include "llvm/Support/raw_ostream.h"
 
 namespace llvm {
index a5edbcebc8856014ecdce8045d7849b3b8e8a5a5..310b0bfad9300fad7b68d5dbaad36d51d738b568 100644 (file)
@@ -24,8 +24,6 @@
 #include "CodeRegion.h"
 #include "CodeRegionGenerator.h"
 #include "PipelinePrinter.h"
-#include "Stages/EntryStage.h"
-#include "Stages/InstructionTables.h"
 #include "Views/DispatchStatistics.h"
 #include "Views/InstructionInfoView.h"
 #include "Views/RegisterFileStatistics.h"
 #include "Views/SchedulerStatistics.h"
 #include "Views/SummaryView.h"
 #include "Views/TimelineView.h"
-#include "include/Context.h"
-#include "include/Pipeline.h"
-#include "include/Support.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCObjectFileInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
+#include "llvm/MCA/Context.h"
+#include "llvm/MCA/Pipeline.h"
+#include "llvm/MCA/Stages/EntryStage.h"
+#include "llvm/MCA/Stages/InstructionTables.h"
+#include "llvm/MCA/Support.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ErrorOr.h"