[llvm-commits] [llvm] r145745 - /llvm/trunk/lib/Target/X86/X86JITInfo.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Dec 2 18:45:50 PST 2011
Author: nicholas
Date: Fri Dec 2 20:45:50 2011
New Revision: 145745
URL: http://llvm.org/viewvc/llvm-project?rev=145745&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/X86/X86JITInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=145745&r1=145744&r2=145745&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Fri Dec 2 20:45:50 2011
@@ -424,7 +424,9 @@
TargetJITInfo::LazyResolverFn
X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
+ TsanIgnoreWritesBegin();
JITCompilerFunction = F;
+ TsanIgnoreWritesEnd();
#if defined (X86_32_JIT) && !defined (_MSC_VER)
if (Subtarget->hasSSE1())
More information about the llvm-commits
mailing list