[llvm] 6dbf1a1 - [X86] Move X86ShuffleDecode.cpp/h into MCTargetDesc and remove X86Utils library. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 10:14:31 PDT 2020
Author: Craig Topper
Date: 2020-04-13T10:14:08-07:00
New Revision: 6dbf1a1229ba65f65784af1fd9ca2a780f0dc8b2
URL: https://github.com/llvm/llvm-project/commit/6dbf1a1229ba65f65784af1fd9ca2a780f0dc8b2
DIFF: https://github.com/llvm/llvm-project/commit/6dbf1a1229ba65f65784af1fd9ca2a780f0dc8b2.diff
LOG: [X86] Move X86ShuffleDecode.cpp/h into MCTargetDesc and remove X86Utils library. NFC
The shuffle decoding is used by X86ISelLowering and
MCTargetDesc/X86InstComments. The latter used to be in a
separate InstPrinter library. The Utils library existed to allow
InstPrinter and CodeGen to share the shuffle decoding. Since
X86InstComments now lives in the MCTargetDesc, which CodeGen
already depends on, we can sink the shuffle decoding there as well.
Differential Revision: https://reviews.llvm.org/D77980
Added:
llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.cpp
llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.h
Modified:
llvm/lib/Target/X86/CMakeLists.txt
llvm/lib/Target/X86/LLVMBuild.txt
llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
Removed:
llvm/lib/Target/X86/Utils/CMakeLists.txt
llvm/lib/Target/X86/Utils/LLVMBuild.txt
llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
llvm/lib/Target/X86/Utils/X86ShuffleDecode.h
################################################################################
diff --git a/llvm/lib/Target/X86/CMakeLists.txt b/llvm/lib/Target/X86/CMakeLists.txt
index 5df9978bf11d..81eb3bb3bdeb 100644
--- a/llvm/lib/Target/X86/CMakeLists.txt
+++ b/llvm/lib/Target/X86/CMakeLists.txt
@@ -80,4 +80,3 @@ add_subdirectory(AsmParser)
add_subdirectory(Disassembler)
add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)
-add_subdirectory(Utils)
diff --git a/llvm/lib/Target/X86/LLVMBuild.txt b/llvm/lib/Target/X86/LLVMBuild.txt
index 5d09ced3d946..6a9d772ee760 100644
--- a/llvm/lib/Target/X86/LLVMBuild.txt
+++ b/llvm/lib/Target/X86/LLVMBuild.txt
@@ -15,7 +15,7 @@
;===------------------------------------------------------------------------===;
[common]
-subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo Utils
+subdirectories = AsmParser Disassembler MCTargetDesc TargetInfo
[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 X86Desc X86Info X86Utils GlobalISel ProfileData CFGuard
+required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86Desc X86Info GlobalISel ProfileData CFGuard
add_to_library_groups = X86
diff --git a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
index e9f675e457b1..08e0299ec872 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
@@ -3,6 +3,7 @@ add_llvm_component_library(LLVMX86Desc
X86IntelInstPrinter.cpp
X86InstComments.cpp
X86InstPrinterCommon.cpp
+ X86ShuffleDecode.cpp
X86AsmBackend.cpp
X86MCTargetDesc.cpp
X86MCAsmInfo.cpp
diff --git a/llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt b/llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
index f7891d0e51b9..7f4861c03cb8 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
+++ b/llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt
@@ -18,5 +18,5 @@
type = Library
name = X86Desc
parent = X86
-required_libraries = MC MCDisassembler Support X86Info X86Utils BinaryFormat
+required_libraries = MC MCDisassembler Support X86Info BinaryFormat
add_to_library_groups = X86
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
index 6d5bb1d76d3c..b51011e2c52f 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
@@ -15,7 +15,7 @@
#include "X86ATTInstPrinter.h"
#include "X86BaseInfo.h"
#include "X86MCTargetDesc.h"
-#include "Utils/X86ShuffleDecode.h"
+#include "X86ShuffleDecode.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.cpp
similarity index 100%
rename from llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
rename to llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.cpp
diff --git a/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h b/llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.h
similarity index 100%
rename from llvm/lib/Target/X86/Utils/X86ShuffleDecode.h
rename to llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.h
diff --git a/llvm/lib/Target/X86/Utils/CMakeLists.txt b/llvm/lib/Target/X86/Utils/CMakeLists.txt
deleted file mode 100644
index f32ead3c90d7..000000000000
--- a/llvm/lib/Target/X86/Utils/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_component_library(LLVMX86Utils
- X86ShuffleDecode.cpp
- )
diff --git a/llvm/lib/Target/X86/Utils/LLVMBuild.txt b/llvm/lib/Target/X86/Utils/LLVMBuild.txt
deleted file mode 100644
index 6460c48884bd..000000000000
--- a/llvm/lib/Target/X86/Utils/LLVMBuild.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/X86/Utils/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 = X86Utils
-parent = X86
-required_libraries = Support
-add_to_library_groups = X86
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3dce82fa7228..4b59eff47c81 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "X86ISelLowering.h"
-#include "Utils/X86ShuffleDecode.h"
+#include "MCTargetDesc/X86ShuffleDecode.h"
#include "X86CallingConv.h"
#include "X86FrameLowering.h"
#include "X86InstrBuilder.h"
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp
index 06f059a1a852..6a444116cb2c 100644
--- a/llvm/lib/Target/X86/X86MCInstLower.cpp
+++ b/llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -14,8 +14,8 @@
#include "MCTargetDesc/X86ATTInstPrinter.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86InstComments.h"
+#include "MCTargetDesc/X86ShuffleDecode.h"
#include "MCTargetDesc/X86TargetStreamer.h"
-#include "Utils/X86ShuffleDecode.h"
#include "X86AsmPrinter.h"
#include "X86RegisterInfo.h"
#include "X86ShuffleDecodeConstantPool.h"
diff --git a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
index 5da1ca275cd4..0a0322f9e13e 100644
--- a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
+++ b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "X86ShuffleDecodeConstantPool.h"
-#include "Utils/X86ShuffleDecode.h"
+#include "MCTargetDesc/X86ShuffleDecode.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/Constants.h"
More information about the llvm-commits
mailing list