[PATCH] D31217: Disable loop unrolling and icp in SamplePGO ThinLTO compile phase

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 14:22:53 PDT 2017


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM with one suggestion



================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:465
+  // profile annotation in backend more difficult.
+  if (!PerformThinLTO && !(PrepareForThinLTO && !PGOSampleUse.empty())) {
     /// PGO instrumentation is added during the compile phase for ThinLTO, do
----------------
All the "!" make this a little difficult to parse. Since you are doing the same check a couple places anyway, I suggest adding a boolean up above like:
bool PrepareForThinLTOUsingPGOSampleProfile = PrepareForThinLTO && !PGOSampleUse.empty();

It's a mouthful, but hopefully clearer.


https://reviews.llvm.org/D31217





More information about the llvm-commits mailing list