[llvm] [FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function (PR #101298)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 23:09:11 PDT 2024
goldsteinn wrote:
> I'm not sure that smaller but more functions necessarily means more compile time, larger functions tend to exasperate superlinear compile times.
>
> Can you post a llvm-compile-time-tracker link (even though it won't necessarily show the second order effects since you tend to need FDO profiles for mark functions as cold)?
The original impact (of this exact patch):
https://llvm-compile-time-tracker.com/compare.php?from=ffcbfa46b9926bcb42dd7b1f778ada113672595c&to=85efc82366a64fbe5287b7bc9d20853b06d147f6&stat=instructions:u
A test showing the impact as second order:
https://llvm-compile-time-tracker.com/compare.php?from=eb0d0125306e201fbff49c1b00a059c95757f595&to=bb96b08e7c97548bc1242f98b18bf07ba42be1d8&stat=instructions:u
The test basically replaces the setting of `cold` to setting of `nosanitize_bounds` in the first commit but results in the same code executing in `FunctionAttrs`. As you can see in the second commit, when all I do is change the set attr to `cold` the compile time explodes.
https://github.com/llvm/llvm-project/pull/101298
More information about the llvm-commits
mailing list