GCC 10's LTO Will Make Use Of Available CPU Cores By Default
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.
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.
29 Comments