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
Loading
Please sign in to comment