[llvm] [MergeFunctions] Preserve instruction-level profile metadata during merging (PR #208009)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 02:36:25 PDT 2026
nikic wrote:
> Please provide an analysis of compile-time impact before reapplying.
Tested this myself. Enabling MergeFunctions: https://llvm-compile-time-tracker.com/compare.php?from=76ee189f61dfbe249159ed7e0e772b50b4eb7aeb&to=f41cbea16124dc3528ae7ec9d7c230547f7efedb&stat=instructions:u
This patch on top: https://llvm-compile-time-tracker.com/compare.php?from=f41cbea16124dc3528ae7ec9d7c230547f7efedb&to=53d3fd27387b87adc07b929ae1987d692e8a5346&stat=instructions:u So this has no measurable impact. Which is good, though I find it somewhat surprising.
Worth noting that we get a 5% size saving on clang with function merging enabled. We should probably try enabling this pass by default? At least for size-optimized builds.
https://github.com/llvm/llvm-project/pull/208009
More information about the llvm-commits
mailing list