]> granicus.if.org Git - llvm/commitdiff
[X86] Move InstPrinter files to MCTargetDesc. NFC
authorRichard Trieu <rtrieu@google.com>
Fri, 10 May 2019 23:24:38 +0000 (23:24 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 10 May 2019 23:24:38 +0000 (23:24 +0000)
For some targets, there is a circular dependency between InstPrinter and
MCTargetDesc.  Merging them together will fix this.  For the other targets,
the merging is to maintain consistency so all targets will have the same
structure.

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

22 files changed:
lib/Target/X86/AsmParser/LLVMBuild.txt
lib/Target/X86/AsmParser/X86AsmParser.cpp
lib/Target/X86/AsmParser/X86Operand.h
lib/Target/X86/CMakeLists.txt
lib/Target/X86/InstPrinter/CMakeLists.txt [deleted file]
lib/Target/X86/InstPrinter/LLVMBuild.txt [deleted file]
lib/Target/X86/LLVMBuild.txt
lib/Target/X86/MCTargetDesc/CMakeLists.txt
lib/Target/X86/MCTargetDesc/LLVMBuild.txt
lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp [moved from lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp with 99% similarity]
lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.h [moved from lib/Target/X86/InstPrinter/X86ATTInstPrinter.h with 96% similarity]
lib/Target/X86/MCTargetDesc/X86InstComments.cpp [moved from lib/Target/X86/InstPrinter/X86InstComments.cpp with 99% similarity]
lib/Target/X86/MCTargetDesc/X86InstComments.h [moved from lib/Target/X86/InstPrinter/X86InstComments.h with 86% similarity]
lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp [moved from lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp with 99% similarity]
lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.h [moved from lib/Target/X86/InstPrinter/X86InstPrinterCommon.h with 88% similarity]
lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp [moved from lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp with 99% similarity]
lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.h [moved from lib/Target/X86/InstPrinter/X86IntelInstPrinter.h with 96% similarity]
lib/Target/X86/MCTargetDesc/X86MCExpr.h
lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
lib/Target/X86/X86AsmPrinter.cpp
lib/Target/X86/X86EvexToVex.cpp
lib/Target/X86/X86MCInstLower.cpp

index e80d48cb54a0cdd8503349811e819d90391c79e1..8a7fb5b717bea09848b24da5f766a04001212b94 100644 (file)
@@ -18,5 +18,5 @@
 type = Library
 name = X86AsmParser
 parent = X86
-required_libraries = MC MCParser Support X86Desc X86Info X86AsmPrinter
+required_libraries = MC MCParser Support X86Desc X86Info
 add_to_library_groups = X86
index 30411a232ef3f9213a074d105a5119d67fa1b9b2..52f2e08f687f9aa6880f4eb2d28c7cd1ee8ba170 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "InstPrinter/X86IntelInstPrinter.h"
 #include "MCTargetDesc/X86BaseInfo.h"
+#include "MCTargetDesc/X86IntelInstPrinter.h"
 #include "MCTargetDesc/X86MCExpr.h"
 #include "MCTargetDesc/X86TargetStreamer.h"
 #include "X86AsmParserCommon.h"
index 0f489e4449749a3f5f0240b90a049955fca4d9aa..24715f7070d2e716bc92fb58b4ca548ff03bc628 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86OPERAND_H
 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86OPERAND_H
 
-#include "InstPrinter/X86IntelInstPrinter.h"
+#include "MCTargetDesc/X86IntelInstPrinter.h"
 #include "MCTargetDesc/X86MCTargetDesc.h"
 #include "X86AsmParserCommon.h"
 #include "llvm/ADT/STLExtras.h"
index c76c711e616d19d71e5e8557134dff1007df4cf5..ed34a59df4ad87a54606d3dc9d7b26842720f429 100644 (file)
@@ -74,7 +74,6 @@ add_llvm_target(X86CodeGen ${sources})
 
 add_subdirectory(AsmParser)
 add_subdirectory(Disassembler)
-add_subdirectory(InstPrinter)
 add_subdirectory(MCTargetDesc)
 add_subdirectory(TargetInfo)
 add_subdirectory(Utils)
diff --git a/lib/Target/X86/InstPrinter/CMakeLists.txt b/lib/Target/X86/InstPrinter/CMakeLists.txt
deleted file mode 100644 (file)
index a61efae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-add_llvm_library(LLVMX86AsmPrinter
-  X86ATTInstPrinter.cpp
-  X86IntelInstPrinter.cpp
-  X86InstComments.cpp
-  X86InstPrinterCommon.cpp
-  )
diff --git a/lib/Target/X86/InstPrinter/LLVMBuild.txt b/lib/Target/X86/InstPrinter/LLVMBuild.txt
deleted file mode 100644 (file)
index 48676d4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/X86/InstPrinter/LLVMBuild.txt ---------------*- Conf -*--===;
-;
-; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-; See https://llvm.org/LICENSE.txt for license information.
-; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-;
-;===------------------------------------------------------------------------===;
-;
-; 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 = X86AsmPrinter
-parent = X86
-required_libraries = MC Support X86Utils
-add_to_library_groups = X86
index f65dde68db0ef780669d7b7af68719774d9c6bb6..bfc0eda21faf2b1a34889b3daa31eaf1c963c4e5 100644 (file)
@@ -15,7 +15,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo Utils
+subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo Utils
 
 [component_0]
 type = TargetGroup
@@ -30,5 +30,5 @@ has_jit = 1
 type = Library
 name = X86CodeGen
 parent = X86
-required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86AsmPrinter X86Desc X86Info X86Utils GlobalISel ProfileData
+required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86Desc X86Info X86Utils GlobalISel ProfileData
 add_to_library_groups = X86
index 8d0d9fa1215c793382e030a794c684fa82d1b978..18b6d0030ad66174806e400bf63d5b5e5b4a959d 100644 (file)
@@ -1,4 +1,8 @@
 add_llvm_library(LLVMX86Desc
+  X86ATTInstPrinter.cpp
+  X86IntelInstPrinter.cpp
+  X86InstComments.cpp
+  X86InstPrinterCommon.cpp
   X86AsmBackend.cpp
   X86MCTargetDesc.cpp
   X86MCAsmInfo.cpp
index 7bcf75e89d7a02e60e6170a23893c33082071c79..51548bd344bfb5164197240b4e5d71fe7415bc83 100644 (file)
@@ -18,5 +18,5 @@
 type = Library
 name = X86Desc
 parent = X86
-required_libraries = MC MCDisassembler Object Support X86AsmPrinter X86Info
+required_libraries = MC MCDisassembler Object Support X86Info X86Utils
 add_to_library_groups = X86
similarity index 99%
rename from lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
rename to lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
index ea36013681a0489cbc167882c5a18424a6326e21..ed2ee55ff2a545923c49ecf04da4c3700f86135d 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "X86ATTInstPrinter.h"
-#include "MCTargetDesc/X86BaseInfo.h"
+#include "X86BaseInfo.h"
 #include "X86InstComments.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
similarity index 96%
rename from lib/Target/X86/InstPrinter/X86ATTInstPrinter.h
rename to lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.h
index ff4e8babc5702a03cd63a217848722cf29ff2579..747ddd30a2d931a636a4e28df80dc591d87cb789 100644 (file)
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H
-#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H
+#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
+#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
 
 #include "X86InstPrinterCommon.h"
 
@@ -121,4 +121,4 @@ private:
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H
+#endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
similarity index 99%
rename from lib/Target/X86/InstPrinter/X86InstComments.cpp
rename to lib/Target/X86/MCTargetDesc/X86InstComments.cpp
index a6d07c1c5be835fabbc515aae2d1a86102b3000f..b1af31067ae090b396857dc93d74f11b0fd59469 100644 (file)
@@ -13,8 +13,8 @@
 
 #include "X86InstComments.h"
 #include "X86ATTInstPrinter.h"
-#include "MCTargetDesc/X86BaseInfo.h"
-#include "MCTargetDesc/X86MCTargetDesc.h"
+#include "X86BaseInfo.h"
+#include "X86MCTargetDesc.h"
 #include "Utils/X86ShuffleDecode.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrInfo.h"
similarity index 86%
rename from lib/Target/X86/InstPrinter/X86InstComments.h
rename to lib/Target/X86/MCTargetDesc/X86InstComments.h
index 05f1683848a89230c6d216067cc2feaac779687c..96760664012af3d06b510ab4789f632c100b9187 100644 (file)
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTCOMMENTS_H
-#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTCOMMENTS_H
+#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTCOMMENTS_H
+#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTCOMMENTS_H
 
 namespace llvm {
 
similarity index 99%
rename from lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp
rename to lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
index 85d0675154ea163ac72f7024cf3b86d5ee86abaf..878ce590550b337adf3bfe1f6606dc8d296ac9b8 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "X86InstPrinterCommon.h"
-#include "MCTargetDesc/X86BaseInfo.h"
+#include "X86BaseInfo.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrDesc.h"
similarity index 88%
rename from lib/Target/X86/InstPrinter/X86InstPrinterCommon.h
rename to lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.h
index c00d320a8f0d1a9b68cf066610aa40bb6abc9a12..03c761dbcb74cebdc93dc87a00be071eb2e0e9dd 100644 (file)
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTPRINTERCOMMON_H
-#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTPRINTERCOMMON_H
+#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H
+#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H
 
 #include "llvm/MC/MCInstPrinter.h"
 
@@ -37,4 +37,4 @@ protected:
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H
+#endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
similarity index 99%
rename from lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
rename to lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
index ba40e13f59282cf9c0f73d5f26fd3808dfeccff2..ea28bef42569d384aff7e47d2574969f98159318 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "X86IntelInstPrinter.h"
-#include "MCTargetDesc/X86BaseInfo.h"
+#include "X86BaseInfo.h"
 #include "X86InstComments.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
similarity index 96%
rename from lib/Target/X86/InstPrinter/X86IntelInstPrinter.h
rename to lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.h
index 1227bafffd0667c9ed732833db0a38e98dd50605..f32f49f7c417458ed801df10a25c097f6f831923 100644 (file)
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H
-#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H
+#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INTELINSTPRINTER_H
+#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INTELINSTPRINTER_H
 
 #include "X86InstPrinterCommon.h"
 #include "llvm/Support/raw_ostream.h"
@@ -141,4 +141,4 @@ public:
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H
+#endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INTELINSTPRINTER_H
index cbda873e92ad2560bc960896630254111f031f34..532fecd9951b95f58fc834e5699e96b6bd3bc1dd 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCEXPR_H
 #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCEXPR_H
 
-#include "InstPrinter/X86ATTInstPrinter.h"
+#include "X86ATTInstPrinter.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCExpr.h"
index 54d3c2555d1ab948f5b9326f4491aec8980d97f5..e6c698c23b35598ffb91046e5c774c1a4b161dae 100644 (file)
@@ -11,9 +11,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "X86MCTargetDesc.h"
-#include "InstPrinter/X86ATTInstPrinter.h"
-#include "InstPrinter/X86IntelInstPrinter.h"
+#include "X86ATTInstPrinter.h"
 #include "X86BaseInfo.h"
+#include "X86IntelInstPrinter.h"
 #include "X86MCAsmInfo.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/Triple.h"
index 114c09bc27f50b5e1b273c63e37618836872214f..0c04f32fec18fa916007004ec7f40bf069e9f698 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "X86AsmPrinter.h"
-#include "InstPrinter/X86ATTInstPrinter.h"
+#include "MCTargetDesc/X86ATTInstPrinter.h"
 #include "MCTargetDesc/X86BaseInfo.h"
 #include "MCTargetDesc/X86TargetStreamer.h"
 #include "X86InstrInfo.h"
index a7c5bab67f9437a855be73cf959f9e455c917535..ec470889b6c95d409fc28ea74f1abdfe5b3271da 100644 (file)
@@ -19,8 +19,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "InstPrinter/X86InstComments.h"
 #include "MCTargetDesc/X86BaseInfo.h"
+#include "MCTargetDesc/X86InstComments.h"
 #include "X86.h"
 #include "X86InstrInfo.h"
 #include "X86Subtarget.h"
index 1c124dbb5570b29363f730e04c2547762e8eb67d..17a5650b96bb75afd2058c554b4a065d1b8ebb59 100644 (file)
@@ -11,9 +11,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "InstPrinter/X86ATTInstPrinter.h"
-#include "InstPrinter/X86InstComments.h"
+#include "MCTargetDesc/X86ATTInstPrinter.h"
 #include "MCTargetDesc/X86BaseInfo.h"
+#include "MCTargetDesc/X86InstComments.h"
 #include "MCTargetDesc/X86TargetStreamer.h"
 #include "Utils/X86ShuffleDecode.h"
 #include "X86AsmPrinter.h"