[PATCH] D69070: [PGO][PGSO] SizeOpts changes.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 08:42:14 PDT 2019


yamauchi marked 2 inline comments as done.
yamauchi added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineSizeOpts.cpp:29
+/// Like ProfileSummaryInfo::isColdBlock but for MachineBasicBlock.
+bool isColdBlock(const MachineBasicBlock *MBB,
+                 ProfileSummaryInfo *PSI,
----------------
davidxl wrote:
> Is it possible to expose these APIs publicly in the future ? if yes, maybe put it in llvm:: namespace.
It should be, but I don't see a need for now as it's used only here. We could do that as need arises in the future.


================
Comment at: llvm/lib/CodeGen/MachineSizeOpts.cpp:79
+namespace {
+struct MachineBasicBlockBFIAdapter {
+  static bool isFunctionColdInCallGraph(const MachineFunction *MF,
----------------
davidxl wrote:
> Is this adapter class needed? 
It is used as a template argument for shouldFuncOptimizeForSizeImpl below to allow shouldFuncOptimizeForSizeImpl to be templatized and shared between BB/BFI and MBB/MBFI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69070/new/

https://reviews.llvm.org/D69070





More information about the llvm-commits mailing list