diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-03 02:45:50 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-03 02:45:50 +0000 |
commit | 8fd1254a0a714ba4bb038dc18fd1ab8dcff99497 (patch) | |
tree | 0396d5a4f5170a6eadf3b4e876c47fe4fbe118c9 /llvm/lib | |
parent | 456809c161a0dc18e107d520b8143b1e833a056c (diff) | |
download | bcm5719-llvm-8fd1254a0a714ba4bb038dc18fd1ab8dcff99497.tar.gz bcm5719-llvm-8fd1254a0a714ba4bb038dc18fd1ab8dcff99497.zip |
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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86JITInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp index 3f88fa69d0e..2145a331de7 100644 --- a/llvm/lib/Target/X86/X86JITInfo.cpp +++ b/llvm/lib/Target/X86/X86JITInfo.cpp @@ -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()) |