Creating multiple JITs on X86 in multiple threads causes multiple writes (of

the same value) to this variable. This code could be refactored, but it doesn't
matter since the old JIT is going away. Add tsan annotations to ignore the
race.

llvm-svn: 145745
This commit is contained in:
Nick Lewycky 2011-12-03 02:45:50 +00:00
parent 456809c161
commit 8fd1254a0a
1 changed files with 2 additions and 0 deletions

View File

@ -424,7 +424,9 @@ X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
TargetJITInfo::LazyResolverFn
X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
TsanIgnoreWritesBegin();
JITCompilerFunction = F;
TsanIgnoreWritesEnd();
#if defined (X86_32_JIT) && !defined (_MSC_VER)
if (Subtarget->hasSSE1())