[PATCH] D71072: [PGO][PGSO] Instrument the code gen / target passes.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 09:53:34 PST 2019


yamauchi marked an inline comment as done.
yamauchi added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2795
+    // If the global profiles indicates so, don't align it.
+    if (llvm::shouldOptimizeForSize(ChainBB, PSI, &MBFI->getMBFI()) &&
+        !TLI->alignLoopsWithOptSize())
----------------
davidxl wrote:
> This looks like a new opt-size logic -- better split out.
I don't mean this to be a new logic. It is the "per-block" version of the hasOptSize() logic at the beginning of this function (at line 2756 above). It's no different from other "hasOptSize() || shouldOptimizeForSize()" pattern except that they are separate from each other due to the existing code structure (the function-level hasOptSize() check is done above outside of the loop. Moving the hasOptSize check down into the loop wouldn't seem like a good idea.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71072





More information about the llvm-commits mailing list