GCC 10's LTO Will Make Use Of Available CPU Cores By Default
Written by Michael Larabel in GNU on 4 August 2019 at 08:26 AM EDT. 31 Comments
GNU --
Currently when passing "-flto" for enabling Link-Time Optimizations with the GCC compiler, it defaults to using a single core/thread for carrying out the optimizations and code generation. There has been support for specifying a number of threads to use for carrying out this link-time work in parallel while finally in GCC 10 that is being enabled by default.

Recently I wrote about a proposed -flto=auto patch for GCC but the decision has been made to basically make that the default behavior. So beginning with GCC 10, when using just -flto it will default to using the detected number of CPU cores/threads available rather than just a single thread.

This change should help in speeding up the link-time optimization process for those that haven't been overriding the default. The patch was merged this week for automatically detecting the number of cores to use.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related GNU News
Popular News This Week