[PATCH] D59514: [PGO] Profile guided code size optimization.
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 16:05:24 PDT 2019
davidxl added a comment.
Missing unit tests for the feature.
================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:337
+ return ProfileGuidedSizeOpt && isColdBlock(BB, BFI);
+ return ProfileGuidedSizeOpt && isFunctionEntryCold(F);
+}
----------------
BB can still be 'not cold' even though the function entry is cold.
Or perhaps you should assert BB == nullptr and use
PSI->isFunctionColdInCallGraph() interface.
================
Comment at: lib/Transforms/Scalar/LoopLoadElimination.cpp:538
+ L->getHeader()->getParent()->optForSize() ||
+ (PSI && BFI && PSI->shouldOptimizeForSize(L->getHeader()->getParent(),
+ L->getHeader(), BFI));
----------------
is BFI null check needed?
================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:206
+ L->getHeader()->getParent()->optForSize() ||
+ (PSI && BFI &&
+ PSI->shouldOptimizeForSize(L->getHeader()->getParent(),
----------------
Do you need to check BFI here? It is already checked in shouldOptimizeForSize
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