aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContextImpl.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-19 00:37:02 +0000
committerOwen Anderson <resistor@mac.com>2009-08-19 00:37:02 +0000
commitba43a385a817d7f59e528a744dc40e44317ec739 (patch)
tree24c44eff556d950b06fac6a988cea428bc1a3a47 /lib/VMCore/LLVMContextImpl.h
parentecc67e2e1b2c13c99427510fff71d598086eb309 (diff)
Privatize part of the leak detector mechanism, which turned out to be heavily contended
when trying to run opt in parallel. This lets parallel opt crunch 403.gcc in about a third of the time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.h')
-rw-r--r--lib/VMCore/LLVMContextImpl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index aaa48ca0d4..20d410eaf8 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -16,6 +16,7 @@
#define LLVM_LLVMCONTEXT_IMPL_H
#include "ConstantsContext.h"
+#include "LeaksContext.h"
#include "TypesContext.h"
#include "llvm/LLVMContext.h"
#include "llvm/Constants.h"
@@ -134,6 +135,10 @@ public:
ConstantInt *TheTrueVal;
ConstantInt *TheFalseVal;
+ // Lock used for guarding access to the leak detector
+ sys::SmartMutex<true> LLVMObjectsLock;
+ LeakDetectorImpl<Value> LLVMObjects;
+
// Lock used for guarding access to the type maps.
sys::SmartMutex<true> TypeMapLock;