GCC Automatic Parallel Compilation Viability Results Help Up To 3.3x
This work has been focused on being able to parallelize the compilation of large source files compared to traditionally with making use of multiple jobs from the build system for compiling multiple files in parallel. For large source files and further enhancing GCC parallelization abilities is a big win in an era of increasing core/thread counts.
Student developer Giuliano Belinassi was successful in his work and ended out the summer re-basing his patches for ideally seeing merging to trunk in the near future. In the end he found the project led to speed-ups ranging from 0.95x to 3.3x. The work is deemed ready at least in an experimental state.
A GCC branch is available (autopar_devel) with the staged code. When wanting to test compiling a file in parallel with that patched compiler, the "-fparallel-jobs=" flag can be used for specifying the number of parallel jobs.
As for the GSoC 2020 project conclusion, it highlights future work that could be done to improve the GCC compilation time on systems with large core counts:
This project can still be improved on a lot of places. For example, just by looking at the table above, we can conclude that:
* Promoting statics to globals can increase parallelism opportunity on compilation.
* Even with the IO Streaming overhead, the LTO Emulated Parallelism was faster than with our method. This means that either our partitioner is slow or we are losing time into something which can be improved.
* This can be used as a way to reduce overall compilation time in many-core machines.
See the full report for those interested in this topic. Hopefully Belinassi will continue on contributing to the GNU Compiler Collection given his successes now over the past two summers.