[PATCH] D92669: [PGO] Adjust -vp-counters-per-site.
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 15:29:32 PST 2020
yamauchi updated this revision to Diff 310684.
yamauchi added a comment.
Herald added a subscriber: mgorny.
Adjust only for dynamic linking mode. Rebase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92669/new/
https://reviews.llvm.org/D92669
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -917,6 +917,15 @@
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS)
endif()
+ # Set this to avoid running out of the value profile node section
+ # under clang in dynamic linking mode.
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11 AND
+ LLVM_LINK_LLVM_DYLIB)
+ append("-Xclang -mllvm -Xclang -vp-counters-per-site=1.5"
+ CMAKE_CXX_FLAGS
+ CMAKE_C_FLAGS)
+ endif()
elseif(uppercase_LLVM_BUILD_INSTRUMENTED STREQUAL "CSIR")
append("-fcs-profile-generate=\"${LLVM_CSPROFILE_DATA_DIR}\""
CMAKE_CXX_FLAGS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92669.310684.patch
Type: text/x-patch
Size: 858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201209/80484677/attachment.bin>
More information about the llvm-commits
mailing list