[PATCH] D114122: [CMake] Use NDEBUG macro to control adding comments in GenDAGISel.inc
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 15:48:44 PST 2021
lei updated this revision to Diff 388342.
lei added a comment.
Switch to using new cmake variable to control comments.
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.388342.patch
Type: text/x-patch
Size: 1255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/ec49ba79/attachment-0001.bin>
More information about the llvm-commits
mailing list