Index: CODE_OWNERS.TXT =================================================================== --- CODE_OWNERS.TXT +++ CODE_OWNERS.TXT @@ -71,7 +71,7 @@ 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 Index: include/llvm/MCA/Context.h =================================================================== --- include/llvm/MCA/Context.h +++ include/llvm/MCA/Context.h @@ -15,14 +15,15 @@ /// //===----------------------------------------------------------------------===// -#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 namespace llvm { @@ -65,4 +66,4 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_CONTEXT_H +#endif // LLVM_MCA_CONTEXT_H Index: include/llvm/MCA/HWEventListener.h =================================================================== --- include/llvm/MCA/HWEventListener.h +++ include/llvm/MCA/HWEventListener.h @@ -12,12 +12,12 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_HWEVENTLISTENER_H Index: include/llvm/MCA/HardwareUnits/HardwareUnit.h =================================================================== --- include/llvm/MCA/HardwareUnits/HardwareUnit.h +++ include/llvm/MCA/HardwareUnits/HardwareUnit.h @@ -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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H +#endif // LLVM_MCA_HARDWAREUNIT_H Index: include/llvm/MCA/HardwareUnits/LSUnit.h =================================================================== --- include/llvm/MCA/HardwareUnits/LSUnit.h +++ include/llvm/MCA/HardwareUnits/LSUnit.h @@ -13,12 +13,12 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_LSUNIT_H Index: include/llvm/MCA/HardwareUnits/RegisterFile.h =================================================================== --- include/llvm/MCA/HardwareUnits/RegisterFile.h +++ include/llvm/MCA/HardwareUnits/RegisterFile.h @@ -14,14 +14,14 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H +#endif // LLVM_MCA_REGISTER_FILE_H Index: include/llvm/MCA/HardwareUnits/ResourceManager.h =================================================================== --- include/llvm/MCA/HardwareUnits/ResourceManager.h +++ include/llvm/MCA/HardwareUnits/ResourceManager.h @@ -13,15 +13,15 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_RESOURCE_MANAGER_H +#endif // LLVM_MCA_RESOURCE_MANAGER_H Index: include/llvm/MCA/HardwareUnits/RetireControlUnit.h =================================================================== --- include/llvm/MCA/HardwareUnits/RetireControlUnit.h +++ include/llvm/MCA/HardwareUnits/RetireControlUnit.h @@ -12,12 +12,12 @@ /// //===----------------------------------------------------------------------===// -#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 namespace llvm { @@ -101,4 +101,4 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H +#endif // LLVM_MCA_RETIRE_CONTROL_UNIT_H Index: include/llvm/MCA/HardwareUnits/Scheduler.h =================================================================== --- include/llvm/MCA/HardwareUnits/Scheduler.h +++ include/llvm/MCA/HardwareUnits/Scheduler.h @@ -12,15 +12,15 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_SCHEDULER_H +#endif // LLVM_MCA_SCHEDULER_H Index: include/llvm/MCA/InstrBuilder.h =================================================================== --- include/llvm/MCA/InstrBuilder.h +++ include/llvm/MCA/InstrBuilder.h @@ -12,15 +12,15 @@ // //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_INSTRBUILDER_H Index: include/llvm/MCA/Instruction.h =================================================================== --- include/llvm/MCA/Instruction.h +++ include/llvm/MCA/Instruction.h @@ -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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_INSTRUCTION_H Index: include/llvm/MCA/Pipeline.h =================================================================== --- include/llvm/MCA/Pipeline.h +++ include/llvm/MCA/Pipeline.h @@ -13,12 +13,12 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_PIPELINE_H +#endif // LLVM_MCA_PIPELINE_H Index: include/llvm/MCA/SourceMgr.h =================================================================== --- include/llvm/MCA/SourceMgr.h +++ include/llvm/MCA/SourceMgr.h @@ -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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_SOURCEMGR_H Index: include/llvm/MCA/Stages/DispatchStage.h =================================================================== --- include/llvm/MCA/Stages/DispatchStage.h +++ include/llvm/MCA/Stages/DispatchStage.h @@ -16,16 +16,16 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H +#endif // LLVM_MCA_DISPATCH_STAGE_H Index: include/llvm/MCA/Stages/EntryStage.h =================================================================== --- include/llvm/MCA/Stages/EntryStage.h +++ include/llvm/MCA/Stages/EntryStage.h @@ -14,12 +14,12 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_FETCH_STAGE_H +#endif // LLVM_MCA_FETCH_STAGE_H Index: include/llvm/MCA/Stages/ExecuteStage.h =================================================================== --- include/llvm/MCA/Stages/ExecuteStage.h +++ include/llvm/MCA/Stages/ExecuteStage.h @@ -15,13 +15,13 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H +#endif // LLVM_MCA_EXECUTE_STAGE_H Index: include/llvm/MCA/Stages/InstructionTables.h =================================================================== --- include/llvm/MCA/Stages/InstructionTables.h +++ include/llvm/MCA/Stages/InstructionTables.h @@ -14,14 +14,14 @@ /// //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_INSTRUCTIONTABLES_H Index: include/llvm/MCA/Stages/RetireStage.h =================================================================== --- include/llvm/MCA/Stages/RetireStage.h +++ include/llvm/MCA/Stages/RetireStage.h @@ -14,12 +14,12 @@ // //===----------------------------------------------------------------------===// -#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 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H +#endif // LLVM_MCA_RETIRE_STAGE_H Index: include/llvm/MCA/Stages/Stage.h =================================================================== --- include/llvm/MCA/Stages/Stage.h +++ include/llvm/MCA/Stages/Stage.h @@ -13,10 +13,10 @@ /// //===----------------------------------------------------------------------===// -#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 @@ -85,4 +85,4 @@ } // namespace mca } // namespace llvm -#endif // LLVM_TOOLS_LLVM_MCA_STAGE_H +#endif // LLVM_MCA_STAGE_H Index: include/llvm/MCA/Support.h =================================================================== --- include/llvm/MCA/Support.h +++ include/llvm/MCA/Support.h @@ -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 @@ } // namespace mca } // namespace llvm -#endif +#endif // LLVM_MCA_SUPPORT_H Index: lib/CMakeLists.txt =================================================================== --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -12,6 +12,7 @@ add_subdirectory(Analysis) add_subdirectory(LTO) add_subdirectory(MC) +add_subdirectory(MCA) add_subdirectory(Object) add_subdirectory(ObjectYAML) add_subdirectory(Option) Index: lib/LLVMBuild.txt =================================================================== --- lib/LLVMBuild.txt +++ lib/LLVMBuild.txt @@ -31,6 +31,7 @@ IRReader LTO MC + MCA Object BinaryFormat ObjectYAML Index: lib/MCA/CMakeLists.txt =================================================================== --- lib/MCA/CMakeLists.txt +++ lib/MCA/CMakeLists.txt @@ -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 @@ 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") Index: lib/MCA/Context.cpp =================================================================== --- lib/MCA/Context.cpp +++ lib/MCA/Context.cpp @@ -15,14 +15,14 @@ /// //===----------------------------------------------------------------------===// -#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 { Index: lib/MCA/HWEventListener.cpp =================================================================== --- lib/MCA/HWEventListener.cpp +++ lib/MCA/HWEventListener.cpp @@ -12,7 +12,7 @@ /// //===----------------------------------------------------------------------===// -#include "HWEventListener.h" +#include "llvm/MCA/HWEventListener.h" namespace llvm { namespace mca { Index: lib/MCA/HardwareUnits/HardwareUnit.cpp =================================================================== --- lib/MCA/HardwareUnits/HardwareUnit.cpp +++ lib/MCA/HardwareUnits/HardwareUnit.cpp @@ -13,7 +13,7 @@ /// //===----------------------------------------------------------------------===// -#include "HardwareUnits/HardwareUnit.h" +#include "llvm/MCA/HardwareUnits/HardwareUnit.h" namespace llvm { namespace mca { Index: lib/MCA/HardwareUnits/LSUnit.cpp =================================================================== --- lib/MCA/HardwareUnits/LSUnit.cpp +++ lib/MCA/HardwareUnits/LSUnit.cpp @@ -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" Index: lib/MCA/HardwareUnits/RegisterFile.cpp =================================================================== --- lib/MCA/HardwareUnits/RegisterFile.cpp +++ lib/MCA/HardwareUnits/RegisterFile.cpp @@ -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" Index: lib/MCA/HardwareUnits/ResourceManager.cpp =================================================================== --- lib/MCA/HardwareUnits/ResourceManager.cpp +++ lib/MCA/HardwareUnits/ResourceManager.cpp @@ -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 @@ RemovedFromNextInSequence |= Mask; return; } - + NextInSequenceMask &= (~Mask); if (NextInSequenceMask) return; Index: lib/MCA/HardwareUnits/RetireControlUnit.cpp =================================================================== --- lib/MCA/HardwareUnits/RetireControlUnit.cpp +++ lib/MCA/HardwareUnits/RetireControlUnit.cpp @@ -12,7 +12,7 @@ /// //===----------------------------------------------------------------------===// -#include "HardwareUnits/RetireControlUnit.h" +#include "llvm/MCA/HardwareUnits/RetireControlUnit.h" #include "llvm/Support/Debug.h" #define DEBUG_TYPE "llvm-mca" Index: lib/MCA/HardwareUnits/Scheduler.cpp =================================================================== --- lib/MCA/HardwareUnits/Scheduler.cpp +++ lib/MCA/HardwareUnits/Scheduler.cpp @@ -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" Index: lib/MCA/InstrBuilder.cpp =================================================================== --- lib/MCA/InstrBuilder.cpp +++ lib/MCA/InstrBuilder.cpp @@ -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" Index: lib/MCA/Instruction.cpp =================================================================== --- lib/MCA/Instruction.cpp +++ lib/MCA/Instruction.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "Instruction.h" +#include "llvm/MCA/Instruction.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" Index: lib/MCA/Pipeline.cpp =================================================================== --- lib/MCA/Pipeline.cpp +++ lib/MCA/Pipeline.cpp @@ -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 { Index: lib/MCA/Stages/DispatchStage.cpp =================================================================== --- lib/MCA/Stages/DispatchStage.cpp +++ lib/MCA/Stages/DispatchStage.cpp @@ -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" Index: lib/MCA/Stages/EntryStage.cpp =================================================================== --- lib/MCA/Stages/EntryStage.cpp +++ lib/MCA/Stages/EntryStage.cpp @@ -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 { Index: lib/MCA/Stages/ExecuteStage.cpp =================================================================== --- lib/MCA/Stages/ExecuteStage.cpp +++ lib/MCA/Stages/ExecuteStage.cpp @@ -15,7 +15,7 @@ /// //===----------------------------------------------------------------------===// -#include "Stages/ExecuteStage.h" +#include "llvm/MCA/Stages/ExecuteStage.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Debug.h" Index: lib/MCA/Stages/InstructionTables.cpp =================================================================== --- lib/MCA/Stages/InstructionTables.cpp +++ lib/MCA/Stages/InstructionTables.cpp @@ -15,7 +15,7 @@ /// //===----------------------------------------------------------------------===// -#include "Stages/InstructionTables.h" +#include "llvm/MCA/Stages/InstructionTables.h" namespace llvm { namespace mca { Index: lib/MCA/Stages/RetireStage.cpp =================================================================== --- lib/MCA/Stages/RetireStage.cpp +++ lib/MCA/Stages/RetireStage.cpp @@ -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" Index: lib/MCA/Stages/Stage.cpp =================================================================== --- lib/MCA/Stages/Stage.cpp +++ lib/MCA/Stages/Stage.cpp @@ -13,7 +13,7 @@ /// //===----------------------------------------------------------------------===// -#include "Stages/Stage.h" +#include "llvm/MCA/Stages/Stage.h" namespace llvm { namespace mca { Index: lib/MCA/Support.cpp =================================================================== --- lib/MCA/Support.cpp +++ lib/MCA/Support.cpp @@ -13,7 +13,7 @@ /// //===----------------------------------------------------------------------===// -#include "Support.h" +#include "llvm/MCA/Support.h" #include "llvm/MC/MCSchedule.h" namespace llvm { Index: tools/llvm-mca/CMakeLists.txt =================================================================== --- tools/llvm-mca/CMakeLists.txt +++ tools/llvm-mca/CMakeLists.txt @@ -6,6 +6,7 @@ AllTargetsDescs AllTargetsDisassemblers AllTargetsInfos + MCA MC MCParser Support @@ -28,5 +29,3 @@ ) set(LLVM_MCA_SOURCE_DIR ${CURRENT_SOURCE_DIR}) -add_subdirectory(lib) -target_link_libraries(llvm-mca PRIVATE LLVMMCA) Index: tools/llvm-mca/LLVMBuild.txt =================================================================== --- tools/llvm-mca/LLVMBuild.txt +++ tools/llvm-mca/LLVMBuild.txt @@ -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: tools/llvm-mca/PipelinePrinter.h =================================================================== --- tools/llvm-mca/PipelinePrinter.h +++ tools/llvm-mca/PipelinePrinter.h @@ -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: tools/llvm-mca/Views/SummaryView.cpp =================================================================== --- tools/llvm-mca/Views/SummaryView.cpp +++ tools/llvm-mca/Views/SummaryView.cpp @@ -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: tools/llvm-mca/Views/View.h =================================================================== --- tools/llvm-mca/Views/View.h +++ tools/llvm-mca/Views/View.h @@ -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: tools/llvm-mca/lib/LLVMBuild.txt =================================================================== --- /dev/null +++ tools/llvm-mca/lib/LLVMBuild.txt @@ -1,22 +0,0 @@ -;===- ./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 = MC Support Index: tools/llvm-mca/llvm-mca.cpp =================================================================== --- tools/llvm-mca/llvm-mca.cpp +++ tools/llvm-mca/llvm-mca.cpp @@ -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" @@ -34,13 +32,15 @@ #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"