Re: [PATCH v6 6/7] AutoFDO: Enable machine function split optimization for AutoFDO
From: Kees Cook
Date: Mon Oct 28 2024 - 20:13:22 EST
On Fri, Oct 25, 2024 at 10:14:08PM -0700, Rong Xu wrote:
> Enable the machine function split optimization for AutoFDO in Clang.
>
> Machine function split (MFS) is a pass in the Clang compiler that
> splits a function into hot and cold parts. The linker groups all
> cold blocks across functions together. This decreases hot code
> fragmentation and improves iCache and iTLB utilization.
>
> MFS requires a profile so this is enabled only for the AutoFDO builds.
>
> Co-developed-by: Han Shen <shenhan@xxxxxxxxxx>
> Signed-off-by: Han Shen <shenhan@xxxxxxxxxx>
Reviewed-by: Kees Cook <kees@xxxxxxxxxx>
--
Kees Cook