[PATCH] D59514: [PGO] Profile guided code size optimization.
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 14:42:59 PDT 2019
eraman added inline comments.
================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:335
+ assert(BFI);
+ if (!hasProfileSummary())
+ return false;
----------------
This check is not needed as isFunctionColdInCallGraph first checks if summary is available.
I am not convinced this shouldOptimizeForSize belongs to ProfileSummaryInfo but I don't have any good suggestions. One possibility is to keep the flag in PassBuilder and pass it to individual passes which then check the boolean and isFunctionColdInCallGraph. Or perhaps add a pass that annotates OptForSize attribute on functions based on profile data? (that will still not help with the BB version of this function). Thoughts?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59514/new/
https://reviews.llvm.org/D59514
More information about the llvm-commits
mailing list