================
@@ -479,6 +481,27 @@ transferCFGBlock(const CFGBlock &Block, AnalysisContext 
&AC,
   return State;
 }
 
+// Returns the number of blocks that would be visited if we only visit each
+// reachable block once. This provides a lower bound on the number of block
+// visits. This is a light version of the main analysis loop (keep in sync).
+size_t NumBlockVisitsIfVisitEachReachableOnce(const CFG &CFG) {
----------------
jvoung wrote:

It is similar, but counts blocks the way that the analysis loop does (e.g., not 
counting the entry block). 

Did you mean to reuse some other reachable block counting functionality? I 
looked but didn't see one.

Otherwise, I wanted this to be as close to what the analysis loop does to be 
"NFC", but with high enough MaxBlockVisits it could be close enough.



https://github.com/llvm/llvm-project/pull/186808
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to