This patch enables Function Specialization by default.
Compilation Time Overhead: -------------------------- Measured the Instruction Count increase (Geomean) for CTMark from the llvm-testsuite as in https://llvm-compile-time-tracker.com. * {-O3, Non-LTO}: +0.136% Instruction Count * {-O3, LTO}: +0.346% Instruction Count Performance Uplift: ------------------- Measured +9.121% score increase for 505.mcf_r from SPEC Int 2017 (Tested on Neoverse N1 with -O3 + LTO) Correctness Testing: -------------------- * Passes bootstrap Clang with ASAN + LTO + FuncSpec aggressive options: { MaxClonesThreshold=10, SmallFunctionThreshold=10, AvgLoopIterationCount=30, SpecializeOnAddresses=true, EnableSpecializationForLiteralConstant=true, FuncSpecializationMaxIters=10 } * Builds Chromium and passes its unittests with the above options + ThinLTO. For more info please refer to https://discourse.llvm.org/t/rfc-should-we-enable-function-specialization/61518
Should this move to be a pass parameter