diff options
author | Erik Eckstein <eeckstein@apple.com> | 2015-03-04 18:57:11 +0000 |
---|---|---|
committer | Erik Eckstein <eeckstein@apple.com> | 2015-03-04 18:57:11 +0000 |
commit | 8c38b8b873e62b0b9992b757336657c11c39d1b1 (patch) | |
tree | e80c9a1764fcc95b277a57b245c853cd753da531 /llvm/lib/Support/LockFileManager.cpp | |
parent | 1c47111a8506ce2aaa564d679e931275d32e6227 (diff) | |
download | llvm-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