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

kledzik at apple.com kledzik at apple.com
Tue Apr 9 17:04:11 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.

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



More information about the llvm-commits mailing list