-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC][TableGen] Restructure TableGen Source (#80847)
Refactor of the llvm-tblgen source into: - a "Basic" library, which contains the bare minimum utilities to build `llvm-min-tablegen` - a "Common" library which contains all of the helpers for TableGen backends. Such helpers can be shared by more than one backend, and even unit tested (e.g. CodeExpander is, maybe we can add more over time) Fixes #80647
- Loading branch information
Showing
89 changed files
with
238 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The basic TableGen library contains as little dependencies as possible. | ||
# In particular, it does not depend on vt_gen -> it does not use ValueTypes. | ||
# | ||
# This library is the only thing included in `llvm-min-tablegen`. | ||
|
||
set(LLVM_LINK_COMPONENTS | ||
Support | ||
TableGen | ||
) | ||
|
||
add_llvm_library(LLVMTableGenBasic STATIC OBJECT EXCLUDE_FROM_ALL | ||
CodeGenIntrinsics.cpp | ||
SDNodeProperties.cpp | ||
) | ||
set_target_properties(LLVMTableGenBasic PROPERTIES FOLDER "Tablegenning") | ||
|
||
# Users may include its headers as "Basic/*.h" | ||
target_include_directories(LLVMTableGenBasic | ||
INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# The common library is similar to the basic library except it can | ||
# depend on vt_gen. | ||
# | ||
# This library contains the bulk of the supporting code for all | ||
# TableGen backends. It's split off as a separate library to | ||
# allow unit-testing those components. | ||
|
||
set(LLVM_LINK_COMPONENTS | ||
Support | ||
TableGen | ||
) | ||
|
||
add_llvm_library(LLVMTableGenCommon STATIC OBJECT EXCLUDE_FROM_ALL | ||
GlobalISel/CodeExpander.cpp | ||
GlobalISel/CXXPredicates.cpp | ||
GlobalISel/GlobalISelMatchTable.cpp | ||
GlobalISel/GlobalISelMatchTableExecutorEmitter.cpp | ||
GlobalISel/MatchDataInfo.cpp | ||
GlobalISel/Patterns.cpp | ||
|
||
AsmWriterInst.cpp | ||
CodeGenDAGPatterns.cpp | ||
CodeGenHwModes.cpp | ||
CodeGenInstAlias.cpp | ||
CodeGenInstruction.cpp | ||
CodeGenRegisters.cpp | ||
CodeGenSchedule.cpp | ||
CodeGenTarget.cpp | ||
DAGISelMatcher.cpp | ||
InfoByHwMode.cpp | ||
OptEmitter.cpp | ||
PredicateExpander.cpp | ||
SubtargetFeatureInfo.cpp | ||
Types.cpp | ||
VarLenCodeEmitterGen.cpp | ||
$<TARGET_OBJECTS:obj.LLVMTableGenBasic> | ||
|
||
DEPENDS | ||
vt_gen | ||
) | ||
set_target_properties(LLVMTableGenCommon PROPERTIES FOLDER "Tablegenning") | ||
target_link_libraries(LLVMTableGenCommon PUBLIC LLVMTableGenBasic) | ||
|
||
# Users may include its headers as "Common/*.h" | ||
target_include_directories(LLVMTableGenCommon | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.