[llvm] [ctx_prof] Fix checks in `PGOCtxprofFlattening` (PR #108467)

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 21:09:00 PDT 2024


================
@@ -198,6 +204,50 @@ class ProfileAnnotator final {
 
   BBInfo &getBBInfo(const BasicBlock &BB) { return BBInfos.find(&BB)->second; }
 
+  const BBInfo &getBBInfo(const BasicBlock &BB) const {
+    return BBInfos.find(&BB)->second;
+  }
+
+  // validation function after we propagate the counters: all BBs and edges'
+  // counters must have a value.
+  bool allCountersAreAssinged() const {
----------------
david-xl wrote:

make it static?

https://github.com/llvm/llvm-project/pull/108467


More information about the llvm-commits mailing list