[PATCH] D146352: Split out `llvm-cg-tblgen` from `llvm-tblgen`
NAKAMURA Takumi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 06:43:31 PDT 2023
chapuni updated this revision to Diff 507345.
chapuni added a comment.
- Use `llvm-min-tblgen` for `llvm/include/llvm`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146352/new/
https://reviews.llvm.org/D146352
Files:
llvm/include/llvm/CMakeLists.txt
llvm/utils/TableGen/CMakeLists.txt
Index: llvm/utils/TableGen/CMakeLists.txt
===================================================================
--- llvm/utils/TableGen/CMakeLists.txt
+++ llvm/utils/TableGen/CMakeLists.txt
@@ -1,6 +1,18 @@
add_subdirectory(GlobalISel)
-set(LLVM_LINK_COMPONENTS Support)
+set(LLVM_LINK_COMPONENTS Support TableGen)
+
+add_llvm_executable(llvm-min-tblgen EXCLUDE_FROM_ALL
+ Attributes.cpp
+ CodeGenIntrinsics.cpp
+ DirectiveEmitter.cpp
+ IntrinsicEmitter.cpp
+ RISCVTargetDefEmitter.cpp
+ SDNodeProperties.cpp
+ TableGen.cpp
+ PARTIAL_SOURCES_INTENDED
+ )
+set_target_properties(llvm-min-tblgen PROPERTIES FOLDER "Tablegenning")
add_tablegen(llvm-tblgen LLVM
DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
@@ -8,14 +20,13 @@
AsmMatcherEmitter.cpp
AsmWriterEmitter.cpp
AsmWriterInst.cpp
- Attributes.cpp
+ CTagsEmitter.cpp
CallingConvEmitter.cpp
CodeEmitterGen.cpp
CodeGenDAGPatterns.cpp
CodeGenHwModes.cpp
CodeGenInstAlias.cpp
CodeGenInstruction.cpp
- CodeGenIntrinsics.cpp
CodeGenMapTable.cpp
CodeGenRegisters.cpp
CodeGenSchedule.cpp
@@ -28,7 +39,6 @@
DecoderEmitter.cpp
DFAEmitter.cpp
DFAPacketizerEmitter.cpp
- DirectiveEmitter.cpp
DisassemblerEmitter.cpp
DXILEmitter.cpp
ExegesisEmitter.cpp
@@ -38,7 +48,6 @@
InfoByHwMode.cpp
InstrInfoEmitter.cpp
InstrDocsEmitter.cpp
- IntrinsicEmitter.cpp
OptEmitter.cpp
OptParserEmitter.cpp
OptRSTEmitter.cpp
@@ -47,12 +56,9 @@
CompressInstEmitter.cpp
RegisterBankEmitter.cpp
RegisterInfoEmitter.cpp
- RISCVTargetDefEmitter.cpp
- SDNodeProperties.cpp
SearchableTableEmitter.cpp
SubtargetEmitter.cpp
SubtargetFeatureInfo.cpp
- TableGen.cpp
Types.cpp
VarLenCodeEmitterGen.cpp
X86DisassemblerTables.cpp
@@ -62,7 +68,7 @@
X86ModRMFilters.cpp
X86RecognizableInstr.cpp
WebAssemblyDisassemblerEmitter.cpp
- CTagsEmitter.cpp
+ $<TARGET_OBJECTS:llvm-min-tblgen>
)
target_link_libraries(llvm-tblgen PRIVATE LLVMTableGenGlobalISel)
set_target_properties(llvm-tblgen PROPERTIES FOLDER "Tablegenning")
Index: llvm/include/llvm/CMakeLists.txt
===================================================================
--- llvm/include/llvm/CMakeLists.txt
+++ llvm/include/llvm/CMakeLists.txt
@@ -1,3 +1,10 @@
+if(LLVM_TABLEGEN_TARGET STREQUAL "llvm-tblgen"
+ AND LLVM_TABLEGEN_EXE STREQUAL "llvm-tblgen"
+ AND TARGET llvm-min-tblgen)
+ set(LLVM_TABLEGEN_TARGET "llvm-min-tblgen")
+ set(LLVM_TABLEGEN_EXE "llvm-min-tblgen")
+endif()
+
add_subdirectory(IR)
add_subdirectory(Support)
add_subdirectory(Frontend)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146352.507345.patch
Type: text/x-patch
Size: 2569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230322/961e902f/attachment.bin>
More information about the llvm-commits
mailing list