[PATCH] D27602: [PGO] Fix insane counts due to nonreturn calls

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 16:00:19 PST 2016


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

lgtm



================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:889
+          uint64_t OutSum = sumEdgeCount(Count->OutEdges);
+          if (Count->CountValue > OutSum)
+            Total = Count->CountValue - OutSum;
----------------
Add a comment here that "If the one of the successor block can early terminate (no-return), we can end up with situation where out edge sum count is larger as the source BB's count is collected by a post-dominated block'.


https://reviews.llvm.org/D27602





More information about the llvm-commits mailing list