[PATCH] D91813: [PGO] verify BFI counts after loading profile data

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 12:24:43 PST 2020


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1698
+    }
+    dbgs() << "  BB " << BBI.getName() << ": Count=" << CountValue
+           << "  BFI Count=" << BFICountValue;
----------------
Probably use opt-remark-analysis -- it can provide line number which is more informative.  The function header print can remain as debug print.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1705
+  if (BBNoMatchNum)
+    dbgs() << "In function " << F.getName() << ": Num_of_BB = " << BBNum
+           << " Num_of_non_zerovalue_BB = " << NonZeroBBNum
----------------
opt-remark seems better.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1707
+           << " Num_of_non_zerovalue_BB = " << NonZeroBBNum
+           << " Num_of_non_matching_BB = " << BBNoMatchNum << "\n";
+}
----------------
nit: Num_of_mismatch_BB


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

https://reviews.llvm.org/D91813



More information about the llvm-commits mailing list