Clang LTO Patches Updated For The Linux Kernel

Sami Tolvanen of Google sent out the second version of their patches for Clang LTO support with the Linux kernel. These patches allow making use of Clang's link-time optimizations for building Linux x86_64 and AArch64 (ARM64) Linux kernels.
Employing LTO for the Linux kernel has beneficial performance advantages as well as the possibility of smaller binaries and in the case of Clang can benefit from the Control-Flow Integrity support. In the patches Google notes they already ship "millions of Pixel devices" with the Linux kernel built using LTO+CFI since 2018.
The new patches for Clang LTO'ing the Linux kernel include various fixes and other improvements.
Given the heavy interest in compiler optimizations for the Linux kernel, hopefully these Clang LTO patches will manage to make it mainline sooner rather than later. When it happens, I'll surely be running some benchmarks on my end.
3 Comments