[PATCH] Add a lock() function in PassRegistry to speed up multi-thread synchronization.

Erik Eckstein eeckstein at apple.com
Mon Mar 2 01:32:18 PST 2015


> 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

}


http://reviews.llvm.org/D7787

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list