mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Backed out 2 changesets (bug 1616692, bug 1635933) for reftests perma failures. CLOSED TREE
Backed out changeset 7340fb8c2297 (bug 1616692) Backed out changeset 5695aa933c38 (bug 1635933)
This commit is contained in:
parent
0340dd3727
commit
6740f8e47d
@ -13,15 +13,15 @@
|
||||
"wasi-sysroot": "{MOZ_FETCHES_DIR}/wasi-sysroot",
|
||||
"patches": [
|
||||
"static-llvm-symbolizer.patch",
|
||||
"find_symbolizer_linux-clang-9.patch",
|
||||
"rename_gcov_flush-clang-9.patch",
|
||||
"find_symbolizer_linux_clang_10.patch",
|
||||
"rename_gcov_flush_clang_10.patch",
|
||||
"critical_section_on_gcov_flush-rG02ce9d8ef5a8.patch",
|
||||
"rG7e18aeba5062-clang-9.patch",
|
||||
"llvmorg-11-init-4265-g2dcbdba8540-clang-9.patch",
|
||||
"rG7e18aeba5062_clang_10.patch",
|
||||
"llvmorg-11-init-4265-g2dcbdba8540_clang_10.patch",
|
||||
"android-mangling-error.patch",
|
||||
"unpoison-thread-stacks-clang-9.patch",
|
||||
"unpoison-thread-stacks_clang_10.patch",
|
||||
"downgrade-mangling-error.patch",
|
||||
"tsan-hang-be41a98ac222-clang-9.patch",
|
||||
"tsan-hang-be41a98ac222_clang_10.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
]
|
||||
}
|
@ -22,7 +22,6 @@
|
||||
"unpoison-thread-stacks.patch",
|
||||
"downgrade-mangling-error.patch",
|
||||
"tsan-hang-be41a98ac222.patch",
|
||||
"llvmorg-11-init-14017-g02b303321d3-libclang.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
]
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
"unpoison-thread-stacks.patch",
|
||||
"downgrade-mangling-error.patch",
|
||||
"rG7e18aeba5062.patch",
|
||||
"llvmorg-10-init-5191-ga84b200e604-windows-pgo.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
]
|
||||
}
|
||||
|
@ -6,11 +6,11 @@ cannot expect llvm-symbolizer to be on PATH. Instead, we should try to look
|
||||
it up next to the binary. This patch implements the functionality for Linux
|
||||
only until there is similar functionality provided upstream.
|
||||
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
index 79930d79425..cfb4f90c0d5 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
@@ -20,6 +20,10 @@
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
index cde54bf..8daade1 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
@@ -21,6 +21,10 @@
|
||||
#include "sanitizer_common.h"
|
||||
#include "sanitizer_file.h"
|
||||
|
||||
@ -21,7 +21,7 @@ index 79930d79425..cfb4f90c0d5 100644
|
||||
namespace __sanitizer {
|
||||
|
||||
void CatastrophicErrorWrite(const char *buffer, uptr length) {
|
||||
@@ -194,6 +198,34 @@ char *FindPathToBinary(const char *name) {
|
||||
@@ -156,6 +160,34 @@ char *FindPathToBinary(const char *name) {
|
||||
if (*end == '\0') break;
|
||||
beg = end + 1;
|
||||
}
|
||||
|
@ -6,11 +6,11 @@ cannot expect llvm-symbolizer to be on PATH. Instead, we should try to look
|
||||
it up next to the binary. This patch implements the functionality for Linux
|
||||
only until there is similar functionality provided upstream.
|
||||
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
index cde54bf..8daade1 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cc
|
||||
@@ -21,6 +21,10 @@
|
||||
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
index 79930d79425..cfb4f90c0d5 100644
|
||||
--- a/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
|
||||
@@ -20,6 +20,10 @@
|
||||
#include "sanitizer_common.h"
|
||||
#include "sanitizer_file.h"
|
||||
|
||||
@ -21,7 +21,7 @@ index cde54bf..8daade1 100644
|
||||
namespace __sanitizer {
|
||||
|
||||
void CatastrophicErrorWrite(const char *buffer, uptr length) {
|
||||
@@ -156,6 +160,34 @@ char *FindPathToBinary(const char *name) {
|
||||
@@ -194,6 +198,34 @@ char *FindPathToBinary(const char *name) {
|
||||
if (*end == '\0') break;
|
||||
beg = end + 1;
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
[cmake] Changes to get Windows self-host working with PGO
|
||||
|
||||
Fixes quoting of profile arguments to work on Windows
|
||||
Suppresses adding profile arguments to linker flags when using lld-link
|
||||
Avoids -fprofile-instr-use being added to rc.exe flags
|
||||
Removes duplicated adding of -fprofile-instr-use to linker flags (since
|
||||
r355541)
|
||||
Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D62063
|
||||
|
||||
llvm-svn: 372209
|
||||
|
||||
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
|
||||
index b9a10685b99..73f8664cdcf 100644
|
||||
--- a/llvm/CMakeLists.txt
|
||||
+++ b/llvm/CMakeLists.txt
|
||||
@@ -612,6 +612,9 @@ mark_as_advanced(LLVM_TARGET_TRIPLE_ENV)
|
||||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL
|
||||
"Enable per-target runtimes directory")
|
||||
|
||||
+set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
|
||||
+ "Profiling data file to use when compiling in order to improve runtime performance.")
|
||||
+
|
||||
# All options referred to from HandleLLVMOptions have to be specified
|
||||
# BEFORE this include, otherwise options will not be correctly set on
|
||||
# first cmake run
|
||||
@@ -873,17 +876,6 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
||||
# use export_executable_symbols(target).
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
-set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
|
||||
- "Profiling data file to use when compiling in order to improve runtime performance.")
|
||||
-
|
||||
-if(LLVM_PROFDATA_FILE AND EXISTS ${LLVM_PROFDATA_FILE})
|
||||
- if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
|
||||
- add_definitions("-fprofile-instr-use=${LLVM_PROFDATA_FILE}")
|
||||
- else()
|
||||
- message(FATAL_ERROR "LLVM_PROFDATA_FILE can only be specified when compiling with clang")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
include(AddLLVM)
|
||||
include(TableGen)
|
||||
|
||||
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
|
||||
index 4425eb91a5f..2e780d56254 100644
|
||||
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
|
||||
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
|
||||
@@ -846,32 +846,48 @@ string(TOUPPER "${LLVM_BUILD_INSTRUMENTED}" uppercase_LLVM_BUILD_INSTRUMENTED)
|
||||
|
||||
if (LLVM_BUILD_INSTRUMENTED)
|
||||
if (LLVM_ENABLE_IR_PGO OR uppercase_LLVM_BUILD_INSTRUMENTED STREQUAL "IR")
|
||||
- append("-fprofile-generate='${LLVM_PROFILE_DATA_DIR}'"
|
||||
+ append("-fprofile-generate=\"${LLVM_PROFILE_DATA_DIR}\""
|
||||
CMAKE_CXX_FLAGS
|
||||
- CMAKE_C_FLAGS
|
||||
- CMAKE_EXE_LINKER_FLAGS
|
||||
- CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ CMAKE_C_FLAGS)
|
||||
+ if(NOT LINKER_IS_LLD_LINK)
|
||||
+ append("-fprofile-generate=\"${LLVM_PROFILE_DATA_DIR}\""
|
||||
+ CMAKE_EXE_LINKER_FLAGS
|
||||
+ CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ endif()
|
||||
elseif(uppercase_LLVM_BUILD_INSTRUMENTED STREQUAL "CSIR")
|
||||
- append("-fcs-profile-generate='${LLVM_CSPROFILE_DATA_DIR}'"
|
||||
+ append("-fcs-profile-generate=\"${LLVM_CSPROFILE_DATA_DIR}\""
|
||||
CMAKE_CXX_FLAGS
|
||||
- CMAKE_C_FLAGS
|
||||
- CMAKE_EXE_LINKER_FLAGS
|
||||
- CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ CMAKE_C_FLAGS)
|
||||
+ if(NOT LINKER_IS_LLD_LINK)
|
||||
+ append("-fcs-profile-generate=\"${LLVM_CSPROFILE_DATA_DIR}\""
|
||||
+ CMAKE_EXE_LINKER_FLAGS
|
||||
+ CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ endif()
|
||||
else()
|
||||
- append("-fprofile-instr-generate='${LLVM_PROFILE_FILE_PATTERN}'"
|
||||
+ append("-fprofile-instr-generate=\"${LLVM_PROFILE_FILE_PATTERN}\""
|
||||
CMAKE_CXX_FLAGS
|
||||
- CMAKE_C_FLAGS
|
||||
- CMAKE_EXE_LINKER_FLAGS
|
||||
- CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ CMAKE_C_FLAGS)
|
||||
+ if(NOT LINKER_IS_LLD_LINK)
|
||||
+ append("-fprofile-instr-generate=\"${LLVM_PROFILE_FILE_PATTERN}\""
|
||||
+ CMAKE_EXE_LINKER_FLAGS
|
||||
+ CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# Need to pass -fprofile-instr-use to linker for context-sensitive PGO
|
||||
-# compilation.
|
||||
if(LLVM_PROFDATA_FILE AND EXISTS ${LLVM_PROFDATA_FILE})
|
||||
- append("-fprofile-instr-use='${LLVM_PROFDATA_FILE}'"
|
||||
- CMAKE_EXE_LINKER_FLAGS
|
||||
- CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
|
||||
+ append("-fprofile-instr-use=\"${LLVM_PROFDATA_FILE}\""
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_C_FLAGS)
|
||||
+ if(NOT LINKER_IS_LLD_LINK)
|
||||
+ append("-fprofile-instr-use=\"${LLVM_PROFDATA_FILE}\""
|
||||
+ CMAKE_EXE_LINKER_FLAGS
|
||||
+ CMAKE_SHARED_LINKER_FLAGS)
|
||||
+ endif()
|
||||
+ else()
|
||||
+ message(FATAL_ERROR "LLVM_PROFDATA_FILE can only be specified when compiling with clang")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
option(LLVM_BUILD_INSTRUMENTED_COVERAGE "Build LLVM and tools with Code Coverage instrumentation" Off)
|
@ -1,16 +0,0 @@
|
||||
[libclang] Remove duplicate dependency on LLVMSupport
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D79451
|
||||
|
||||
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
|
||||
index bd0c945a5e1..973655361f7 100644
|
||||
--- a/clang/tools/libclang/CMakeLists.txt
|
||||
+++ b/clang/tools/libclang/CMakeLists.txt
|
||||
@@ -44,7 +44,6 @@ set(LIBS
|
||||
clangSema
|
||||
clangSerialization
|
||||
clangTooling
|
||||
- LLVMSupport
|
||||
)
|
||||
|
||||
if (CLANG_ENABLE_ARCMT)
|
@ -1,8 +1,8 @@
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
index 8aea1e4ec05..a623f4fe589 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
@@ -1016,7 +1016,7 @@ TSAN_INTERCEPTOR(int, pthread_create,
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
index 9a184c79798..733decfe52c 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
@@ -1021,7 +1021,7 @@ TSAN_INTERCEPTOR(int, pthread_create,
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
SCOPED_INTERCEPTOR_RAW(pthread_join, th, ret);
|
||||
@ -11,7 +11,7 @@ index 8aea1e4ec05..a623f4fe589 100644
|
||||
ThreadIgnoreBegin(thr, pc);
|
||||
int res = BLOCK_REAL(pthread_join)(th, ret);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
@@ -1029,8 +1029,8 @@ TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
@@ -1034,8 +1034,8 @@ TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
DEFINE_REAL_PTHREAD_FUNCTIONS
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_detach, void *th) {
|
||||
@ -22,7 +22,7 @@ index 8aea1e4ec05..a623f4fe589 100644
|
||||
int res = REAL(pthread_detach)(th);
|
||||
if (res == 0) {
|
||||
ThreadDetach(thr, pc, tid);
|
||||
@@ -1050,8 +1050,8 @@ TSAN_INTERCEPTOR(void, pthread_exit, void *retval) {
|
||||
@@ -1055,8 +1055,8 @@ TSAN_INTERCEPTOR(void, pthread_exit, void *retval) {
|
||||
|
||||
#if SANITIZER_LINUX
|
||||
TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
@ -33,7 +33,7 @@ index 8aea1e4ec05..a623f4fe589 100644
|
||||
ThreadIgnoreBegin(thr, pc);
|
||||
int res = REAL(pthread_tryjoin_np)(th, ret);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
@@ -1064,8 +1064,8 @@ TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
@@ -1069,8 +1069,8 @@ TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_timedjoin_np, void *th, void **ret,
|
||||
const struct timespec *abstime) {
|
||||
@ -45,10 +45,10 @@ index 8aea1e4ec05..a623f4fe589 100644
|
||||
int res = BLOCK_REAL(pthread_timedjoin_np)(th, ret, abstime);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.h b/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
index c38fc43a9f8..20f7a99157a 100644
|
||||
index 3a8231bda9a..30e144fbd00 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
@@ -775,7 +775,7 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached);
|
||||
@@ -772,7 +772,7 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached);
|
||||
void ThreadStart(ThreadState *thr, int tid, tid_t os_id,
|
||||
ThreadType thread_type);
|
||||
void ThreadFinish(ThreadState *thr);
|
||||
@ -57,10 +57,10 @@ index c38fc43a9f8..20f7a99157a 100644
|
||||
void ThreadJoin(ThreadState *thr, uptr pc, int tid);
|
||||
void ThreadDetach(ThreadState *thr, uptr pc, int tid);
|
||||
void ThreadFinalize(ThreadState *thr);
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
index 0ac1ee99c47..f7068f0d331 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
index fd95cfed4f5..13e457bd770 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
@@ -285,19 +285,34 @@ void ThreadFinish(ThreadState *thr) {
|
||||
ctx->thread_registry->FinishThread(thr->tid);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
index 9a184c79798..733decfe52c 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
|
||||
@@ -1021,7 +1021,7 @@ TSAN_INTERCEPTOR(int, pthread_create,
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
index 8aea1e4ec05..a623f4fe589 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
|
||||
@@ -1016,7 +1016,7 @@ TSAN_INTERCEPTOR(int, pthread_create,
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
SCOPED_INTERCEPTOR_RAW(pthread_join, th, ret);
|
||||
@ -11,7 +11,7 @@ index 9a184c79798..733decfe52c 100644
|
||||
ThreadIgnoreBegin(thr, pc);
|
||||
int res = BLOCK_REAL(pthread_join)(th, ret);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
@@ -1034,8 +1034,8 @@ TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
@@ -1029,8 +1029,8 @@ TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
|
||||
DEFINE_REAL_PTHREAD_FUNCTIONS
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_detach, void *th) {
|
||||
@ -22,7 +22,7 @@ index 9a184c79798..733decfe52c 100644
|
||||
int res = REAL(pthread_detach)(th);
|
||||
if (res == 0) {
|
||||
ThreadDetach(thr, pc, tid);
|
||||
@@ -1055,8 +1055,8 @@ TSAN_INTERCEPTOR(void, pthread_exit, void *retval) {
|
||||
@@ -1050,8 +1050,8 @@ TSAN_INTERCEPTOR(void, pthread_exit, void *retval) {
|
||||
|
||||
#if SANITIZER_LINUX
|
||||
TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
@ -33,7 +33,7 @@ index 9a184c79798..733decfe52c 100644
|
||||
ThreadIgnoreBegin(thr, pc);
|
||||
int res = REAL(pthread_tryjoin_np)(th, ret);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
@@ -1069,8 +1069,8 @@ TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
@@ -1064,8 +1064,8 @@ TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) {
|
||||
|
||||
TSAN_INTERCEPTOR(int, pthread_timedjoin_np, void *th, void **ret,
|
||||
const struct timespec *abstime) {
|
||||
@ -45,10 +45,10 @@ index 9a184c79798..733decfe52c 100644
|
||||
int res = BLOCK_REAL(pthread_timedjoin_np)(th, ret, abstime);
|
||||
ThreadIgnoreEnd(thr, pc);
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.h b/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
index 3a8231bda9a..30e144fbd00 100644
|
||||
index c38fc43a9f8..20f7a99157a 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.h
|
||||
@@ -772,7 +772,7 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached);
|
||||
@@ -775,7 +775,7 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached);
|
||||
void ThreadStart(ThreadState *thr, int tid, tid_t os_id,
|
||||
ThreadType thread_type);
|
||||
void ThreadFinish(ThreadState *thr);
|
||||
@ -57,10 +57,10 @@ index 3a8231bda9a..30e144fbd00 100644
|
||||
void ThreadJoin(ThreadState *thr, uptr pc, int tid);
|
||||
void ThreadDetach(ThreadState *thr, uptr pc, int tid);
|
||||
void ThreadFinalize(ThreadState *thr);
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
index fd95cfed4f5..13e457bd770 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
index 0ac1ee99c47..f7068f0d331 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
|
||||
@@ -285,19 +285,34 @@ void ThreadFinish(ThreadState *thr) {
|
||||
ctx->thread_registry->FinishThread(thr->tid);
|
||||
}
|
@ -15,18 +15,21 @@ with the BB indexing at the top level to make it easier to integrate
|
||||
D69914, but possibly that's not the right choice.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D70376
|
||||
---
|
||||
llvm/lib/Analysis/LazyValueInfo.cpp | 143 +++++++++-------------------
|
||||
1 file changed, 47 insertions(+), 96 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
index bad2de9e5f5..33406a75d80 100644
|
||||
index 542ff709d47..eb51744aec3 100644
|
||||
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
@@ -136,12 +136,10 @@ namespace {
|
||||
@@ -132,12 +132,9 @@ namespace {
|
||||
/// A callback value handle updates the cache when values are erased.
|
||||
class LazyValueInfoCache;
|
||||
struct LVIValueHandle final : public CallbackVH {
|
||||
- // Needs to access getValPtr(), which is protected.
|
||||
- friend struct DenseMapInfo<LVIValueHandle>;
|
||||
|
||||
-
|
||||
LazyValueInfoCache *Parent;
|
||||
|
||||
- LVIValueHandle(Value *V, LazyValueInfoCache *P)
|
||||
@ -34,7 +37,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
: CallbackVH(V), Parent(P) { }
|
||||
|
||||
void deleted() override;
|
||||
@@ -155,89 +153,63 @@ namespace {
|
||||
@@ -151,89 +148,63 @@ namespace {
|
||||
/// This is the cache kept by LazyValueInfo which
|
||||
/// maintains information about queries across the clients' queries.
|
||||
class LazyValueInfoCache {
|
||||
@ -86,7 +89,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
- else {
|
||||
- auto It = ValueCache.find_as(Val);
|
||||
- if (It == ValueCache.end()) {
|
||||
- ValueCache[Val] = std::make_unique<ValueCacheEntryTy>(Val, this);
|
||||
- ValueCache[Val] = make_unique<ValueCacheEntryTy>(Val, this);
|
||||
- It = ValueCache.find_as(Val);
|
||||
- assert(It != ValueCache.end() && "Val was just added to the map!");
|
||||
- }
|
||||
@ -135,12 +138,12 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
|
||||
- auto I = ValueCache.find_as(V);
|
||||
- if (I == ValueCache.end())
|
||||
- return ValueLatticeElement();
|
||||
- auto BBI = I->second->BlockVals.find(BB);
|
||||
- if (BBI == I->second->BlockVals.end())
|
||||
+ auto LatticeIt = It->second.LatticeElements.find(V);
|
||||
+ if (LatticeIt == It->second.LatticeElements.end())
|
||||
return ValueLatticeElement();
|
||||
- auto BBI = I->second->BlockVals.find(BB);
|
||||
- if (BBI == I->second->BlockVals.end())
|
||||
- return ValueLatticeElement();
|
||||
- return BBI->second;
|
||||
+
|
||||
+ return LatticeIt->second;
|
||||
@ -156,7 +159,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
}
|
||||
|
||||
/// Inform the cache that a given value has been deleted.
|
||||
@@ -251,23 +223,18 @@ namespace {
|
||||
@@ -247,23 +218,18 @@ namespace {
|
||||
/// OldSucc might have (unless also overdefined in NewSucc). This just
|
||||
/// flushes elements from the cache and does not add any.
|
||||
void threadEdgeImpl(BasicBlock *OldSucc,BasicBlock *NewSucc);
|
||||
@ -186,7 +189,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
}
|
||||
|
||||
void LVIValueHandle::deleted() {
|
||||
@@ -277,18 +244,7 @@ void LVIValueHandle::deleted() {
|
||||
@@ -273,18 +239,7 @@ void LVIValueHandle::deleted() {
|
||||
}
|
||||
|
||||
void LazyValueInfoCache::eraseBlock(BasicBlock *BB) {
|
||||
@ -206,7 +209,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
}
|
||||
|
||||
void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -306,10 +262,11 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -302,10 +257,11 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
std::vector<BasicBlock*> worklist;
|
||||
worklist.push_back(OldSucc);
|
||||
|
||||
@ -221,7 +224,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
|
||||
// Use a worklist to perform a depth-first search of OldSucc's successors.
|
||||
// NOTE: We do not need a visited list since any blocks we have already
|
||||
@@ -323,10 +280,10 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -319,10 +275,10 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
if (ToUpdate == NewSucc) continue;
|
||||
|
||||
// If a value was marked overdefined in OldSucc, and is here too...
|
||||
@ -235,7 +238,7 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
|
||||
bool changed = false;
|
||||
for (Value *V : ValsToClear) {
|
||||
@@ -336,11 +293,6 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -332,11 +288,6 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
// If we removed anything, then we potentially need to update
|
||||
// blocks successors too.
|
||||
changed = true;
|
||||
@ -247,3 +250,6 @@ index bad2de9e5f5..33406a75d80 100644
|
||||
}
|
||||
|
||||
if (!changed) continue;
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
@ -15,21 +15,18 @@ with the BB indexing at the top level to make it easier to integrate
|
||||
D69914, but possibly that's not the right choice.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D70376
|
||||
---
|
||||
llvm/lib/Analysis/LazyValueInfo.cpp | 143 +++++++++-------------------
|
||||
1 file changed, 47 insertions(+), 96 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
index 542ff709d47..eb51744aec3 100644
|
||||
index bad2de9e5f5..33406a75d80 100644
|
||||
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
|
||||
@@ -132,12 +132,9 @@ namespace {
|
||||
@@ -136,12 +136,10 @@ namespace {
|
||||
/// A callback value handle updates the cache when values are erased.
|
||||
class LazyValueInfoCache;
|
||||
struct LVIValueHandle final : public CallbackVH {
|
||||
- // Needs to access getValPtr(), which is protected.
|
||||
- friend struct DenseMapInfo<LVIValueHandle>;
|
||||
-
|
||||
|
||||
LazyValueInfoCache *Parent;
|
||||
|
||||
- LVIValueHandle(Value *V, LazyValueInfoCache *P)
|
||||
@ -37,7 +34,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
: CallbackVH(V), Parent(P) { }
|
||||
|
||||
void deleted() override;
|
||||
@@ -151,89 +148,63 @@ namespace {
|
||||
@@ -155,89 +153,63 @@ namespace {
|
||||
/// This is the cache kept by LazyValueInfo which
|
||||
/// maintains information about queries across the clients' queries.
|
||||
class LazyValueInfoCache {
|
||||
@ -89,7 +86,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
- else {
|
||||
- auto It = ValueCache.find_as(Val);
|
||||
- if (It == ValueCache.end()) {
|
||||
- ValueCache[Val] = make_unique<ValueCacheEntryTy>(Val, this);
|
||||
- ValueCache[Val] = std::make_unique<ValueCacheEntryTy>(Val, this);
|
||||
- It = ValueCache.find_as(Val);
|
||||
- assert(It != ValueCache.end() && "Val was just added to the map!");
|
||||
- }
|
||||
@ -138,12 +135,12 @@ index 542ff709d47..eb51744aec3 100644
|
||||
|
||||
- auto I = ValueCache.find_as(V);
|
||||
- if (I == ValueCache.end())
|
||||
- return ValueLatticeElement();
|
||||
- auto BBI = I->second->BlockVals.find(BB);
|
||||
- if (BBI == I->second->BlockVals.end())
|
||||
+ auto LatticeIt = It->second.LatticeElements.find(V);
|
||||
+ if (LatticeIt == It->second.LatticeElements.end())
|
||||
return ValueLatticeElement();
|
||||
- auto BBI = I->second->BlockVals.find(BB);
|
||||
- if (BBI == I->second->BlockVals.end())
|
||||
- return ValueLatticeElement();
|
||||
- return BBI->second;
|
||||
+
|
||||
+ return LatticeIt->second;
|
||||
@ -159,7 +156,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
}
|
||||
|
||||
/// Inform the cache that a given value has been deleted.
|
||||
@@ -247,23 +218,18 @@ namespace {
|
||||
@@ -251,23 +223,18 @@ namespace {
|
||||
/// OldSucc might have (unless also overdefined in NewSucc). This just
|
||||
/// flushes elements from the cache and does not add any.
|
||||
void threadEdgeImpl(BasicBlock *OldSucc,BasicBlock *NewSucc);
|
||||
@ -189,7 +186,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
}
|
||||
|
||||
void LVIValueHandle::deleted() {
|
||||
@@ -273,18 +239,7 @@ void LVIValueHandle::deleted() {
|
||||
@@ -277,18 +244,7 @@ void LVIValueHandle::deleted() {
|
||||
}
|
||||
|
||||
void LazyValueInfoCache::eraseBlock(BasicBlock *BB) {
|
||||
@ -209,7 +206,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
}
|
||||
|
||||
void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -302,10 +257,11 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -306,10 +262,11 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
std::vector<BasicBlock*> worklist;
|
||||
worklist.push_back(OldSucc);
|
||||
|
||||
@ -224,7 +221,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
|
||||
// Use a worklist to perform a depth-first search of OldSucc's successors.
|
||||
// NOTE: We do not need a visited list since any blocks we have already
|
||||
@@ -319,10 +275,10 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -323,10 +280,10 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
if (ToUpdate == NewSucc) continue;
|
||||
|
||||
// If a value was marked overdefined in OldSucc, and is here too...
|
||||
@ -238,7 +235,7 @@ index 542ff709d47..eb51744aec3 100644
|
||||
|
||||
bool changed = false;
|
||||
for (Value *V : ValsToClear) {
|
||||
@@ -332,11 +288,6 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
@@ -336,11 +293,6 @@ void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
|
||||
// If we removed anything, then we potentially need to update
|
||||
// blocks successors too.
|
||||
changed = true;
|
||||
@ -250,6 +247,3 @@ index 542ff709d47..eb51744aec3 100644
|
||||
}
|
||||
|
||||
if (!changed) continue;
|
||||
--
|
||||
2.24.0
|
||||
|
@ -1,21 +1,9 @@
|
||||
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
index 220bc8f9835..4f7ce485777 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
@@ -1143,7 +1143,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
|
||||
// runtime's functionality.
|
||||
if (hasExportSymbolDirective(Args)) {
|
||||
if (ForGCOV) {
|
||||
- addExportedSymbol(CmdArgs, "___gcov_flush");
|
||||
+ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
|
||||
addExportedSymbol(CmdArgs, "_flush_fn_list");
|
||||
addExportedSymbol(CmdArgs, "_writeout_fn_list");
|
||||
} else {
|
||||
Index: compiler-rt/lib/profile/GCDAProfiling.c
|
||||
===================================================================
|
||||
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
index 498c05900bf..b7257db10e7 100644
|
||||
--- a/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
@@ -619,7 +619,7 @@ void llvm_register_flush_function(fn_ptr fn) {
|
||||
@@ -619,7 +619,7 @@
|
||||
fn_list_insert(&flush_fn_list, fn);
|
||||
}
|
||||
|
||||
@ -24,14 +12,11 @@ index 498c05900bf..b7257db10e7 100644
|
||||
struct fn_node* curr = flush_fn_list.head;
|
||||
|
||||
while (curr) {
|
||||
diff --git a/compiler-rt/test/tsan/pthread_atfork_deadlock2.c b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
new file mode 100644
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
index bf3e4ed3e31..37bdcfaeab8 100644
|
||||
index 9af64ed332c..bcebe303ff4 100644
|
||||
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
@@ -656,7 +656,7 @@ void GCOVProfiler::AddFlushBeforeForkAndExec() {
|
||||
@@ -647,7 +647,7 @@
|
||||
for (auto I : ForkAndExecs) {
|
||||
IRBuilder<> Builder(I);
|
||||
FunctionType *FTy = FunctionType::get(Builder.getVoidTy(), {}, false);
|
||||
@ -40,3 +25,16 @@ index bf3e4ed3e31..37bdcfaeab8 100644
|
||||
Builder.CreateCall(GCOVFlush);
|
||||
I->getParent()->splitBasicBlock(I);
|
||||
}
|
||||
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
index e113f9a679..b3a07b18c0 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
@@ -1122,7 +1122,7 @@
|
||||
// runtime's functionality.
|
||||
if (hasExportSymbolDirective(Args)) {
|
||||
if (needsGCovInstrumentation(Args)) {
|
||||
- addExportedSymbol(CmdArgs, "___gcov_flush");
|
||||
+ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
|
||||
addExportedSymbol(CmdArgs, "_flush_fn_list");
|
||||
addExportedSymbol(CmdArgs, "_writeout_fn_list");
|
||||
} else {
|
||||
|
@ -1,9 +1,21 @@
|
||||
Index: compiler-rt/lib/profile/GCDAProfiling.c
|
||||
===================================================================
|
||||
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
index 220bc8f9835..4f7ce485777 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
@@ -1143,7 +1143,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
|
||||
// runtime's functionality.
|
||||
if (hasExportSymbolDirective(Args)) {
|
||||
if (ForGCOV) {
|
||||
- addExportedSymbol(CmdArgs, "___gcov_flush");
|
||||
+ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
|
||||
addExportedSymbol(CmdArgs, "_flush_fn_list");
|
||||
addExportedSymbol(CmdArgs, "_writeout_fn_list");
|
||||
} else {
|
||||
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
index 498c05900bf..b7257db10e7 100644
|
||||
--- a/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
|
||||
@@ -619,7 +619,7 @@
|
||||
@@ -619,7 +619,7 @@ void llvm_register_flush_function(fn_ptr fn) {
|
||||
fn_list_insert(&flush_fn_list, fn);
|
||||
}
|
||||
|
||||
@ -12,11 +24,14 @@ diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/G
|
||||
struct fn_node* curr = flush_fn_list.head;
|
||||
|
||||
while (curr) {
|
||||
diff --git a/compiler-rt/test/tsan/pthread_atfork_deadlock2.c b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
new file mode 100644
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
index 9af64ed332c..bcebe303ff4 100644
|
||||
index bf3e4ed3e31..37bdcfaeab8 100644
|
||||
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
||||
@@ -647,7 +647,7 @@
|
||||
@@ -656,7 +656,7 @@ void GCOVProfiler::AddFlushBeforeForkAndExec() {
|
||||
for (auto I : ForkAndExecs) {
|
||||
IRBuilder<> Builder(I);
|
||||
FunctionType *FTy = FunctionType::get(Builder.getVoidTy(), {}, false);
|
||||
@ -25,16 +40,3 @@ index 9af64ed332c..bcebe303ff4 100644
|
||||
Builder.CreateCall(GCOVFlush);
|
||||
I->getParent()->splitBasicBlock(I);
|
||||
}
|
||||
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
index e113f9a679..b3a07b18c0 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
|
||||
@@ -1122,7 +1122,7 @@
|
||||
// runtime's functionality.
|
||||
if (hasExportSymbolDirective(Args)) {
|
||||
if (needsGCovInstrumentation(Args)) {
|
||||
- addExportedSymbol(CmdArgs, "___gcov_flush");
|
||||
+ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
|
||||
addExportedSymbol(CmdArgs, "_flush_fn_list");
|
||||
addExportedSymbol(CmdArgs, "_writeout_fn_list");
|
||||
} else {
|
@ -15,11 +15,11 @@ in the pthread_atfork callbacks to prevent the deadlock.
|
||||
2 files changed, 58 insertions(+)
|
||||
create mode 100644 compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
index 3f3c0cce119..5e324a0a5fd 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
@@ -494,14 +494,23 @@ int Finalize(ThreadState *thr) {
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.ccc
|
||||
index fe469faad2a2..13c9b770f50a 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
|
||||
@@ -495,14 +495,23 @@ int Finalize(ThreadState *thr) {
|
||||
void ForkBefore(ThreadState *thr, uptr pc) {
|
||||
ctx->thread_registry->Lock();
|
||||
ctx->report_mtx.Lock();
|
||||
@ -45,7 +45,7 @@ index 3f3c0cce119..5e324a0a5fd 100644
|
||||
|
||||
diff --git a/compiler-rt/test/tsan/pthread_atfork_deadlock2.c b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
new file mode 100644
|
||||
index 00000000000..700507c1e63
|
||||
index 000000000000..700507c1e637
|
||||
--- /dev/null
|
||||
+++ b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
@@ -0,0 +1,49 @@
|
||||
|
@ -15,11 +15,11 @@ in the pthread_atfork callbacks to prevent the deadlock.
|
||||
2 files changed, 58 insertions(+)
|
||||
create mode 100644 compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.ccc
|
||||
index fe469faad2a2..13c9b770f50a 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
|
||||
@@ -495,14 +495,23 @@ int Finalize(ThreadState *thr) {
|
||||
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
index 3f3c0cce119..5e324a0a5fd 100644
|
||||
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
|
||||
@@ -494,14 +494,23 @@ int Finalize(ThreadState *thr) {
|
||||
void ForkBefore(ThreadState *thr, uptr pc) {
|
||||
ctx->thread_registry->Lock();
|
||||
ctx->report_mtx.Lock();
|
||||
@ -45,7 +45,7 @@ index fe469faad2a2..13c9b770f50a 100644
|
||||
|
||||
diff --git a/compiler-rt/test/tsan/pthread_atfork_deadlock2.c b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
new file mode 100644
|
||||
index 000000000000..700507c1e637
|
||||
index 00000000000..700507c1e63
|
||||
--- /dev/null
|
||||
+++ b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
|
||||
@@ -0,0 +1,49 @@
|
@ -12,11 +12,9 @@ upstream in a different form, as the TLS handler `asan_thread_exit`, but that
|
||||
variant causes failures in our test suite, so revert the TLS handler in favor of
|
||||
the interceptor approach from the first patch.
|
||||
|
||||
diff --git a/compiler-rt/lib/asan/asan_win.cpp b/compiler-rt/lib/asan/asan_win.cpp
|
||||
index 417892aaedd..5fe86db44f4 100644
|
||||
--- a/compiler-rt/lib/asan/asan_win.cpp
|
||||
+++ b/compiler-rt/lib/asan/asan_win.cpp
|
||||
@@ -154,6 +154,14 @@ INTERCEPTOR_WINAPI(HANDLE, CreateThread, LPSECURITY_ATTRIBUTES security,
|
||||
--- a/compiler-rt/lib/asan/asan_win.cc
|
||||
+++ b/compiler-rt/lib/asan/asan_win.cc
|
||||
@@ -154,6 +154,14 @@
|
||||
thr_flags, tid);
|
||||
}
|
||||
|
||||
@ -31,7 +29,7 @@ index 417892aaedd..5fe86db44f4 100644
|
||||
// }}}
|
||||
|
||||
namespace __asan {
|
||||
@@ -168,7 +176,9 @@ void InitializePlatformInterceptors() {
|
||||
@@ -168,7 +176,9 @@
|
||||
|
||||
ASAN_INTERCEPT_FUNC(CreateThread);
|
||||
ASAN_INTERCEPT_FUNC(SetUnhandledExceptionFilter);
|
||||
@ -42,7 +40,7 @@ index 417892aaedd..5fe86db44f4 100644
|
||||
#ifdef _WIN64
|
||||
ASAN_INTERCEPT_FUNC(__C_specific_handler);
|
||||
#else
|
||||
@@ -380,19 +390,6 @@ __declspec(allocate(".CRT$XLAB")) void(NTAPI *__asan_tls_init)(
|
||||
@@ -380,19 +390,6 @@
|
||||
void *, unsigned long, void *) = asan_thread_init;
|
||||
#endif
|
||||
|
||||
@ -55,7 +53,7 @@ index 417892aaedd..5fe86db44f4 100644
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-#pragma section(".CRT$XLY", long, read)
|
||||
-#pragma section(".CRT$XLY", long, read) // NOLINT
|
||||
-__declspec(allocate(".CRT$XLY")) void(NTAPI *__asan_tls_exit)(
|
||||
- void *, unsigned long, void *) = asan_thread_exit;
|
||||
-
|
||||
|
@ -12,9 +12,11 @@ upstream in a different form, as the TLS handler `asan_thread_exit`, but that
|
||||
variant causes failures in our test suite, so revert the TLS handler in favor of
|
||||
the interceptor approach from the first patch.
|
||||
|
||||
--- a/compiler-rt/lib/asan/asan_win.cc
|
||||
+++ b/compiler-rt/lib/asan/asan_win.cc
|
||||
@@ -154,6 +154,14 @@
|
||||
diff --git a/compiler-rt/lib/asan/asan_win.cpp b/compiler-rt/lib/asan/asan_win.cpp
|
||||
index 417892aaedd..5fe86db44f4 100644
|
||||
--- a/compiler-rt/lib/asan/asan_win.cpp
|
||||
+++ b/compiler-rt/lib/asan/asan_win.cpp
|
||||
@@ -154,6 +154,14 @@ INTERCEPTOR_WINAPI(HANDLE, CreateThread, LPSECURITY_ATTRIBUTES security,
|
||||
thr_flags, tid);
|
||||
}
|
||||
|
||||
@ -29,7 +31,7 @@ the interceptor approach from the first patch.
|
||||
// }}}
|
||||
|
||||
namespace __asan {
|
||||
@@ -168,7 +176,9 @@
|
||||
@@ -168,7 +176,9 @@ void InitializePlatformInterceptors() {
|
||||
|
||||
ASAN_INTERCEPT_FUNC(CreateThread);
|
||||
ASAN_INTERCEPT_FUNC(SetUnhandledExceptionFilter);
|
||||
@ -40,7 +42,7 @@ the interceptor approach from the first patch.
|
||||
#ifdef _WIN64
|
||||
ASAN_INTERCEPT_FUNC(__C_specific_handler);
|
||||
#else
|
||||
@@ -380,19 +390,6 @@
|
||||
@@ -380,19 +390,6 @@ __declspec(allocate(".CRT$XLAB")) void(NTAPI *__asan_tls_init)(
|
||||
void *, unsigned long, void *) = asan_thread_init;
|
||||
#endif
|
||||
|
||||
@ -53,7 +55,7 @@ the interceptor approach from the first patch.
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-#pragma section(".CRT$XLY", long, read) // NOLINT
|
||||
-#pragma section(".CRT$XLY", long, read)
|
||||
-__declspec(allocate(".CRT$XLY")) void(NTAPI *__asan_tls_exit)(
|
||||
- void *, unsigned long, void *) = asan_thread_exit;
|
||||
-
|
@ -31,10 +31,9 @@ set_config('MOZ_RUST_DEFAULT_FLAGS', rust_flags)
|
||||
js_option('--disable-new-pass-manager',
|
||||
help='Use the legacy LLVM pass manager in clang builds')
|
||||
|
||||
@depends('--enable-new-pass-manager', c_compiler, host, target, 'MOZ_PGO',
|
||||
lto.enabled, enable_fuzzing, ubsan)
|
||||
def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto,
|
||||
enable_fuzzing, ubsan):
|
||||
@depends('--enable-new-pass-manager', c_compiler, host, target, 'MOZ_PGO', lto.enabled,
|
||||
enable_fuzzing)
|
||||
def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto, enable_fuzzing):
|
||||
if host.os == 'OSX':
|
||||
# Some native Mac builds hang with the new pass manager. Given the
|
||||
# inability to test in CI, don't take the risk of further breakage.
|
||||
@ -52,10 +51,6 @@ def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto,
|
||||
if enable_fuzzing and compiler.version < '10.0.0':
|
||||
# Clang 9 does not seem to play well with libFuzzer
|
||||
return None
|
||||
if ubsan and compiler.version >= '10.0.0':
|
||||
# Temporary until https://bugs.llvm.org/show_bug.cgi?id=45835 gets a
|
||||
# real fix: clang 10 hangs with some ubsan-inserted code constructs.
|
||||
return None
|
||||
if enabled and compiler.version >= '9.0.0':
|
||||
if compiler.type == 'clang':
|
||||
return ['-fexperimental-new-pass-manager']
|
||||
|
@ -1277,7 +1277,7 @@ linux64-ccov/opt:
|
||||
need-xvfb: true
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang
|
||||
- linux64-clang-9
|
||||
- linux64-rust
|
||||
- linux64-gcc-7
|
||||
- linux64-cbindgen
|
||||
|
@ -322,7 +322,7 @@ llvm-for-dsymutil:
|
||||
fetch:
|
||||
type: git
|
||||
repo: https://github.com/llvm/llvm-project
|
||||
revision: d32170dbd5b0d54436537b6b75beaf44324e0c28
|
||||
revision: 3b7811f6441be13c9f613f81ef93297d231b4f8e
|
||||
|
||||
rust-size:
|
||||
description: rust-size source code
|
||||
|
@ -43,7 +43,7 @@ macosx64-cbindgen:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-clang-9-port
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-9
|
||||
- linux64-llvm-dsymutil
|
||||
- linux64-rust-macos-1.41
|
||||
|
@ -12,18 +12,6 @@ job-defaults:
|
||||
- cctools-port
|
||||
- libtapi
|
||||
|
||||
linux64-cctools-clang-9-port:
|
||||
treeherder:
|
||||
symbol: TL(cctools-clang-9)
|
||||
run:
|
||||
script: build-cctools-port.sh
|
||||
toolchain-artifact: public/build/cctools.tar.xz
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-9
|
||||
- linux64-binutils
|
||||
|
||||
linux64-cctools-port:
|
||||
treeherder:
|
||||
symbol: TL(cctools)
|
||||
@ -31,6 +19,18 @@ linux64-cctools-port:
|
||||
script: build-cctools-port.sh
|
||||
toolchain-artifact: public/build/cctools.tar.xz
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-9
|
||||
- linux64-binutils
|
||||
|
||||
linux64-cctools-clang-10-port:
|
||||
treeherder:
|
||||
symbol: TL(cctools-clang-10)
|
||||
run:
|
||||
script: build-cctools-port.sh
|
||||
toolchain-artifact: public/build/cctools.tar.xz
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-10
|
||||
|
@ -63,7 +63,7 @@ macosx64-clang-tidy:
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-cctools-port
|
||||
- linux64-cctools-clang-10-port
|
||||
- linux64-clang-10
|
||||
- linux64-gcc-7
|
||||
- linux64-node
|
||||
|
@ -55,9 +55,10 @@ linux64-clang-9:
|
||||
using: toolchain-script
|
||||
script: build-clang.sh
|
||||
arguments:
|
||||
- 'build/build-clang/clang-9-linux64.json'
|
||||
- 'build/build-clang/clang-linux64.json'
|
||||
resources:
|
||||
- 'build/build-clang/clang-9-linux64.json'
|
||||
- 'build/build-clang/clang-linux64.json'
|
||||
toolchain-alias: linux64-clang
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
@ -116,10 +117,10 @@ linux64-clang-9-mingw-x64:
|
||||
- linux64-gcc-7
|
||||
- linux64-binutils
|
||||
|
||||
linux64-clang-10-android-cross:
|
||||
description: "Clang 10 toolchain build"
|
||||
linux64-clang-9-android-cross:
|
||||
description: "Clang 9 toolchain build"
|
||||
treeherder:
|
||||
symbol: TL(clang10-android)
|
||||
symbol: TL(clang9-android)
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: build-clang.sh
|
||||
@ -131,16 +132,16 @@ linux64-clang-10-android-cross:
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-gcc-7
|
||||
- linux64-android-ndk-linux-repack
|
||||
|
||||
linux64-clang-10-aarch64-cross:
|
||||
description: "Clang 10 toolchain build with aarch64 runtime"
|
||||
linux64-clang-9-aarch64-cross:
|
||||
description: "Clang 9 toolchain build with aarch64 runtime"
|
||||
treeherder:
|
||||
symbol: TL(clang10-aarch64)
|
||||
symbol: TL(clang9-aarch64)
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 5400
|
||||
@ -156,15 +157,15 @@ linux64-clang-10-aarch64-cross:
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-gcc-7
|
||||
|
||||
linux64-clang-10-macosx-cross:
|
||||
description: "Clang 10 toolchain build with MacOS Compiler RT libs"
|
||||
linux64-clang-9-macosx-cross:
|
||||
description: "Clang 9 toolchain build with MacOS Compiler RT libs"
|
||||
treeherder:
|
||||
symbol: TL(clang10-macosx-cross)
|
||||
symbol: TL(clang9-macosx-cross)
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
@ -182,17 +183,17 @@ linux64-clang-10-macosx-cross:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-10
|
||||
- linux64-clang-9
|
||||
- linux64-gcc-7
|
||||
|
||||
linux64-clang-10-win-cross:
|
||||
description: "Clang 10 toolchain build with Windows Compiler RT libs"
|
||||
linux64-clang-9-win-cross:
|
||||
description: "Clang 9 toolchain build with Windows Compiler RT libs"
|
||||
treeherder:
|
||||
symbol: TL(clang10-win-cross)
|
||||
symbol: TL(clang9-win-cross)
|
||||
worker-type: b-linux
|
||||
worker:
|
||||
max-run-time: 600
|
||||
@ -204,7 +205,7 @@ linux64-clang-10-win-cross:
|
||||
win64-clang-cl-2stage: toolchain-win64-clang-cl-2stage
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-10
|
||||
- linux64-clang-9
|
||||
win64-clang-cl-2stage:
|
||||
- artifact: clang.tar.bz2
|
||||
extract: false
|
||||
@ -218,10 +219,9 @@ linux64-clang-10:
|
||||
using: toolchain-script
|
||||
script: build-clang.sh
|
||||
arguments:
|
||||
- 'build/build-clang/clang-linux64.json'
|
||||
- 'build/build-clang/clang-10-linux64.json'
|
||||
resources:
|
||||
- 'build/build-clang/clang-linux64.json'
|
||||
toolchain-alias: linux64-clang
|
||||
- 'build/build-clang/clang-10-linux64.json'
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
@ -254,11 +254,11 @@ macosx64-clang:
|
||||
toolchain-artifact: public/build/clang.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-10
|
||||
- linux64-clang-9
|
||||
- linux64-gcc-7
|
||||
- linux64-node
|
||||
|
||||
@ -281,7 +281,7 @@ win64-clang-cl:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
- cmake
|
||||
- ninja
|
||||
|
||||
@ -304,6 +304,6 @@ win64-clang-cl-2stage:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
- cmake
|
||||
- ninja
|
||||
|
@ -22,7 +22,7 @@ clang-dist-toolchain:
|
||||
toolchain-artifact: public/build/clang-dist-toolchain.tar.xz
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-10
|
||||
- linux64-clang-9
|
||||
- linux64-sccache
|
||||
|
||||
rustc-dist-toolchain:
|
||||
|
@ -42,7 +42,7 @@ macosx64-fix-stacks:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-clang-9-port
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-9
|
||||
- linux64-rust-macos
|
||||
|
||||
|
@ -40,7 +40,7 @@ macosx64-gn:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-clang-9-port
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-9
|
||||
|
||||
win32-gn:
|
||||
|
@ -48,7 +48,7 @@ macosx64-minidump-stackwalk:
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-cctools-clang-9-port
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-9
|
||||
- linux64-rust-macos-1.41
|
||||
|
||||
|
@ -150,7 +150,7 @@ wasi-sysroot:
|
||||
toolchain-artifact: public/build/wasi-sysroot.tar.xz
|
||||
fetches:
|
||||
fetch:
|
||||
- clang-10
|
||||
- clang-9
|
||||
- wasi-sdk
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
|
Loading…
Reference in New Issue
Block a user