[llvm] [TableGen] Merge GlobalISel library into llvm-tblgen (PR #73634)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 02:55:43 PST 2023
https://github.com/Pierre-vh created https://github.com/llvm/llvm-project/pull/73634
This "library" isn't really necessary. The subfolder is more of a group of related files than a separate library. Moreover, Patterns.cpp uses CodeGenInstruction so we had a circular dependency.
This patch brings all of those files into the llvm-tblgen target to make things easier to manage. We can always split it back up if necessary someday.
>From c67cbb3b49aec2733c5e71f7a023a79815f28524 Mon Sep 17 00:00:00 2001
From: pvanhout <pierre.vanhoutryve at amd.com>
Date: Tue, 28 Nov 2023 11:54:44 +0100
Subject: [PATCH] [TableGen] Merge GlobalISel library into llvm-tblgen
This "library" isn't really necessary. The subfolder is more
of a group of related files than a separate library.
Moreover, Patterns.cpp uses CodeGenInstruction so we had a circular dependency.
This patch brings all of those files into the llvm-tblgen target
to make things easier to manage. We can always split it
back up if necessary someday.
---
llvm/utils/TableGen/CMakeLists.txt | 8 +++++---
llvm/utils/TableGen/GlobalISel/CMakeLists.txt | 20 -------------------
llvm/utils/TableGen/GlobalISel/Patterns.cpp | 2 +-
3 files changed, 6 insertions(+), 24 deletions(-)
delete mode 100644 llvm/utils/TableGen/GlobalISel/CMakeLists.txt
diff --git a/llvm/utils/TableGen/CMakeLists.txt b/llvm/utils/TableGen/CMakeLists.txt
index 071ea3bc07054bb..faaedf3c561d8af 100644
--- a/llvm/utils/TableGen/CMakeLists.txt
+++ b/llvm/utils/TableGen/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_subdirectory(GlobalISel)
-
add_llvm_library(LLVMTableGenCommon STATIC OBJECT EXCLUDE_FROM_ALL
Attributes.cpp
CodeGenIntrinsics.cpp
@@ -33,6 +31,10 @@ set(LLVM_LINK_COMPONENTS
add_tablegen(llvm-tblgen LLVM
DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
EXPORT LLVM
+ GlobalISel/CodeExpander.cpp
+ GlobalISel/CXXPredicates.cpp
+ GlobalISel/MatchDataInfo.cpp
+ GlobalISel/Patterns.cpp
AsmMatcherEmitter.cpp
AsmWriterEmitter.cpp
AsmWriterInst.cpp
@@ -92,5 +94,5 @@ add_tablegen(llvm-tblgen LLVM
DEPENDS
intrinsics_gen # via llvm-min-tablegen
)
-target_link_libraries(llvm-tblgen PRIVATE LLVMTableGenGlobalISel)
+target_include_directories(llvm-tblgen PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
set_target_properties(llvm-tblgen PROPERTIES FOLDER "Tablegenning")
diff --git a/llvm/utils/TableGen/GlobalISel/CMakeLists.txt b/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
deleted file mode 100644
index 7262c405839934a..000000000000000
--- a/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Support
- TableGen
- )
-
-add_llvm_library(LLVMTableGenGlobalISel STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
- CodeExpander.cpp
- CXXPredicates.cpp
- MatchDataInfo.cpp
- Patterns.cpp
-
- DEPENDS
- vt_gen
- )
-
-# Users may include its headers as "GlobalISel/*.h"
-target_include_directories(LLVMTableGenGlobalISel
- INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
- )
diff --git a/llvm/utils/TableGen/GlobalISel/Patterns.cpp b/llvm/utils/TableGen/GlobalISel/Patterns.cpp
index 0a6d05e06dca128..9186cfb0ee948f3 100644
--- a/llvm/utils/TableGen/GlobalISel/Patterns.cpp
+++ b/llvm/utils/TableGen/GlobalISel/Patterns.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "Patterns.h"
-#include "../CodeGenInstruction.h"
+#include "CodeGenInstruction.h"
#include "CXXPredicates.h"
#include "CodeExpander.h"
#include "CodeExpansions.h"
More information about the llvm-commits
mailing list