Skip to content
Commit 8c38b8b8 authored by Erik Eckstein's avatar Erik Eckstein
Browse files

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
parent 1c47111a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment