mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[PGO] Adjust -vp-counters-per-site under dynamic linking.
Addressing clang bootstrap under the dynamic linking mode running out of static allocation of value profile nodes, reported in D81682. Differential Revision: https://reviews.llvm.org/D92669
This commit is contained in:
parent
15b1228eb3
commit
a4a8865fc2
@ -917,6 +917,15 @@ if (LLVM_BUILD_INSTRUMENTED)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user