summaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContextImpl.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-18 18:28:58 +0000
committerOwen Anderson <resistor@mac.com>2009-08-18 18:28:58 +0000
commit4d919438898d542850449235da7f6dc55e6ca152 (patch)
tree153fa6ef67be7a7242c26df6358afe374b032e02 /lib/VMCore/LLVMContextImpl.h
parent5caba3bcb14fae4b36924463ed2bcf3846f029a9 (diff)
downloadllvm-4d919438898d542850449235da7f6dc55e6ca152.tar.gz
llvm-4d919438898d542850449235da7f6dc55e6ca152.tar.bz2
llvm-4d919438898d542850449235da7f6dc55e6ca152.tar.xz
Privatize the ValueHandle global map. Because this is used so heavily throughout the code base, locking all accesses to
it is not practical performance-wise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.h')
-rw-r--r--lib/VMCore/LLVMContextImpl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index c0ed368bae..aaa48ca0d4 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -171,6 +171,12 @@ public:
const IntegerType *Int32Ty;
const IntegerType *Int64Ty;
+ /// ValueHandles - This map keeps track of all of the value handles that are
+ /// watching a Value*. The Value::HasValueHandle bit is used to know
+ // whether or not a value has an entry in this map.
+ typedef DenseMap<Value*, ValueHandleBase*> ValueHandlesTy;
+ ValueHandlesTy ValueHandles;
+
LLVMContextImpl(LLVMContext &C) : TheTrueVal(0), TheFalseVal(0),
VoidTy(new Type(C, Type::VoidTyID)),
LabelTy(new Type(C, Type::LabelTyID)),