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

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 21:57:42 PST 2020


xur added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1698
+    }
+    dbgs() << "  BB " << BBI.getName() << ": Count=" << CountValue
+           << "  BFI Count=" << BFICountValue;
----------------
davidxl wrote:
> Probably use opt-remark-analysis -- it can provide line number which is more informative.  The function header print can remain as debug print.
Agreed. Remarks fit well here. I will change to use remarks.


================
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
----------------
davidxl wrote:
> opt-remark seems better.
Ditto.


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


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

https://reviews.llvm.org/D91813



More information about the llvm-commits mailing list