david-xl wrote: > > I don't understand, if you're saying the profile is accurate, then those > > functions are actually cold, so we should be able to mark them as optsize? > > Accurate is not black or white. The current heuristic requires certain level > of accuracy to be effective. If you make the heuristics more aggressive (like > what this patch is doing), you're raising the requirement of what can be > considered accurate, and profile not meeting that new requirement could see > regression with new heuristic. > > Whether a function is cold or not also depends on what is the calling context > and how inlining is done. All that makes function level annotation inherently > inaccurate when done before inlining. Not that we shouldn't try it, but it's > not as clear cut as it appears to be, and we need to be careful.
It will be more conservative (pre-inlining), so won't cause additional optimization suppression compared with the current PGSO. https://github.com/llvm/llvm-project/pull/69030 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits