[PATCH] Add a lock() function in PassRegistry to speed up multi-thread synchronization.
Erik Eckstein
eeckstein at apple.com
Mon Mar 2 01:35:11 PST 2015
yes. When omitting the call to PassRegistry::lock() I experience the 5% increased compile time.
> On 02 Mar 2015, at 10:33, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>
>> 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