aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/LockFileManager.cpp
diff options
context:
space:
mode:
authorErik Eckstein <eeckstein@apple.com>2015-03-04 18:57:11 +0000
committerErik Eckstein <eeckstein@apple.com>2015-03-04 18:57:11 +0000
commit8c38b8b873e62b0b9992b757336657c11c39d1b1 (patch)
treee80c9a1764fcc95b277a57b245c853cd753da531 /llvm/lib/Support/LockFileManager.cpp
parent1c47111a8506ce2aaa564d679e931275d32e6227 (diff)
downloadllvm-8c38b8b873e62b0b9992b757336657c11c39d1b1.zip
llvm-8c38b8b873e62b0b9992b757336657c11c39d1b1.tar.gz
llvm-8c38b8b873e62b0b9992b757336657c11c39d1b1.tar.bz2
Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes. This speeds up multithreaded llvm execution by ~5% (tested with 4 threads). In an asserts build of llvm this has an even bigger impact. Note that it's not required to use the lock function. llvm-svn: 231276
Diffstat (limited to 'llvm/lib/Support/LockFileManager.cpp')
0 files changed, 0 insertions, 0 deletions