[PATCH] [Core] Add parallel infrastructure to lld.

Michael Spencer bigcheesegs at gmail.com
Tue Apr 9 17:21:04 PDT 2013


  > Michael, can you add more background on where you want to go with this? On darwin the preferred way to parallelize is to use libdispatch (aka GCD). In that model, you divide up your work into small chunks as functions/lamdas/blocks, and use serial or parallel queues to have the OS (libdispatch) run them all in the correct order as efficiently as possible (see http://libdispatch.macosforge.org/trac/wiki/tutorial for a good tutorial). For instance, in this code might spin up hardware_concurrency() threads, but another process could be doing the same thing. Then you have two processes thrashing each other for cpu threads. With libdispatch you never say how many threads to use and the OS balances across processes.
  >
  > So, I'd like a design that allows lld parallelism to be layered on libdispatch for darwin.

  The executor model is designed to allow this. I did this for Windows by using ConcRT in the ConcRTExecutor class.

http://llvm-reviews.chandlerc.com/D649



More information about the llvm-commits mailing list