Use an RWMutex instead of a Mutex in PassRegistry
alex at crichton.co
Sat Jun 29 18:52:59 PDT 2013
On Fri, Jun 28, 2013 at 10:12 AM, Alex Crichton <alex at crichton.co> wrote:
> I don't have commit access, can someone commit this for me?
> On Thu, Jun 27, 2013 at 10:29 AM, Chris Lattner <clattner at apple.com> wrote:
>> On Jun 27, 2013, at 12:27 AM, Alex Crichton <alex at crichton.co> wrote:
>>> When using a LLVM's MCJIT from multiple threads, there was a huge
>>> amount of contention in llvm::PassRegistry::getPassInfo. For the
>>> particular suite of tests I was running, moving from a Mutex to an
>>> RWMutex reduced the overall time from 6min to 20s. In both cases the
>>> single-threaded case took about 40s (not all of this time is LLVM).
More information about the llvm-commits