[PATCH] Add a lock() function in PassRegistry to speed up multi-thread synchronization.
Mehdi Amini
mehdi.amini at apple.com
Mon Mar 2 01:33:39 PST 2015
> On Mar 2, 2015, at 1:32 AM, Erik Eckstein <eeckstein at apple.com> wrote:
>
>> You are mentioning 5% perf improvement in single-threaded release build, can you tell how to reproduce?
>
>
> It is reproducible in following scenario:
>
> 4 threads on a 3,2 GHz Intel Core i5
>
> A shared working queue contains ~100 independent llvm modules (each llvm module has its own LLVMContext).
> Each thread runs following loop:
>
> while queue is not empty {
>
> fetch an llvm module from the working queue
> create llvm passes
> call PassRegistry::lock()
> run the llvm passes
>
> }
This is the multi-threaded scenario isn’t it?
Thanks,
—
Mehdi
More information about the llvm-commits
mailing list