Revert r73790, and replace it with a significantly less ugly solution. Rather than trying to make the global reader-writer lock work,

create separate recursive mutexes for each value map.  The recursive-ness fixes the double-acquiring issue, which having one per ValueMap
lets us continue to maintain some concurrency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-06-20 00:24:58 +00:00
parent d5fb790613
commit 04fb7c36a9
7 changed files with 356 additions and 475 deletions

View File

@@ -61,7 +61,7 @@ protected:
public:
/// Static constructor to get a '0' constant of arbitrary type...
///
static Constant *getNullValue(const Type *Ty, bool locked = true);
static Constant *getNullValue(const Type *Ty);
/// Static constructor to get a '-1' constant. This supports integers and
/// vectors.
@@ -107,9 +107,7 @@ public:
/// available cached constants. Implementations should call
/// destroyConstantImpl as the last thing they do, to destroy all users and
/// delete this.
virtual void destroyConstant(bool locked = true) {
assert(0 && "Not reached!");
}
virtual void destroyConstant() { assert(0 && "Not reached!"); }
//// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Constant *) { return true; }