[LLVM Dev] [Discussion] Function-based parallel LLVM backend code generation

Hi, community:

For the sake of our business need, I want to enable “Function-based parallel code generation” to boost up the compilation of single module, please see the details of the design and provide your feedbacks on below aspects, thanks

  1. Is this idea the proper solution for my requirement

  2. This new feature will be enabled by llc –thd=N and has no impact on original llc when –thd=1

  3. Can this new feature of llc be accepted by community and merged into LLVM code tree

Patches

The patch is divided into four separated parts, the all-in-one patch could be found here:

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

Design

https://docs.google.com/document/d/1QSkP6AumMCAVpgzwympD5pI3btPJt4SRgjY-vhyfySg/edit?usp=sharing

Function-based parallel LLVM backend code generation

Wan Xiaofei (xiaofei.wan@intel.com)

Parallel.CG.Threading.patch (5.1 KB)

Parallel.CG.AsmPrinter.patch (28.6 KB)

Parallel.CG.MultiplePM.patch (21.4 KB)

Parallel.CG.PassReentrant.patch (55.2 KB)