[PATCH] D114122: [CMake] Add new cmake option to control adding comments in GenDAGISel
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 10:11:41 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1db1cb028db5: [CMake] Add new cmake option to control adding comments in GenDAGISel (authored by lei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114122/new/
https://reviews.llvm.org/D114122
Files:
llvm/CMakeLists.txt
llvm/cmake/modules/TableGen.cmake
Index: llvm/cmake/modules/TableGen.cmake
===================================================================
--- llvm/cmake/modules/TableGen.cmake
+++ llvm/cmake/modules/TableGen.cmake
@@ -53,10 +53,7 @@
list(APPEND LLVM_TABLEGEN_FLAGS "-gisel-coverage-file=${LLVM_GISEL_COV_PREFIX}all")
endif()
endif()
- # Comments are only useful for Debug builds. Omit them if the backend
- # supports it.
- if (NOT (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
- uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO"))
+ if (LLVM_OMIT_DAGISEL_COMMENTS)
list(FIND ARGN "-gen-dag-isel" idx)
if (NOT idx EQUAL -1)
list(APPEND LLVM_TABLEGEN_FLAGS "-omit-comments")
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -646,6 +646,11 @@
set(LLVM_USE_HOST_TOOLS ON)
endif()
+option(LLVM_OMIT_DAGISEL_COMMENTS "Do not add comments to DAG ISel" ON)
+if (CMAKE_BUILD_TYPE AND uppercase_CMAKE_BUILD_TYPE MATCHES "^(RELWITHDEBINFO|DEBUG)$")
+ set(LLVM_OMIT_DAGISEL_COMMENTS OFF)
+endif()
+
if (MSVC_IDE)
option(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION "Configure project to use Visual Studio native visualizers" TRUE)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114122.389832.patch
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211125/f3e744ac/attachment.bin>
More information about the llvm-commits
mailing list