[llvm] 5bc514b - [bazel] Remove the dependency on CodeGen from MCTargetDesc & Utils
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 18:21:34 PDT 2023
Author: Reid Kleckner
Date: 2023-08-30T18:21:28-07:00
New Revision: 5bc514b74eed31e797a187ce9e343e19772af29a
URL: https://github.com/llvm/llvm-project/commit/5bc514b74eed31e797a187ce9e343e19772af29a
DIFF: https://github.com/llvm/llvm-project/commit/5bc514b74eed31e797a187ce9e343e19772af29a.diff
LOG: [bazel] Remove the dependency on CodeGen from MCTargetDesc & Utils
This means llvm-mc should now build without depending on the target
CodeGen libraries.
Fix up a few includes in RISCV, AMDGPU, and X86 MCA to avoid transitive
deps on CodeGen.
Fixes #64166
Added:
Modified:
llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp
llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp
utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp b/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp
index cbe1206e649825..bf65be3fe9035e 100644
--- a/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp
+++ b/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp
@@ -13,7 +13,7 @@
#include "AMDGPUCustomBehaviour.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
-#include "SIInstrInfo.h"
+#include "Utils/AMDGPUBaseInfo.h"
#include "TargetInfo/AMDGPUTargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/WithColor.h"
diff --git a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
index 8f8684e30b3a28..70111a24c55c2d 100644
--- a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
+++ b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
@@ -14,7 +14,6 @@
#include "RISCVCustomBehaviour.h"
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "RISCV.h"
-#include "RISCVInstrInfo.h"
#include "TargetInfo/RISCVTargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp b/llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp
index 78379290aae9e7..84a3ee3ef27e08 100644
--- a/llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp
+++ b/llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp
@@ -13,7 +13,7 @@
#include "X86CustomBehaviour.h"
#include "TargetInfo/X86TargetInfo.h"
-#include "X86InstrInfo.h"
+#include "MCTargetDesc/X86BaseInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/WithColor.h"
diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index 6e71e0b2617cf5..88a0ddcf6ec71b 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -2271,9 +2271,6 @@ gentbl(
strip_include_prefix = "lib/Target/" + target["name"],
deps = [
":BinaryFormat",
- # Depending on `:CodeGen` headers in this library is almost
- # certainly a layering problem in numerous targets.
- ":CodeGen",
":CodeGenTypes",
":DebugInfoCodeView",
":MC",
More information about the llvm-commits
mailing list