[PATCH] D67120: [PGO] Profile guided code size optimization (continued).
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 10:24:02 PDT 2019
davidxl added a comment.
SizeOpts and MachineSizeOpts changes can also be extracted into its own patch.
After this is done, the TTI change has one fewer dependency and we might figure out a way to isolate that part too..
================
Comment at: llvm/lib/CodeGen/MachineSizeOpts.cpp:28
+/// Like ProfileSummaryInfo::isColdBlock but for MachineBasicBlock.
+static bool isColdBlock(const MachineBasicBlock *MBB,
+ ProfileSummaryInfo *PSI,
----------------
I've looked at SizeOpts.h, SizeOpts.cpp, MachineSizeOpts.cpp files. I think we should refactorize the code using template to avoid duplicate logic.
This should be done similarly to BlockFrequencyInfoImpl
template <typename FuncT, typename BFIT> bool shouldOptimizeForSize(FuncT *F, ....) {
}
isColdBlock should probably refactorized in the similar way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67120/new/
https://reviews.llvm.org/D67120
More information about the llvm-commits
mailing list