diff options
author | Zachary Turner <zturner@google.com> | 2014-06-20 21:07:14 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-06-20 21:07:14 +0000 |
commit | c04b892f93c5e3205dc0adb0f88df47fcefdc6d2 (patch) | |
tree | 407880f072bfd886644197a030ff2691523f3d3c /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 06f09b58f7d712a047fc1a52f86b3d4177b13844 (diff) | |
download | llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.zip llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.tar.gz llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.tar.bz2 |
Revert "Replace Execution Engine's mutex with std::recursive_mutex."
This reverts commit 1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd, due to
GCC / MinGW's lack of support for C++11 threading.
It's possible this will go back in after we come up with a
reasonable solution.
llvm-svn: 211401
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 553ceb4..9154fe2 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -166,7 +166,7 @@ void *ExecutionEngineState::RemoveMapping(const GlobalValue *ToUnmap) { } void ExecutionEngine::addGlobalMapping(const GlobalValue *GV, void *Addr) { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); DEBUG(dbgs() << "JIT: Map \'" << GV->getName() << "\' to [" << Addr << "]\n";); @@ -184,14 +184,14 @@ void ExecutionEngine::addGlobalMapping(const GlobalValue *GV, void *Addr) { } void ExecutionEngine::clearAllGlobalMappings() { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); EEState.getGlobalAddressMap().clear(); EEState.getGlobalAddressReverseMap().clear(); } void ExecutionEngine::clearGlobalMappingsFromModule(Module *M) { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI) EEState.RemoveMapping(FI); @@ -201,7 +201,7 @@ void ExecutionEngine::clearGlobalMappingsFromModule(Module *M) { } void *ExecutionEngine::updateGlobalMapping(const GlobalValue *GV, void *Addr) { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); ExecutionEngineState::GlobalAddressMapTy &Map = EEState.getGlobalAddressMap(); @@ -228,7 +228,7 @@ void *ExecutionEngine::updateGlobalMapping(const GlobalValue *GV, void *Addr) { } void *ExecutionEngine::getPointerToGlobalIfAvailable(const GlobalValue *GV) { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); ExecutionEngineState::GlobalAddressMapTy::iterator I = EEState.getGlobalAddressMap().find(GV); @@ -236,7 +236,7 @@ void *ExecutionEngine::getPointerToGlobalIfAvailable(const GlobalValue *GV) { } const GlobalValue *ExecutionEngine::getGlobalValueAtAddress(void *Addr) { - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); // If we haven't computed the reverse mapping yet, do so first. if (EEState.getGlobalAddressReverseMap().empty()) { @@ -555,7 +555,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) { if (Function *F = const_cast<Function*>(dyn_cast<Function>(GV))) return getPointerToFunction(F); - std::lock_guard<std::recursive_mutex> locked(lock); + MutexGuard locked(lock); if (void *P = EEState.getGlobalAddressMap()[GV]) return P; @@ -1346,7 +1346,7 @@ ExecutionEngineState::ExecutionEngineState(ExecutionEngine &EE) : EE(EE), GlobalAddressMap(this) { } -std::recursive_mutex * +sys::Mutex * ExecutionEngineState::AddressMapConfig::getMutex(ExecutionEngineState *EES) { return &EES->EE.lock; } |