diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-18 18:28:58 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-18 18:28:58 +0000 |
commit | 4d919438898d542850449235da7f6dc55e6ca152 (patch) | |
tree | 153fa6ef67be7a7242c26df6358afe374b032e02 /lib/VMCore/LLVMContextImpl.h | |
parent | 5caba3bcb14fae4b36924463ed2bcf3846f029a9 (diff) | |
download | llvm-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.h | 6 |
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)), |