> Yes, that would work. So let's discard this patch because the fix for > comdat can also fix this problem.
Unforutnately ipa-profile-estimate is an IPA pass and as such it does not have access to profile_status_to_function. You can probably just factor this out into a function that can be called and for normal FDO we call it where the loop stis now and for auto-FDO we can probably have another invocation from before early passes where auto-FDO is collected. > >>> + if (node->count) > >>> + continue; Also here we should sum the counts and consider function non unlikely executed in the same way as probably_never_executed does. I can prepare updated patch, but i am currently travelling, so i would not be disapointed if you beat me ;) Honza